Index: vendor/lldb/dist/CMakeLists.txt =================================================================== --- vendor/lldb/dist/CMakeLists.txt (revision 317691) +++ vendor/lldb/dist/CMakeLists.txt (revision 317692) @@ -1,93 +1,100 @@ cmake_minimum_required(VERSION 3.4.3) -include(cmake/modules/LLDBStandalone.cmake) -include(cmake/modules/LLDBConfig.cmake) -include(cmake/modules/AddLLDB.cmake) +# Add path for custom modules +set(CMAKE_MODULE_PATH + ${CMAKE_MODULE_PATH} + "${CMAKE_CURRENT_SOURCE_DIR}/cmake" + "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules" + ) + +include(LLDBStandalone) +include(LLDBConfig) +include(AddLLDB) if (CMAKE_SYSTEM_NAME MATCHES "Windows|Android") set(LLDB_DEFAULT_DISABLE_LIBEDIT 1) else() set(LLDB_DEFAULT_DISABLE_LIBEDIT 0) endif () # We need libedit support to go down both the source and # the scripts directories. set(LLDB_DISABLE_LIBEDIT ${LLDB_DEFAULT_DISABLE_LIBEDIT} CACHE BOOL "Disables the use of editline.") if (LLDB_DISABLE_LIBEDIT) add_definitions( -DLLDB_DISABLE_LIBEDIT ) endif() # add_subdirectory(include) add_subdirectory(docs) if (NOT LLDB_DISABLE_PYTHON) if(LLDB_USE_SYSTEM_SIX) set(SIX_EXTRA_ARGS "--useSystemSix") endif() set(LLDB_PYTHON_TARGET_DIR ${LLDB_BINARY_DIR}/scripts) if(LLDB_BUILD_FRAMEWORK) set(LLDB_PYTHON_TARGET_DIR ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${LLDB_FRAMEWORK_INSTALL_DIR}) else() # Don't set -m when building the framework. set(FINISH_EXTRA_ARGS "-m") endif() set(LLDB_WRAP_PYTHON ${LLDB_BINARY_DIR}/scripts/LLDBWrapPython.cpp) add_subdirectory(scripts) endif () add_subdirectory(source) add_subdirectory(test) add_subdirectory(tools) add_subdirectory(unittests) add_subdirectory(lit) if (NOT LLDB_DISABLE_PYTHON) # 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} ${CMAKE_CURRENT_SOURCE_DIR}/scripts/finishSwigWrapperClasses.py --srcRoot=${LLDB_SOURCE_DIR} --targetDir=${LLDB_PYTHON_TARGET_DIR} --cfgBldDir=${CMAKE_CURRENT_BINARY_DIR}/scripts --prefix=${CMAKE_BINARY_DIR} --cmakeBuildConfiguration=${CMAKE_CFG_INTDIR} --lldbLibDir=lib${LLVM_LIBDIR_SUFFIX} ${SIX_EXTRA_ARGS} ${FINISH_EXTRA_ARGS} VERBATIM DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/scripts/finishSwigWrapperClasses.py DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/scripts/lldb.py COMMENT "Python script sym-linking LLDB Python API") # We depend on liblldb being built before we can do this step. add_dependencies(finish_swig liblldb lldb-argdumper) # If we build the readline module, we depend on that happening # first. if (TARGET readline) add_dependencies(finish_swig readline) endif() # Ensure we do the python post-build step when building lldb. add_dependencies(lldb finish_swig) if(LLDB_BUILD_FRAMEWORK) # The target to install libLLDB needs to depend on finish swig so that the # framework build properly copies over the Python files. add_dependencies(install-liblldb finish_swig) 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 () Index: vendor/lldb/dist/cmake/XcodeHeaderGenerator/CMakeLists.txt =================================================================== --- vendor/lldb/dist/cmake/XcodeHeaderGenerator/CMakeLists.txt (nonexistent) +++ vendor/lldb/dist/cmake/XcodeHeaderGenerator/CMakeLists.txt (revision 317692) @@ -0,0 +1,14 @@ +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) Property changes on: vendor/lldb/dist/cmake/XcodeHeaderGenerator/CMakeLists.txt ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: vendor/lldb/dist/cmake/modules/LLDBConfig.cmake =================================================================== --- vendor/lldb/dist/cmake/modules/LLDBConfig.cmake (revision 317691) +++ vendor/lldb/dist/cmake/modules/LLDBConfig.cmake (revision 317692) @@ -1,445 +1,429 @@ include(CheckCXXSymbolExists) set(LLDB_PROJECT_ROOT ${CMAKE_CURRENT_SOURCE_DIR}) set(LLDB_SOURCE_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/source") set(LLDB_INCLUDE_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/include") set(LLDB_LINKER_SUPPORTS_GROUPS OFF) if (LLVM_COMPILER_IS_GCC_COMPATIBLE AND NOT "${CMAKE_SYSTEM_NAME}" MATCHES "Darwin") # The Darwin linker doesn't understand --start-group/--end-group. set(LLDB_LINKER_SUPPORTS_GROUPS ON) endif() if ( CMAKE_SYSTEM_NAME MATCHES "Windows" ) set(LLDB_DEFAULT_DISABLE_PYTHON 0) set(LLDB_DEFAULT_DISABLE_CURSES 1) elseif (CMAKE_SYSTEM_NAME MATCHES "Android" ) set(LLDB_DEFAULT_DISABLE_PYTHON 1) set(LLDB_DEFAULT_DISABLE_CURSES 1) else() set(LLDB_DEFAULT_DISABLE_PYTHON 0) set(LLDB_DEFAULT_DISABLE_CURSES 0) endif() set(LLDB_DISABLE_PYTHON ${LLDB_DEFAULT_DISABLE_PYTHON} CACHE BOOL "Disables the Python scripting integration.") set(LLDB_DISABLE_CURSES ${LLDB_DEFAULT_DISABLE_CURSES} CACHE BOOL "Disables the Curses integration.") set(LLDB_RELOCATABLE_PYTHON 0 CACHE BOOL "Causes LLDB to use the PYTHONHOME environment variable to locate Python.") set(LLDB_USE_SYSTEM_SIX 0 CACHE BOOL "Use six.py shipped with system and do not install a copy of it") if (NOT CMAKE_SYSTEM_NAME MATCHES "Windows") set(LLDB_EXPORT_ALL_SYMBOLS 0 CACHE BOOL "Causes lldb to export all symbols when building liblldb.") else() # Windows doesn't support toggling this, so don't bother making it a # cache variable. set(LLDB_EXPORT_ALL_SYMBOLS 0) endif() if ((NOT MSVC) OR MSVC12) add_definitions( -DHAVE_ROUND ) endif() if (LLDB_DISABLE_CURSES) add_definitions( -DLLDB_DISABLE_CURSES ) 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("LLDB embedded Python on Windows requires specifying a value for PYTHON_HOME. Python support disabled.") set(LLDB_DISABLE_PYTHON 1 PARENT_SCOPE) return() endif() file(TO_CMAKE_PATH "${PYTHON_HOME}/Include" PYTHON_INCLUDE_DIRS) if(EXISTS "${PYTHON_INCLUDE_DIRS}/patchlevel.h") file(STRINGS "${PYTHON_INCLUDE_DIRS}/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("-- Found Python 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("Unable to find ${PYTHON_INCLUDE_DIRS}/patchlevel.h, Python installation is corrupt.") message("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) file(TO_CMAKE_PATH "${PYTHON_HOME}/python_d.exe" PYTHON_DEBUG_EXE) file(TO_CMAKE_PATH "${PYTHON_HOME}/libs/${PYTHONLIBS_BASE_NAME}_d.lib" PYTHON_DEBUG_LIB) file(TO_CMAKE_PATH "${PYTHON_HOME}/${PYTHONLIBS_BASE_NAME}_d.dll" PYTHON_DEBUG_DLL) file(TO_CMAKE_PATH "${PYTHON_HOME}/python.exe" PYTHON_RELEASE_EXE) file(TO_CMAKE_PATH "${PYTHON_HOME}/libs/${PYTHONLIBS_BASE_NAME}.lib" PYTHON_RELEASE_LIB) file(TO_CMAKE_PATH "${PYTHON_HOME}/${PYTHONLIBS_BASE_NAME}.dll" PYTHON_RELEASE_DLL) if (NOT EXISTS ${PYTHON_DEBUG_EXE}) message("Unable to find ${PYTHON_DEBUG_EXE}") unset(PYTHON_DEBUG_EXE) endif() if (NOT EXISTS ${PYTHON_RELEASE_EXE}) message("Unable to find ${PYTHON_RELEASE_EXE}") unset(PYTHON_RELEASE_EXE) endif() if (NOT EXISTS ${PYTHON_DEBUG_LIB}) message("Unable to find ${PYTHON_DEBUG_LIB}") unset(PYTHON_DEBUG_LIB) endif() if (NOT EXISTS ${PYTHON_RELEASE_LIB}) message("Unable to find ${PYTHON_RELEASE_LIB}") unset(PYTHON_RELEASE_LIB) endif() if (NOT EXISTS ${PYTHON_DEBUG_DLL}) message("Unable to find ${PYTHON_DEBUG_DLL}") unset(PYTHON_DEBUG_DLL) endif() if (NOT EXISTS ${PYTHON_RELEASE_DLL}) message("Unable to find ${PYTHON_RELEASE_DLL}") unset(PYTHON_RELEASE_DLL) endif() if (NOT (PYTHON_DEBUG_EXE AND PYTHON_RELEASE_EXE AND PYTHON_DEBUG_LIB AND PYTHON_RELEASE_LIB AND PYTHON_DEBUG_DLL AND PYTHON_RELEASE_DLL)) message("Python installation is corrupt. Python support will be disabled for this build.") set(LLDB_DISABLE_PYTHON 1 PARENT_SCOPE) return() endif() # Generator expressions are evaluated in the context of each build configuration generated # by CMake. Here we use the $:VALUE logical generator expression to ensure # that the debug Python library, DLL, and executable are used in the Debug build configuration. # # Generator expressions can be difficult to grok at first so here's a breakdown of the one # used for PYTHON_LIBRARY: # # 1. $ evaluates to 1 when the Debug configuration is being generated, # or 0 in all other cases. # 2. $<$:${PYTHON_DEBUG_LIB}> expands to ${PYTHON_DEBUG_LIB} when the Debug # configuration is being generated, or nothing (literally) in all other cases. # 3. $<$>:${PYTHON_RELEASE_LIB}> expands to ${PYTHON_RELEASE_LIB} when # any configuration other than Debug is being generated, or nothing in all other cases. # 4. The conditionals in 2 & 3 are mutually exclusive. # 5. A logical expression with a conditional that evaluates to 0 yields no value at all. # # Due to 4 & 5 it's possible to concatenate 2 & 3 to obtain a single value specific to each # build configuration. In this example the value will be ${PYTHON_DEBUG_LIB} when generating the # Debug configuration, or ${PYTHON_RELEASE_LIB} when generating any other configuration. # Note that it's imperative that there is no whitespace between the two expressions, otherwise # CMake will insert a semicolon between the two. set (PYTHON_EXECUTABLE $<$:${PYTHON_DEBUG_EXE}>$<$>:${PYTHON_RELEASE_EXE}>) set (PYTHON_LIBRARY $<$:${PYTHON_DEBUG_LIB}>$<$>:${PYTHON_RELEASE_LIB}>) set (PYTHON_DLL $<$:${PYTHON_DEBUG_DLL}>$<$>:${PYTHON_RELEASE_DLL}>) set (PYTHON_EXECUTABLE ${PYTHON_EXECUTABLE} PARENT_SCOPE) set (PYTHON_LIBRARY ${PYTHON_LIBRARY} PARENT_SCOPE) set (PYTHON_DLL ${PYTHON_DLL} PARENT_SCOPE) set (PYTHON_INCLUDE_DIRS ${PYTHON_INCLUDE_DIRS} PARENT_SCOPE) message("-- LLDB Found PythonExecutable: ${PYTHON_RELEASE_EXE} and ${PYTHON_DEBUG_EXE}") message("-- LLDB Found PythonLibs: ${PYTHON_RELEASE_LIB} and ${PYTHON_DEBUG_LIB}") message("-- LLDB Found PythonDLL: ${PYTHON_RELEASE_DLL} and ${PYTHON_DEBUG_DLL}") message("-- LLDB Found PythonIncludeDirs: ${PYTHON_INCLUDE_DIRS}") 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(PythonLibs REQUIRED) endif() if (PYTHON_INCLUDE_DIRS) include_directories(${PYTHON_INCLUDE_DIRS}) endif() endif() if (LLDB_DISABLE_PYTHON) unset(PYTHON_INCLUDE_DIRS) unset(PYTHON_LIBRARY) add_definitions( -DLLDB_DISABLE_PYTHON ) endif() if (LLVM_EXTERNAL_CLANG_SOURCE_DIR) include_directories(${LLVM_EXTERNAL_CLANG_SOURCE_DIR}/include) else () include_directories(${CMAKE_SOURCE_DIR}/tools/clang/include) endif () include_directories("${CMAKE_CURRENT_BINARY_DIR}/../clang/include") # Disable GCC warnings check_cxx_compiler_flag("-Wno-deprecated-declarations" CXX_SUPPORTS_NO_DEPRECATED_DECLARATIONS) if (CXX_SUPPORTS_NO_DEPRECATED_DECLARATIONS) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations") endif () check_cxx_compiler_flag("-Wno-unknown-pragmas" CXX_SUPPORTS_NO_UNKNOWN_PRAGMAS) if (CXX_SUPPORTS_NO_UNKNOWN_PRAGMAS) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unknown-pragmas") endif () check_cxx_compiler_flag("-Wno-strict-aliasing" CXX_SUPPORTS_NO_STRICT_ALIASING) if (CXX_SUPPORTS_NO_STRICT_ALIASING) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-strict-aliasing") endif () # Disable Clang warnings check_cxx_compiler_flag("-Wno-deprecated-register" CXX_SUPPORTS_NO_DEPRECATED_REGISTER) if (CXX_SUPPORTS_NO_DEPRECATED_REGISTER) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-register") endif () check_cxx_compiler_flag("-Wno-vla-extension" CXX_SUPPORTS_NO_VLA_EXTENSION) if (CXX_SUPPORTS_NO_VLA_EXTENSION) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-vla-extension") endif () # Disable MSVC warnings if( MSVC ) add_definitions( -wd4018 # Suppress 'warning C4018: '>=' : signed/unsigned mismatch' -wd4068 # Suppress 'warning C4068: unknown pragma' -wd4150 # Suppress 'warning C4150: deletion of pointer to incomplete type' -wd4251 # Suppress 'warning C4251: T must have dll-interface to be used by clients of class U.' -wd4521 # Suppress 'warning C4521: 'type' : multiple copy constructors specified' -wd4530 # Suppress 'warning C4530: C++ exception handler used, but unwind semantics are not enabled.' ) endif() # Use the Unicode (UTF-16) APIs by default on Win32 if (CMAKE_SYSTEM_NAME MATCHES "Windows") add_definitions( -D_UNICODE -DUNICODE ) endif() set(LLDB_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}) set(LLDB_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}) if (CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR) message(FATAL_ERROR "In-source builds are not allowed. CMake would overwrite " "the makefiles distributed with LLDB. Please create a directory and run cmake " "from there, passing the path to this source directory as the last argument. " "This process created the file `CMakeCache.txt' and the directory " "`CMakeFiles'. Please delete them.") endif() # Compute the LLDB version from the LLVM version. string(REGEX MATCH "[0-9]+\\.[0-9]+(\\.[0-9]+)?" LLDB_VERSION ${PACKAGE_VERSION}) message(STATUS "LLDB version: ${LLDB_VERSION}") include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/include ${CMAKE_CURRENT_BINARY_DIR}/include ) if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY) install(DIRECTORY include/ COMPONENT lldb_headers DESTINATION include FILES_MATCHING PATTERN "*.h" PATTERN ".svn" EXCLUDE PATTERN ".cmake" EXCLUDE PATTERN "Config.h" EXCLUDE ) install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include/ COMPONENT lldb_headers DESTINATION include FILES_MATCHING PATTERN "*.h" PATTERN ".svn" EXCLUDE PATTERN ".cmake" EXCLUDE ) endif() if (NOT LIBXML2_FOUND AND NOT (CMAKE_SYSTEM_NAME MATCHES "Windows")) # Skip Libxml2 on Windows. In CMake 3.4 and higher, the algorithm for # finding libxml2 got "smarter", and it can now locate the version which is # in gnuwin32, even though that version does not contain the headers that # LLDB uses. find_package(LibXml2) endif() # Find libraries or frameworks that may be needed if (CMAKE_SYSTEM_NAME MATCHES "Darwin") find_library(CARBON_LIBRARY Carbon) find_library(FOUNDATION_LIBRARY Foundation) find_library(CORE_FOUNDATION_LIBRARY CoreFoundation) find_library(CORE_SERVICES_LIBRARY CoreServices) find_library(SECURITY_LIBRARY Security) find_library(DEBUG_SYMBOLS_LIBRARY DebugSymbols PATHS "/System/Library/PrivateFrameworks") set(LLDB_FRAMEWORK_INSTALL_DIR Library/Frameworks CACHE STRING "Output directory for LLDB.framework") set(LLDB_FRAMEWORK_VERSION A CACHE STRING "LLDB.framework version (default is A)") set(LLDB_FRAMEWORK_RESOURCE_DIR LLDB.framework/Versions/${LLDB_FRAMEWORK_VERSION}/Resources) add_definitions( -DLIBXML2_DEFINED ) list(APPEND system_libs xml2 ${CURSES_LIBRARIES}) list(APPEND system_libs ${CARBON_LIBRARY} ${FOUNDATION_LIBRARY} ${CORE_FOUNDATION_LIBRARY} ${CORE_SERVICES_LIBRARY} ${SECURITY_LIBRARY} ${DEBUG_SYMBOLS_LIBRARY}) else() if (LIBXML2_FOUND) add_definitions( -DLIBXML2_DEFINED ) list(APPEND system_libs ${LIBXML2_LIBRARIES}) include_directories(${LIBXML2_INCLUDE_DIR}) endif() endif() if (HAVE_LIBPTHREAD) list(APPEND system_libs pthread) endif(HAVE_LIBPTHREAD) if (HAVE_LIBDL) list(APPEND system_libs ${CMAKE_DL_LIBS}) endif() if (CMAKE_SYSTEM_NAME MATCHES "Linux") # Check for syscall used by lldb-server on linux. # If these are not found, it will fall back to ptrace (slow) for memory reads. check_cxx_source_compiles(" #include int main() { process_vm_readv(0, nullptr, 0, nullptr, 0, 0); return 0; }" HAVE_PROCESS_VM_READV) if (HAVE_PROCESS_VM_READV) add_definitions(-DHAVE_PROCESS_VM_READV) else() # If we don't have the syscall wrapper function, but we know the syscall number, we can # still issue the syscall manually check_cxx_source_compiles(" #include int main() { return __NR_process_vm_readv; }" HAVE_NR_PROCESS_VM_READV) if (HAVE_NR_PROCESS_VM_READV) add_definitions(-DHAVE_NR_PROCESS_VM_READV) endif() endif() endif() # 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) else() set(LLDB_CAN_USE_LLDB_SERVER 0) 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) 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 std::set s = std::set(std::allocator()); 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 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() endif() if(MSVC) set(LLDB_USE_BUILTIN_DEMANGLER ON) else() option(LLDB_USE_BUILTIN_DEMANGLER "Use lldb's builtin demangler instead of the system one" ON) endif() if(LLDB_USE_BUILTIN_DEMANGLER) add_definitions(-DLLDB_USE_BUILTIN_DEMANGLER) endif() if ((CMAKE_SYSTEM_NAME MATCHES "Android") AND LLVM_BUILD_STATIC AND ((ANDROID_ABI MATCHES "armeabi") OR (ANDROID_ABI MATCHES "mips"))) add_definitions(-DANDROID_USE_ACCEPT_WORKAROUND) endif() find_package(Backtrace) - -include(CheckIncludeFile) -check_include_file(termios.h HAVE_TERMIOS_H) -check_include_file(sys/event.h HAVE_SYS_EVENT_H) - -# 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) -endif() - -# This should be done at the end -configure_file( - ${LLDB_INCLUDE_ROOT}/lldb/Host/Config.h.cmake - ${CMAKE_CURRENT_BINARY_DIR}/include/lldb/Host/Config.h) +include(LLDBGenerateConfig) Index: vendor/lldb/dist/cmake/modules/LLDBGenerateConfig.cmake =================================================================== --- vendor/lldb/dist/cmake/modules/LLDBGenerateConfig.cmake (nonexistent) +++ vendor/lldb/dist/cmake/modules/LLDBGenerateConfig.cmake (revision 317692) @@ -0,0 +1,35 @@ +# This file contains all the logic for running configure-time checks + +include(CheckSymbolExists) +include(CheckIncludeFile) +include(CheckIncludeFiles) + +set(CMAKE_REQUIRED_DEFINITIONS -D_GNU_SOURCE) +check_symbol_exists(ppoll poll.h HAVE_PPOLL) +set(CMAKE_REQUIRED_DEFINITIONS) +check_symbol_exists(sigaction signal.h HAVE_SIGACTION) + +check_include_file(termios.h HAVE_TERMIOS_H) +check_include_files("sys/types.h;sys/event.h" HAVE_SYS_EVENT_H) + +# 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) +endif() + +if(NOT LLDB_CONFIG_HEADER_INPUT) + set(LLDB_CONFIG_HEADER_INPUT ${LLDB_INCLUDE_ROOT}/lldb/Host/Config.h.cmake) +endif() + +if(NOT LLDB_CONFIG_HEADER_OUTPUT) + set(LLDB_CONFIG_HEADER_OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/include/lldb/Host/Config.h) +endif() + +# This should be done at the end +configure_file( + ${LLDB_CONFIG_HEADER_INPUT} + ${LLDB_CONFIG_HEADER_OUTPUT} + ) Index: vendor/lldb/dist/include/lldb/Core/Module.h =================================================================== --- vendor/lldb/dist/include/lldb/Core/Module.h (revision 317691) +++ vendor/lldb/dist/include/lldb/Core/Module.h (revision 317692) @@ -1,1218 +1,1220 @@ //===-- Module.h ------------------------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #ifndef liblldb_Module_h_ #define liblldb_Module_h_ #include "lldb/Core/Address.h" // for Address #include "lldb/Core/ArchSpec.h" #include "lldb/Core/ModuleSpec.h" // for ModuleSpec #include "lldb/Symbol/SymbolContextScope.h" #include "lldb/Symbol/TypeSystem.h" #include "lldb/Target/PathMappingList.h" #include "lldb/Utility/ConstString.h" // for ConstString #include "lldb/Utility/Error.h" // for Error #include "lldb/Utility/FileSpec.h" #include "lldb/Utility/UUID.h" #include "lldb/lldb-defines.h" // for DISALLOW_COPY_AND_ASSIGN #include "lldb/lldb-enumerations.h" // for LanguageType, SymbolType #include "lldb/lldb-forward.h" #include "lldb/lldb-types.h" // for addr_t, offset_t #include "llvm/ADT/DenseSet.h" #include "llvm/ADT/StringRef.h" #include "llvm/Support/Chrono.h" #include #include // for enable_shared_from_this #include #include // for size_t #include // for uint32_t, uint64_t #include #include namespace lldb_private { class CompilerDeclContext; } namespace lldb_private { class Function; } namespace lldb_private { class Log; } namespace lldb_private { class ObjectFile; } namespace lldb_private { class RegularExpression; } namespace lldb_private { class SectionList; } namespace lldb_private { class Stream; } namespace lldb_private { class Symbol; } namespace lldb_private { class SymbolContext; } namespace lldb_private { class SymbolContextList; } namespace lldb_private { class SymbolFile; } namespace lldb_private { class SymbolVendor; } namespace lldb_private { class Symtab; } namespace lldb_private { class Target; } namespace lldb_private { class TypeList; } namespace lldb_private { class TypeMap; } namespace lldb_private { class VariableList; } namespace lldb_private { //---------------------------------------------------------------------- /// @class Module Module.h "lldb/Core/Module.h" /// @brief A class that describes 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. /// /// Modules control when and if information is parsed according to which /// 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. /// /// The module will parse more detailed information as more queries are /// made. //---------------------------------------------------------------------- class Module : public std::enable_shared_from_this, public SymbolContextScope { public: // Static functions that can track the lifetime of module objects. // This is handy because we might have Module objects that are in // shared pointers that aren't in the global module list (from // ModuleList). If this is the case we need to know about it. // The modules in the global list maintained by these functions // can be viewed using the "target modules list" command using the // "--global" (-g for short). static size_t GetNumberAllocatedModules(); static Module *GetAllocatedModuleAtIndex(size_t idx); static std::recursive_mutex &GetAllocationModuleCollectionMutex(); //------------------------------------------------------------------ /// Construct with file specification and architecture. /// /// Clients that wish to share modules with other targets should /// use ModuleList::GetSharedModule(). /// /// @param[in] file_spec /// The file specification for the on disk representation of /// this executable image. /// /// @param[in] arch /// The architecture to set as the current architecture in /// this module. /// /// @param[in] object_name /// The name of an object in a module used to extract a module /// within a module (.a files and modules that contain multiple /// architectures). /// /// @param[in] object_offset /// The offset within an existing module used to extract a /// module within a module (.a files and modules that contain /// multiple architectures). //------------------------------------------------------------------ Module( const FileSpec &file_spec, const ArchSpec &arch, const ConstString *object_name = nullptr, lldb::offset_t object_offset = 0, const llvm::sys::TimePoint<> &object_mod_time = llvm::sys::TimePoint<>()); Module(const ModuleSpec &module_spec); static lldb::ModuleSP CreateJITModule(const lldb::ObjectFileJITDelegateSP &delegate_sp); //------------------------------------------------------------------ /// Destructor. //------------------------------------------------------------------ ~Module() override; bool MatchesModuleSpec(const ModuleSpec &module_ref); //------------------------------------------------------------------ /// Set the load address for all sections in a module to be the /// file address plus \a slide. /// /// Many times a module will be loaded in a target with a constant /// offset applied to all top level sections. This function can /// set the load address for all top level sections to be the /// section file address + offset. /// /// @param[in] target /// The target in which to apply the section load addresses. /// /// @param[in] value /// if \a value_is_offset is true, then value is the offset to /// apply to all file addresses for all top level sections in /// the object file as each section load address is being set. /// If \a value_is_offset is false, then "value" is the new /// absolute base address for the image. /// /// @param[in] value_is_offset /// If \b true, then \a value is an offset to apply to each /// file address of each top level section. /// If \b false, then \a value is the image base address that /// will be used to rigidly slide all loadable sections. /// /// @param[out] changed /// If any section load addresses were changed in \a target, /// then \a changed will be set to \b true. Else \a changed /// will be set to false. This allows this function to be /// called multiple times on the same module for the same /// target. If the module hasn't moved, then \a changed will /// be false and no module updated notification will need to /// be sent out. /// /// @return /// /b True if any sections were successfully loaded in \a target, /// /b false otherwise. //------------------------------------------------------------------ bool SetLoadAddress(Target &target, lldb::addr_t value, bool value_is_offset, bool &changed); //------------------------------------------------------------------ /// @copydoc SymbolContextScope::CalculateSymbolContext(SymbolContext*) /// /// @see SymbolContextScope //------------------------------------------------------------------ void CalculateSymbolContext(SymbolContext *sc) override; lldb::ModuleSP CalculateSymbolContextModule() override; void GetDescription(Stream *s, lldb::DescriptionLevel level = lldb::eDescriptionLevelFull); //------------------------------------------------------------------ /// Get the module path and object name. /// /// Modules can refer to object files. In this case the specification /// is simple and would return the path to the file: /// /// "/usr/lib/foo.dylib" /// /// Modules can be .o files inside of a BSD archive (.a file). In /// this case, the object specification will look like: /// /// "/usr/lib/foo.a(bar.o)" /// /// There are many places where logging wants to log this fully /// qualified specification, so we centralize this functionality /// here. /// /// @return /// The object path + object name if there is one. //------------------------------------------------------------------ std::string GetSpecificationDescription() const; //------------------------------------------------------------------ /// Dump a description of this object to a Stream. /// /// Dump a description of the contents of this object to the /// supplied stream \a s. The dumped content will be only what has /// been loaded or parsed up to this point at which this function /// is called, so this is a good way to see what has been parsed /// in a module. /// /// @param[in] s /// The stream to which to dump the object description. //------------------------------------------------------------------ void Dump(Stream *s); //------------------------------------------------------------------ /// @copydoc SymbolContextScope::DumpSymbolContext(Stream*) /// /// @see SymbolContextScope //------------------------------------------------------------------ void DumpSymbolContext(Stream *s) override; //------------------------------------------------------------------ /// Find a symbol in the object file's symbol table. /// /// @param[in] name /// The name of the symbol that we are looking for. /// /// @param[in] symbol_type /// If set to eSymbolTypeAny, find a symbol of any type that /// has a name that matches \a name. If set to any other valid /// SymbolType enumeration value, then search only for /// symbols that match \a symbol_type. /// /// @return /// Returns a valid symbol pointer if a symbol was found, /// nullptr otherwise. //------------------------------------------------------------------ const Symbol *FindFirstSymbolWithNameAndType( const ConstString &name, lldb::SymbolType symbol_type = lldb::eSymbolTypeAny); size_t FindSymbolsWithNameAndType(const ConstString &name, lldb::SymbolType symbol_type, SymbolContextList &sc_list); size_t FindSymbolsMatchingRegExAndType(const RegularExpression ®ex, lldb::SymbolType symbol_type, SymbolContextList &sc_list); //------------------------------------------------------------------ /// Find a function symbols in the object file's symbol table. /// /// @param[in] name /// The name of the symbol that we are looking for. /// /// @param[in] name_type_mask /// A mask that has one or more bitwise OR'ed values from the /// lldb::FunctionNameType enumeration type that indicate what /// kind of names we are looking for. /// /// @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(const ConstString &name, uint32_t name_type_mask, SymbolContextList &sc_list); //------------------------------------------------------------------ /// Find compile units by partial or full path. /// /// Finds all compile units that match \a path in all of the modules /// and returns the results in \a sc_list. /// /// @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); //------------------------------------------------------------------ /// Find functions by name. /// /// If the function is an inlined function, it will have a block, /// representing the inlined function, and the function will be the /// containing function. If it is not inlined, then the block will /// be NULL. /// /// @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(const ConstString &name, const CompilerDeclContext *parent_decl_ctx, uint32_t name_type_mask, bool symbols_ok, bool inlines_ok, bool append, SymbolContextList &sc_list); //------------------------------------------------------------------ /// Find functions by name. /// /// If the function is an inlined function, it will have a block, /// representing the inlined function, and the function will be the /// containing function. If it is not inlined, then the block will /// be NULL. /// /// @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 ®ex, bool symbols_ok, bool inlines_ok, bool append, SymbolContextList &sc_list); //------------------------------------------------------------------ /// Find addresses by file/line /// /// @param[in] target_sp /// The target the addresses are desired for. /// /// @param[in] file /// Source file to locate. /// /// @param[in] line /// Source line to locate. /// /// @param[in] function /// Optional filter function. Addresses within this function will be /// added to the 'local' list. All others will be added to the 'extern' /// list. /// /// @param[out] output_local /// All matching addresses within 'function' /// /// @param[out] output_extern /// All matching addresses not within 'function' void FindAddressesForLine(const lldb::TargetSP target_sp, const FileSpec &file, uint32_t line, Function *function, std::vector
&output_local, std::vector
&output_extern); //------------------------------------------------------------------ /// Find global and static variables by name. /// /// @param[in] name /// The name of the global or static variable we are looking /// for. /// /// @param[in] parent_decl_ctx /// If valid, a decl context that results must exist within /// /// @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] variable_list /// A list of variables that gets the matches appended to (if /// \a append it \b true), or replace (if \a append is \b false). /// /// @return /// The number of matches added to \a variable_list. //------------------------------------------------------------------ size_t FindGlobalVariables(const ConstString &name, const CompilerDeclContext *parent_decl_ctx, bool append, size_t max_matches, VariableList &variable_list); //------------------------------------------------------------------ /// Find global and static variables by regular expression. /// /// @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 /// 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] variable_list /// A list of variables that gets the matches appended to (if /// \a append it \b true), or replace (if \a append is \b false). /// /// @return /// The number of matches added to \a variable_list. //------------------------------------------------------------------ size_t FindGlobalVariables(const RegularExpression ®ex, bool append, 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 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 as long as the base /// typename matches and as long as any immediate containing /// namespaces/class scopes that are specified match. So to search /// for a type "d" in "b::c", the name "b::c::d" can be specified /// and it will match any class/namespace "b" which contains a /// class/namespace "c" which contains type "d". We do this to /// allow users to not always have to specify complete scoping on /// all expressions, but it also allows for exact matching when /// required. /// /// @param[in] sc /// A symbol context that scopes where to extract a type list /// from. /// /// @param[in] type_name /// The name of the type we are looking for that is a fully /// or partially qualified type name. /// /// @param[in] exact_match /// If \b true, \a type_name is fully qualified and must match /// exactly. If \b false, \a type_name is a partially qualified /// name where the leading namespaces or classes can be /// omitted to make finding types that a user may type /// easier. /// /// @param[out] type_list /// A type list gets populated with any matches. /// /// @return /// The number of matches added to \a type_list. //------------------------------------------------------------------ size_t FindTypes(const SymbolContext &sc, const ConstString &type_name, bool exact_match, size_t max_matches, llvm::DenseSet &searched_symbol_files, TypeList &types); lldb::TypeSP FindFirstType(const SymbolContext &sc, const ConstString &type_name, bool exact_match); //------------------------------------------------------------------ /// Find types by name that are in a namespace. This function is /// used by the expression parser when searches need to happen in /// an exact namespace scope. /// /// @param[in] sc /// A symbol context that scopes where to extract a type list /// from. /// /// @param[in] type_name /// 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(const SymbolContext &sc, const ConstString &type_name, const CompilerDeclContext *parent_decl_ctx, size_t max_matches, TypeList &type_list); //------------------------------------------------------------------ /// Get const accessor for the module architecture. /// /// @return /// A const reference to the architecture object. //------------------------------------------------------------------ const ArchSpec &GetArchitecture() const; //------------------------------------------------------------------ /// 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. //------------------------------------------------------------------ const FileSpec &GetFileSpec() const { return m_file; } //------------------------------------------------------------------ /// 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. //------------------------------------------------------------------ const FileSpec &GetPlatformFileSpec() const { if (m_platform_file) return m_platform_file; return m_file; } void SetPlatformFileSpec(const FileSpec &file) { m_platform_file = file; } const FileSpec &GetRemoteInstallFileSpec() const { return m_remote_install_file; } void SetRemoteInstallFileSpec(const FileSpec &file) { m_remote_install_file = file; } const FileSpec &GetSymbolFileFileSpec() const { return m_symfile_spec; } + void PreloadSymbols(); + void SetSymbolFileFileSpec(const FileSpec &file); const llvm::sys::TimePoint<> &GetModificationTime() const { return m_mod_time; } const llvm::sys::TimePoint<> &GetObjectModificationTime() const { return m_object_mod_time; } void SetObjectModificationTime(const llvm::sys::TimePoint<> &mod_time) { m_mod_time = mod_time; } //------------------------------------------------------------------ /// Tells whether this module is capable of being the main executable /// for a process. /// /// @return /// \b true if it is, \b false otherwise. //------------------------------------------------------------------ bool IsExecutable(); //------------------------------------------------------------------ /// Tells whether this module has been loaded in the target passed in. /// This call doesn't distinguish between whether the module is loaded /// by the dynamic loader, or by a "target module add" type call. /// /// @param[in] target /// The target to check whether this is loaded in. /// /// @return /// \b true if it is, \b false otherwise. //------------------------------------------------------------------ bool IsLoadedInTarget(Target *target); bool LoadScriptingResourceInTarget(Target *target, Error &error, Stream *feedback_stream = nullptr); //------------------------------------------------------------------ /// Get the number of compile units for this module. /// /// @return /// The number of compile units that the symbol vendor plug-in /// finds. //------------------------------------------------------------------ size_t GetNumCompileUnits(); lldb::CompUnitSP GetCompileUnitAtIndex(size_t idx); const ConstString &GetObjectName() const; uint64_t GetObjectOffset() const { return m_object_offset; } //------------------------------------------------------------------ /// Get the object file representation for the current architecture. /// /// If the object file has not been located or parsed yet, this /// function will find the best ObjectFile plug-in that can parse /// Module::m_file. /// /// @return /// If Module::m_file does not exist, or no plug-in was found /// that can parse the file, or the object file doesn't contain /// the current architecture in Module::m_arch, nullptr will be /// returned, else a valid object file interface will be /// returned. The returned pointer is owned by this object and /// remains valid as long as the object is around. //------------------------------------------------------------------ virtual ObjectFile *GetObjectFile(); //------------------------------------------------------------------ /// Get the unified section list for the module. This is the section /// list created by the module's object file and any debug info and /// symbol files created by the symbol vendor. /// /// If the symbol vendor has not been loaded yet, this function /// will return the section list for the object file. /// /// @return /// Unified module section list. //------------------------------------------------------------------ virtual SectionList *GetSectionList(); //------------------------------------------------------------------ /// Notify the module that the file addresses for the Sections have /// been updated. /// /// If the Section file addresses for a module are updated, this /// method should be called. Any parts of the module, object file, /// or symbol file that has cached those file addresses must invalidate /// or update its cache. //------------------------------------------------------------------ virtual void SectionFileAddressesChanged(); uint32_t GetVersion(uint32_t *versions, uint32_t num_versions); //------------------------------------------------------------------ /// Load an object file from memory. /// /// If available, the size of the object file in memory may be /// passed to avoid additional round trips to process memory. /// If the size is not provided, a default value is used. This /// value should be large enough to enable the ObjectFile plugins /// to read the header of the object file without going back to the /// process. /// /// @return /// The object file loaded from memory or nullptr, if the operation /// failed (see the `error` for more information in that case). //------------------------------------------------------------------ ObjectFile *GetMemoryObjectFile(const lldb::ProcessSP &process_sp, lldb::addr_t header_addr, Error &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. /// /// @return /// A valid type list pointer, or nullptr if there is no valid /// symbol vendor for this module. //------------------------------------------------------------------ TypeList *GetTypeList(); //------------------------------------------------------------------ /// Get a pointer to the UUID value contained in this object. /// /// If the executable image file doesn't not have a UUID value built /// into the file format, an MD5 checksum of the entire file, or /// slice of the file for the current architecture should be used. /// /// @return /// A const pointer to the internal copy of the UUID value in /// this module if this module has a valid UUID value, NULL /// otherwise. //------------------------------------------------------------------ const lldb_private::UUID &GetUUID(); //------------------------------------------------------------------ /// A debugging function that will cause everything in a module to /// be parsed. /// /// All compile units will be parsed, along with all globals and /// static variables and all functions for those compile units. /// All types, scopes, local variables, static variables, global /// variables, and line tables will be parsed. This can be used /// prior to dumping a module to see a complete list of the /// resulting debug information that gets parsed, or as a debug /// function to ensure that the module can consume all of the /// debug data the symbol vendor provides. //------------------------------------------------------------------ void ParseAllDebugSymbols(); bool ResolveFileAddress(lldb::addr_t vm_addr, Address &so_addr); //------------------------------------------------------------------ /// Resolve the symbol context for the given address. /// /// Tries to resolve the matching symbol context based on a lookup /// from the current symbol vendor. If the lazy lookup fails, /// an attempt is made to parse the eh_frame section to handle /// stripped symbols. If this fails, an attempt is made to resolve /// the symbol to the previous address to handle the case of a /// function with a tail call. /// /// Use properties of the modified SymbolContext to inspect any /// resolved target, module, compilation unit, symbol, function, /// function block or line entry. Use the return value to determine /// which of these properties have been modified. /// /// @param[in] so_addr /// A load address to resolve. /// /// @param[in] resolve_scope /// The scope that should be resolved (see SymbolContext::Scope). /// A combination of flags from the enumeration SymbolContextItem /// requesting a resolution depth. Note that the flags that are /// actually resolved may be a superset of the requested flags. /// For instance, eSymbolContextSymbol requires resolution of /// eSymbolContextModule, and eSymbolContextFunction requires /// eSymbolContextSymbol. /// /// @param[out] sc /// The SymbolContext that is modified based on symbol resolution. /// /// @param[in] resolve_tail_call_address /// Determines if so_addr should resolve to a symbol in the case /// of a function whose last instruction is a call. In this case, /// the PC can be one past the address range of the function. /// /// @return /// The scope that has been resolved (see SymbolContext::Scope). /// /// @see SymbolContext::Scope //------------------------------------------------------------------ uint32_t ResolveSymbolContextForAddress(const Address &so_addr, uint32_t resolve_scope, SymbolContext &sc, bool resolve_tail_call_address = false); //------------------------------------------------------------------ /// Resolve items in the symbol context for a given file and line. /// /// Tries to resolve \a file_path and \a line to a list of matching /// symbol contexts. /// /// The line table entries contains addresses that can be used to /// further resolve the values in each match: the function, block, /// symbol. Care should be taken to minimize the amount of /// information that is requested to only what is needed -- /// typically the module, compile unit, line table and line table /// entry are sufficient. /// /// @param[in] file_path /// A path to a source file to match. If \a file_path does not /// specify a directory, then this query will match all files /// whose base filename matches. If \a file_path does specify /// a directory, the fullpath to the file must match. /// /// @param[in] line /// The source line to match, or zero if just the compile unit /// should be resolved. /// /// @param[in] check_inlines /// Check for inline file and line number matches. This option /// should be used sparingly as it will cause all line tables /// for every compile unit to be parsed and searched for /// matching inline file entries. /// /// @param[in] resolve_scope /// The scope that should be resolved (see /// SymbolContext::Scope). /// /// @param[out] sc_list /// A symbol context list that gets matching symbols contexts /// appended to. /// /// @return /// The number of matches that were added to \a sc_list. /// /// @see SymbolContext::Scope //------------------------------------------------------------------ uint32_t ResolveSymbolContextForFilePath(const char *file_path, uint32_t line, bool check_inlines, uint32_t resolve_scope, SymbolContextList &sc_list); //------------------------------------------------------------------ /// Resolve items in the symbol context for a given file and line. /// /// Tries to resolve \a file_spec and \a line to a list of matching /// symbol contexts. /// /// The line table entries contains addresses that can be used to /// further resolve the values in each match: the function, block, /// symbol. Care should be taken to minimize the amount of /// information that is requested to only what is needed -- /// typically the module, compile unit, line table and line table /// entry are sufficient. /// /// @param[in] file_spec /// A file spec to a source file to match. If \a file_path does /// not specify a directory, then this query will match all /// files whose base filename matches. If \a file_path does /// specify a directory, the fullpath to the file must match. /// /// @param[in] line /// The source line to match, or zero if just the compile unit /// should be resolved. /// /// @param[in] check_inlines /// Check for inline file and line number matches. This option /// should be used sparingly as it will cause all line tables /// for every compile unit to be parsed and searched for /// matching inline file entries. /// /// @param[in] resolve_scope /// The scope that should be resolved (see /// SymbolContext::Scope). /// /// @param[out] sc_list /// A symbol context list that gets filled in with all of the /// matches. /// /// @return /// A integer that contains SymbolContext::Scope bits set for /// each item that was successfully resolved. /// /// @see SymbolContext::Scope //------------------------------------------------------------------ uint32_t ResolveSymbolContextsForFileSpec(const FileSpec &file_spec, uint32_t line, bool check_inlines, uint32_t resolve_scope, SymbolContextList &sc_list); void SetFileSpecAndObjectName(const FileSpec &file, const ConstString &object_name); bool GetIsDynamicLinkEditor(); 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 architecture, path and // object name (if any)). // This centralizes code so that everyone doesn't need to format their error // and log messages on // their own and keeps the output a bit more consistent. void LogMessage(Log *log, const char *format, ...) __attribute__((format(printf, 3, 4))); void LogMessageVerboseBacktrace(Log *log, const char *format, ...) __attribute__((format(printf, 3, 4))); void ReportWarning(const char *format, ...) __attribute__((format(printf, 2, 3))); void ReportError(const char *format, ...) __attribute__((format(printf, 2, 3))); // Only report an error once when the module is first detected to be modified // so we don't spam the console with many messages. void ReportErrorIfModifyDetected(const char *format, ...) __attribute__((format(printf, 2, 3))); //------------------------------------------------------------------ // Return true if the file backing this module has changed since the // module was originally created since we saved the initial file // modification time when the module first gets created. //------------------------------------------------------------------ bool FileHasChanged() const; //------------------------------------------------------------------ // SymbolVendor, SymbolFile and ObjectFile member objects should // lock the module mutex to avoid deadlocks. //------------------------------------------------------------------ std::recursive_mutex &GetMutex() const { return m_mutex; } PathMappingList &GetSourceMappingList() { return m_source_mappings; } const PathMappingList &GetSourceMappingList() const { return m_source_mappings; } //------------------------------------------------------------------ /// Finds a source file given a file spec using the module source /// path remappings (if any). /// /// Tries to resolve \a orig_spec by checking the module source path /// remappings. It makes sure the file exists, so this call can be /// expensive if the remappings are on a network file system, so /// use this function sparingly (not in a tight debug info parsing /// loop). /// /// @param[in] orig_spec /// The original source file path to try and remap. /// /// @param[out] new_spec /// The newly remapped filespec that is guaranteed to exist. /// /// @return /// /b true if \a orig_spec was successfully located and /// \a new_spec is filled in with an existing file spec, /// \b false otherwise. //------------------------------------------------------------------ bool FindSourceFile(const FileSpec &orig_spec, FileSpec &new_spec) const; //------------------------------------------------------------------ /// Remaps a source file given \a path into \a new_path. /// /// Remaps \a path if any source remappings match. This function /// does NOT stat the file system so it can be used in tight loops /// where debug info is being parsed. /// /// @param[in] path /// The original source file path to try and remap. /// /// @param[out] new_path /// The newly remapped filespec that is may or may not exist. /// /// @return /// /b true if \a path was successfully located and \a new_path /// is filled in with a new source path, \b false otherwise. //------------------------------------------------------------------ bool RemapSourceFile(llvm::StringRef path, std::string &new_path) const; bool RemapSourceFile(const char *, std::string &) const = delete; //------------------------------------------------------------------ /// Loads this module to memory. /// /// Loads the bits needed to create an executable image to the memory. /// It is useful with bare-metal targets where target does not have the /// ability to start a process itself. /// /// @param[in] target /// Target where to load the module. /// /// @return //------------------------------------------------------------------ Error LoadInMemory(Target &target, bool set_pc); //---------------------------------------------------------------------- /// @class LookupInfo Module.h "lldb/Core/Module.h" /// @brief 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. /// /// 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 the symbol or objects files. Lanaguage is included in /// case we need to filter results by language at a later date. The /// "m_name_type_mask" member variable tells us what kinds of names we /// are looking for and can help us prune out unwanted results. /// /// Function lookups are done in Module.cpp, ModuleList.cpp and in /// BreakpointResolverName.cpp and they all now use this class to do /// lookups correctly. //---------------------------------------------------------------------- class LookupInfo { public: LookupInfo() : m_name(), m_lookup_name(), m_language(lldb::eLanguageTypeUnknown), m_name_type_mask(0), m_match_name_after_lookup(false) {} LookupInfo(const ConstString &name, uint32_t name_type_mask, lldb::LanguageType language); const ConstString &GetName() const { return m_name; } void SetName(const ConstString &name) { m_name = name; } const ConstString &GetLookupName() const { return m_lookup_name; } void SetLookupName(const ConstString &name) { m_lookup_name = name; } uint32_t GetNameTypeMask() const { return m_name_type_mask; } void SetNameTypeMask(uint32_t mask) { m_name_type_mask = mask; } void Prune(SymbolContextList &sc_list, size_t start_idx) const; protected: ConstString m_name; ///< What the user originally typed ConstString m_lookup_name; ///< The actual name will lookup when calling in ///the object or symbol file lldb::LanguageType m_language; ///< Limit matches to only be for this language uint32_t m_name_type_mask; ///< One or more bits from lldb::FunctionNameType ///that indicate what kind of names we are ///looking for bool m_match_name_after_lookup; ///< If \b true, then demangled names that ///match will need to contain "m_name" in ///order to be considered a match }; protected: //------------------------------------------------------------------ // Member Variables //------------------------------------------------------------------ mutable std::recursive_mutex m_mutex; ///< A mutex to keep this object happy ///in multi-threaded environments. /// The modification time for this module when it was created. llvm::sys::TimePoint<> m_mod_time; ArchSpec m_arch; ///< The architecture for this module. UUID m_uuid; ///< Each module is assumed to have a unique identifier to help ///match it up to debug symbols. FileSpec m_file; ///< The file representation on disk for this module (if ///there is one). FileSpec m_platform_file; ///< The path to the module on the platform on which ///it is being debugged FileSpec m_remote_install_file; ///< If set when debugging on remote ///platforms, this module will be installed at ///this location FileSpec m_symfile_spec; ///< If this path is valid, then this is the file ///that _will_ be used as the symbol file for this ///module ConstString m_object_name; ///< The name an object within this module that is ///selected, or empty of the module is represented ///by \a m_file. uint64_t m_object_offset; llvm::sys::TimePoint<> m_object_mod_time; lldb::ObjectFileSP m_objfile_sp; ///< A shared pointer to the object file ///parser for this module as it may or may ///not be shared with the SymbolFile lldb::SymbolVendorUP m_symfile_ap; ///< A pointer to the symbol vendor for this module. std::vector m_old_symfiles; ///< If anyone calls Module::SetSymbolFileFileSpec() and ///changes the symbol file, ///< we need to keep all old symbol files around in case anyone has type ///references to them TypeSystemMap m_type_system_map; ///< A map of any type systems associated ///with this module PathMappingList m_source_mappings; ///< Module specific source remappings for ///when you have debug info for a module ///that doesn't match where the sources ///currently are lldb::SectionListUP m_sections_ap; ///< Unified section list for module that ///is used by the ObjectFile and and ///ObjectFile instances for the debug info std::atomic m_did_load_objfile{false}; std::atomic m_did_load_symbol_vendor{false}; std::atomic m_did_parse_uuid{false}; mutable bool m_file_has_changed : 1, m_first_file_changed_log : 1; /// See if the module was modified after it /// was initially opened. //------------------------------------------------------------------ /// Resolve a file or load virtual address. /// /// Tries to resolve \a vm_addr as a file address (if \a /// vm_addr_is_file_addr is true) or as a load address if \a /// vm_addr_is_file_addr is false) in the symbol vendor. /// \a resolve_scope indicates what clients wish to resolve /// and can be used to limit the scope of what is parsed. /// /// @param[in] vm_addr /// The load virtual address to resolve. /// /// @param[in] vm_addr_is_file_addr /// If \b true, \a vm_addr is a file address, else \a vm_addr /// if a load address. /// /// @param[in] resolve_scope /// The scope that should be resolved (see /// SymbolContext::Scope). /// /// @param[out] so_addr /// The section offset based address that got resolved if /// any bits are returned. /// /// @param[out] sc // The symbol context that has objects filled in. Each bit /// in the \a resolve_scope pertains to a member in the \a sc. /// /// @return /// A integer that contains SymbolContext::Scope bits set for /// each item that was successfully resolved. /// /// @see SymbolContext::Scope //------------------------------------------------------------------ uint32_t ResolveSymbolContextForAddress(lldb::addr_t vm_addr, bool vm_addr_is_file_addr, uint32_t resolve_scope, Address &so_addr, SymbolContext &sc); void SymbolIndicesToSymbolContextList(Symtab *symtab, std::vector &symbol_indexes, SymbolContextList &sc_list); bool SetArchitecture(const ArchSpec &new_arch); SectionList *GetUnifiedSectionList(); friend class ModuleList; friend class ObjectFile; friend class SymbolFile; private: Module(); // Only used internally by CreateJITModule () size_t FindTypes_Impl( const SymbolContext &sc, const ConstString &name, const CompilerDeclContext *parent_decl_ctx, bool append, size_t max_matches, llvm::DenseSet &searched_symbol_files, TypeMap &types); DISALLOW_COPY_AND_ASSIGN(Module); }; } // namespace lldb_private #endif // liblldb_Module_h_ Index: vendor/lldb/dist/include/lldb/Core/TraceOptions.h =================================================================== --- vendor/lldb/dist/include/lldb/Core/TraceOptions.h (revision 317691) +++ vendor/lldb/dist/include/lldb/Core/TraceOptions.h (revision 317692) @@ -1,62 +1,62 @@ //===-- TraceOptions.h ------------------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #ifndef liblldb_TraceOptions_h_ #define liblldb_TraceOptions_h_ #include "lldb/lldb-defines.h" #include "lldb/lldb-enumerations.h" #include "lldb/Core/StructuredData.h" namespace lldb_private { class TraceOptions { public: TraceOptions() : m_trace_params(new StructuredData::Dictionary()) {} const StructuredData::DictionarySP &getTraceParams() const { return m_trace_params; } lldb::TraceType getType() const { return m_type; } uint64_t getTraceBufferSize() const { return m_trace_buffer_size; } uint64_t getMetaDataBufferSize() const { return m_meta_data_buffer_size; } void setTraceParams(const StructuredData::DictionarySP &dict_obj) { m_trace_params = dict_obj; } void setType(lldb::TraceType type) { m_type = type; } void setTraceBufferSize(uint64_t size) { m_trace_buffer_size = size; } void setMetaDataBufferSize(uint64_t size) { m_meta_data_buffer_size = size; } void setThreadID(lldb::tid_t thread_id) { m_thread_id = thread_id; } lldb::tid_t getThreadID() { return m_thread_id; } private: lldb::TraceType m_type; uint64_t m_trace_buffer_size; uint64_t m_meta_data_buffer_size; lldb::tid_t m_thread_id; /// m_trace_params is meant to hold any custom parameters /// apart from meta buffer size and trace size. /// The interpretation of such parameters is left to /// the lldb-server. StructuredData::DictionarySP m_trace_params; }; } -#endif // liblldb_TraceOptions_h_ \ No newline at end of file +#endif // liblldb_TraceOptions_h_ Index: vendor/lldb/dist/include/lldb/Core/UniqueCStringMap.h =================================================================== --- vendor/lldb/dist/include/lldb/Core/UniqueCStringMap.h (revision 317691) +++ vendor/lldb/dist/include/lldb/Core/UniqueCStringMap.h (revision 317692) @@ -1,273 +1,273 @@ //===-- UniqueCStringMap.h --------------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #ifndef liblldb_UniqueCStringMap_h_ #define liblldb_UniqueCStringMap_h_ // C Includes // C++ Includes #include #include // Other libraries and framework includes // Project includes +#include "lldb/Utility/ConstString.h" #include "lldb/Utility/RegularExpression.h" -#include "llvm/ADT/StringRef.h" - namespace lldb_private { //---------------------------------------------------------------------- // Templatized uniqued string map. // // This map is useful for mapping unique C string names to values of // type T. Each "const char *" name added must be unique for a given // C string value. ConstString::GetCString() can provide such strings. // Any other string table that has guaranteed unique values can also // be used. //---------------------------------------------------------------------- template class UniqueCStringMap { public: struct Entry { Entry() {} - Entry(llvm::StringRef cstr) : cstring(cstr), value() {} + Entry(ConstString cstr) : cstring(cstr), value() {} - Entry(llvm::StringRef cstr, const T &v) : cstring(cstr), value(v) {} + Entry(ConstString cstr, const T &v) : cstring(cstr), value(v) {} - bool operator<(const Entry &rhs) const { return cstring < rhs.cstring; } + // This is only for uniqueness, not lexicographical ordering, so we can + // just compare pointers. + bool operator<(const Entry &rhs) const { + return cstring.GetCString() < rhs.cstring.GetCString(); + } - llvm::StringRef cstring; + ConstString cstring; T value; }; //------------------------------------------------------------------ // Call this function multiple times to add a bunch of entries to // this map, then later call UniqueCStringMap::Sort() before doing // any searches by name. //------------------------------------------------------------------ - void Append(llvm::StringRef unique_cstr, const T &value) { + void Append(ConstString unique_cstr, const T &value) { m_map.push_back(typename UniqueCStringMap::Entry(unique_cstr, value)); } void Append(const Entry &e) { m_map.push_back(e); } void Clear() { m_map.clear(); } //------------------------------------------------------------------ // Call this function to always keep the map sorted when putting // entries into the map. //------------------------------------------------------------------ - void Insert(llvm::StringRef unique_cstr, const T &value) { + void Insert(ConstString unique_cstr, const T &value) { typename UniqueCStringMap::Entry e(unique_cstr, value); m_map.insert(std::upper_bound(m_map.begin(), m_map.end(), e), e); } void Insert(const Entry &e) { m_map.insert(std::upper_bound(m_map.begin(), m_map.end(), e), e); } //------------------------------------------------------------------ // Get an entries by index in a variety of forms. // // The caller is responsible for ensuring that the collection does // not change during while using the returned values. //------------------------------------------------------------------ bool GetValueAtIndex(uint32_t idx, T &value) const { if (idx < m_map.size()) { value = m_map[idx].value; return true; } return false; } - llvm::StringRef GetCStringAtIndexUnchecked(uint32_t idx) const { + ConstString GetCStringAtIndexUnchecked(uint32_t idx) const { return m_map[idx].cstring; } // Use this function if you have simple types in your map that you // can easily copy when accessing values by index. T GetValueAtIndexUnchecked(uint32_t idx) const { return m_map[idx].value; } // Use this function if you have complex types in your map that you // don't want to copy when accessing values by index. const T &GetValueRefAtIndexUnchecked(uint32_t idx) const { return m_map[idx].value; } - llvm::StringRef GetCStringAtIndex(uint32_t idx) const { - return ((idx < m_map.size()) ? m_map[idx].cstring : llvm::StringRef()); + ConstString GetCStringAtIndex(uint32_t idx) const { + return ((idx < m_map.size()) ? m_map[idx].cstring : ConstString()); } //------------------------------------------------------------------ // Find the value for the unique string in the map. // // Return the value for \a unique_cstr if one is found, return // \a fail_value otherwise. This method works well for simple type // T values and only if there is a sensible failure value that can // be returned and that won't match any existing values. //------------------------------------------------------------------ - T Find(llvm::StringRef unique_cstr, T fail_value) const { + T Find(ConstString unique_cstr, T fail_value) const { Entry search_entry(unique_cstr); const_iterator end = m_map.end(); const_iterator pos = std::lower_bound(m_map.begin(), end, search_entry); if (pos != end) { if (pos->cstring == unique_cstr) return pos->value; } return fail_value; } //------------------------------------------------------------------ // Get a pointer to the first entry that matches "name". nullptr will // be returned if there is no entry that matches "name". // // The caller is responsible for ensuring that the collection does // not change during while using the returned pointer. //------------------------------------------------------------------ - const Entry *FindFirstValueForName(llvm::StringRef unique_cstr) const { + const Entry *FindFirstValueForName(ConstString unique_cstr) const { Entry search_entry(unique_cstr); const_iterator end = m_map.end(); const_iterator pos = std::lower_bound(m_map.begin(), end, search_entry); - if (pos != end) { - llvm::StringRef pos_cstr = pos->cstring; - if (pos_cstr == unique_cstr) - return &(*pos); - } + if (pos != end && pos->cstring == unique_cstr) + return &(*pos); return nullptr; } //------------------------------------------------------------------ // Get a pointer to the next entry that matches "name" from a // previously returned Entry pointer. nullptr will be returned if there // is no subsequent entry that matches "name". // // The caller is responsible for ensuring that the collection does // not change during while using the returned pointer. //------------------------------------------------------------------ const Entry *FindNextValueForName(const Entry *entry_ptr) const { if (!m_map.empty()) { const Entry *first_entry = &m_map[0]; const Entry *after_last_entry = first_entry + m_map.size(); const Entry *next_entry = entry_ptr + 1; if (first_entry <= next_entry && next_entry < after_last_entry) { if (next_entry->cstring == entry_ptr->cstring) return next_entry; } } return nullptr; } - size_t GetValues(llvm::StringRef unique_cstr, std::vector &values) const { + size_t GetValues(ConstString unique_cstr, std::vector &values) const { const size_t start_size = values.size(); Entry search_entry(unique_cstr); const_iterator pos, end = m_map.end(); for (pos = std::lower_bound(m_map.begin(), end, search_entry); pos != end; ++pos) { if (pos->cstring == unique_cstr) values.push_back(pos->value); else break; } return values.size() - start_size; } size_t GetValues(const RegularExpression ®ex, std::vector &values) const { const size_t start_size = values.size(); const_iterator pos, end = m_map.end(); for (pos = m_map.begin(); pos != end; ++pos) { - if (regex.Execute(pos->cstring)) + if (regex.Execute(pos->cstring.GetCString())) values.push_back(pos->value); } return values.size() - start_size; } //------------------------------------------------------------------ // Get the total number of entries in this map. //------------------------------------------------------------------ size_t GetSize() const { return m_map.size(); } //------------------------------------------------------------------ // Returns true if this map is empty. //------------------------------------------------------------------ bool IsEmpty() const { return m_map.empty(); } //------------------------------------------------------------------ // Reserve memory for at least "n" entries in the map. This is // useful to call when you know you will be adding a lot of entries // using UniqueCStringMap::Append() (which should be followed by a // call to UniqueCStringMap::Sort()) or to UniqueCStringMap::Insert(). //------------------------------------------------------------------ void Reserve(size_t n) { m_map.reserve(n); } //------------------------------------------------------------------ // Sort the unsorted contents in this map. A typical code flow would // be: // size_t approximate_num_entries = .... // UniqueCStringMap my_map; // my_map.Reserve (approximate_num_entries); // for (...) // { // my_map.Append (UniqueCStringMap::Entry(GetName(...), GetValue(...))); // } // my_map.Sort(); //------------------------------------------------------------------ void Sort() { std::sort(m_map.begin(), m_map.end()); } //------------------------------------------------------------------ // Since we are using a vector to contain our items it will always // double its memory consumption as things are added to the vector, // so if you intend to keep a UniqueCStringMap around and have // a lot of entries in the map, you will want to call this function // to create a new vector and copy _only_ the exact size needed as // part of the finalization of the string map. //------------------------------------------------------------------ void SizeToFit() { if (m_map.size() < m_map.capacity()) { collection temp(m_map.begin(), m_map.end()); m_map.swap(temp); } } - size_t Erase(llvm::StringRef unique_cstr) { + size_t Erase(ConstString unique_cstr) { size_t num_removed = 0; Entry search_entry(unique_cstr); iterator end = m_map.end(); iterator begin = m_map.begin(); iterator lower_pos = std::lower_bound(begin, end, search_entry); if (lower_pos != end) { if (lower_pos->cstring == unique_cstr) { iterator upper_pos = std::upper_bound(lower_pos, end, search_entry); if (lower_pos == upper_pos) { m_map.erase(lower_pos); num_removed = 1; } else { num_removed = std::distance(lower_pos, upper_pos); m_map.erase(lower_pos, upper_pos); } } } return num_removed; } protected: typedef std::vector collection; typedef typename collection::iterator iterator; typedef typename collection::const_iterator const_iterator; collection m_map; }; } // namespace lldb_private #endif // liblldb_UniqueCStringMap_h_ Index: vendor/lldb/dist/include/lldb/Host/Config.h =================================================================== --- vendor/lldb/dist/include/lldb/Host/Config.h (revision 317691) +++ vendor/lldb/dist/include/lldb/Host/Config.h (revision 317692) @@ -1,27 +1,31 @@ //===-- Config.h ------------------------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #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_CONFIG_TERMIOS_SUPPORTED 1 #define HAVE_SYS_EVENT_H 1 +#define HAVE_PPOLL 0 + +#define HAVE_SIGACTION 1 + #else #error This file is only used by the Xcode build. #endif #endif // #ifndef LLDB_HOST_CONFIG_H Index: vendor/lldb/dist/include/lldb/Host/Config.h.cmake =================================================================== --- vendor/lldb/dist/include/lldb/Host/Config.h.cmake (revision 317691) +++ vendor/lldb/dist/include/lldb/Host/Config.h.cmake (revision 317692) @@ -1,19 +1,23 @@ //===-- Config.h -----------------------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #ifndef LLDB_HOST_CONFIG_H #define LLDB_HOST_CONFIG_H #cmakedefine LLDB_CONFIG_TERMIOS_SUPPORTED #cmakedefine LLDB_DISABLE_POSIX #cmakedefine01 HAVE_SYS_EVENT_H +#cmakedefine01 HAVE_PPOLL + +#cmakedefine01 HAVE_SIGACTION + #endif // #ifndef LLDB_HOST_CONFIG_H Index: vendor/lldb/dist/include/lldb/Host/MainLoop.h =================================================================== --- vendor/lldb/dist/include/lldb/Host/MainLoop.h (revision 317691) +++ vendor/lldb/dist/include/lldb/Host/MainLoop.h (revision 317692) @@ -1,25 +1,105 @@ //===-- MainLoop.h ----------------------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #ifndef lldb_Host_MainLoop_h_ #define lldb_Host_MainLoop_h_ -#ifdef _WIN32 +#include "lldb/Host/Config.h" #include "lldb/Host/MainLoopBase.h" + +#include "llvm/ADT/DenseMap.h" + +#if !HAVE_PPOLL && !HAVE_SYS_EVENT_H +#define SIGNAL_POLLING_UNSUPPORTED 1 +#endif + namespace lldb_private { -typedef MainLoopBase MainLoop; -} -#else -#include "lldb/Host/posix/MainLoopPosix.h" -namespace lldb_private { -typedef MainLoopPosix MainLoop; -} + +// Implementation of the MainLoopBase class. It can monitor file descriptors for +// readability using ppoll, kqueue, poll or WSAPoll. On Windows it only supports +// polling sockets, and will not work on generic file handles or pipes. On +// systems without kqueue or ppoll handling singnals is not supported. In +// addition to the common base, this class provides the ability to invoke a +// given handler when a signal is received. +// +// Since this class is primarily intended to be used for single-threaded +// processing, it does not attempt to perform any internal synchronisation and +// any concurrent accesses must be protected externally. However, it is +// perfectly legitimate to have more than one instance of this class running on +// separate threads, or even a single thread (with some limitations on signal +// monitoring). +// TODO: Add locking if this class is to be used in a multi-threaded context. +class MainLoop : public MainLoopBase { +private: + class SignalHandle; + +public: + typedef std::unique_ptr SignalHandleUP; + + ~MainLoop() override; + + ReadHandleUP RegisterReadObject(const lldb::IOObjectSP &object_sp, + const Callback &callback, + Error &error) override; + + // Listening for signals from multiple MainLoop instances is perfectly safe as + // long as they don't try to listen for the same signal. The callback function + // is invoked when the control returns to the Run() function, not when the + // hander is executed. This mean that you can treat the callback as a normal + // function and perform things which would not be safe in a signal handler. + // However, since the callback is not invoked synchronously, you cannot use + // this mechanism to handle SIGSEGV and the like. + SignalHandleUP RegisterSignal(int signo, const Callback &callback, + Error &error); + + Error Run() override; + + // This should only be performed from a callback. Do not attempt to terminate + // the processing from another thread. + // TODO: Add synchronization if we want to be terminated from another thread. + void RequestTermination() override { m_terminate_request = true; } + +protected: + void UnregisterReadObject(IOObject::WaitableHandle handle) override; + + void UnregisterSignal(int signo); + +private: + class SignalHandle { + public: + ~SignalHandle() { m_mainloop.UnregisterSignal(m_signo); } + + private: + SignalHandle(MainLoop &mainloop, int signo) + : m_mainloop(mainloop), m_signo(signo) {} + + MainLoop &m_mainloop; + int m_signo; + + friend class MainLoop; + DISALLOW_COPY_AND_ASSIGN(SignalHandle); + }; + + struct SignalInfo { + Callback callback; +#if HAVE_SIGACTION + struct sigaction old_action; #endif + bool was_blocked : 1; + }; + class RunImpl; + + llvm::DenseMap m_read_fds; + llvm::DenseMap m_signals; + bool m_terminate_request : 1; +}; + +} // namespace lldb_private #endif // lldb_Host_MainLoop_h_ Index: vendor/lldb/dist/include/lldb/Host/PosixApi.h =================================================================== --- vendor/lldb/dist/include/lldb/Host/PosixApi.h (revision 317691) +++ vendor/lldb/dist/include/lldb/Host/PosixApi.h (revision 317692) @@ -1,23 +1,21 @@ //===-- PosixApi.h ----------------------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #ifndef liblldb_Host_PosixApi_h #define liblldb_Host_PosixApi_h // This file defines platform specific functions, macros, and types necessary // to provide a minimum level of compatibility across all platforms to rely // on various posix api functionality. -#include "llvm/Support/Compiler.h" - -#if defined(LLVM_ON_WIN32) +#if defined(_WIN32) #include "lldb/Host/windows/PosixApi.h" #endif #endif Index: vendor/lldb/dist/include/lldb/Host/Socket.h =================================================================== --- vendor/lldb/dist/include/lldb/Host/Socket.h (revision 317691) +++ vendor/lldb/dist/include/lldb/Host/Socket.h (revision 317692) @@ -1,124 +1,125 @@ //===-- Socket.h ------------------------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #ifndef liblldb_Host_Socket_h_ #define liblldb_Host_Socket_h_ #include #include #include "lldb/lldb-private.h" #include "lldb/Host/IOObject.h" #include "lldb/Host/Predicate.h" #include "lldb/Host/SocketAddress.h" #include "lldb/Utility/Error.h" #ifdef _WIN32 #include "lldb/Host/windows/windows.h" #include #include #endif namespace llvm { class StringRef; } namespace lldb_private { #if defined(_MSC_VER) typedef SOCKET NativeSocket; #else typedef int NativeSocket; #endif class Socket : public IOObject { public: typedef enum { ProtocolTcp, ProtocolUdp, ProtocolUnixDomain, ProtocolUnixAbstract } SocketProtocol; static const NativeSocket kInvalidSocketValue; ~Socket() override; static std::unique_ptr Create(const SocketProtocol protocol, bool child_processes_inherit, Error &error); virtual Error Connect(llvm::StringRef name) = 0; virtual Error Listen(llvm::StringRef name, int backlog) = 0; - virtual Error Accept(llvm::StringRef name, bool child_processes_inherit, - Socket *&socket) = 0; + virtual Error Accept(Socket *&socket) = 0; // Initialize a Tcp Socket object in listening mode. listen and accept are // implemented // separately because the caller may wish to manipulate or query the socket // after it is // initialized, but before entering a blocking accept. static Error TcpListen(llvm::StringRef host_and_port, bool child_processes_inherit, Socket *&socket, Predicate *predicate, int backlog = 5); static Error TcpConnect(llvm::StringRef host_and_port, bool child_processes_inherit, Socket *&socket); static Error UdpConnect(llvm::StringRef host_and_port, bool child_processes_inherit, Socket *&socket); static Error UnixDomainConnect(llvm::StringRef host_and_port, bool child_processes_inherit, Socket *&socket); static Error UnixDomainAccept(llvm::StringRef host_and_port, bool child_processes_inherit, Socket *&socket); static Error UnixAbstractConnect(llvm::StringRef host_and_port, bool child_processes_inherit, Socket *&socket); static Error UnixAbstractAccept(llvm::StringRef host_and_port, bool child_processes_inherit, Socket *&socket); int GetOption(int level, int option_name, int &option_value); int SetOption(int level, int option_name, int option_value); NativeSocket GetNativeSocket() const { return m_socket; } SocketProtocol GetSocketProtocol() const { return m_protocol; } Error Read(void *buf, size_t &num_bytes) override; Error Write(const void *buf, size_t &num_bytes) override; virtual Error PreDisconnect(); Error Close() override; bool IsValid() const override { return m_socket != kInvalidSocketValue; } WaitableHandle GetWaitableHandle() override; static bool DecodeHostAndPort(llvm::StringRef host_and_port, std::string &host_str, std::string &port_str, int32_t &port, Error *error_ptr); protected: - Socket(NativeSocket socket, SocketProtocol protocol, bool should_close); + Socket(SocketProtocol protocol, bool should_close, + bool m_child_process_inherit); virtual size_t Send(const void *buf, const size_t num_bytes); static void SetLastError(Error &error); static NativeSocket CreateSocket(const int domain, const int type, const int protocol, bool child_processes_inherit, Error &error); static NativeSocket AcceptSocket(NativeSocket sockfd, struct sockaddr *addr, socklen_t *addrlen, bool child_processes_inherit, Error &error); SocketProtocol m_protocol; NativeSocket m_socket; + bool m_child_processes_inherit; }; } // namespace lldb_private #endif // liblldb_Host_Socket_h_ Index: vendor/lldb/dist/include/lldb/Host/common/TCPSocket.h =================================================================== --- vendor/lldb/dist/include/lldb/Host/common/TCPSocket.h (revision 317691) +++ vendor/lldb/dist/include/lldb/Host/common/TCPSocket.h (revision 317692) @@ -1,45 +1,59 @@ //===-- TCPSocket.h ---------------------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #ifndef liblldb_TCPSocket_h_ #define liblldb_TCPSocket_h_ #include "lldb/Host/Socket.h" +#include "lldb/Host/SocketAddress.h" +#include namespace lldb_private { class TCPSocket : public Socket { public: - TCPSocket(NativeSocket socket, bool should_close); - TCPSocket(bool child_processes_inherit, Error &error); + TCPSocket(bool should_close, bool child_processes_inherit); + TCPSocket(NativeSocket socket, bool should_close, + bool child_processes_inherit); + ~TCPSocket() override; // returns port number or 0 if error uint16_t GetLocalPortNumber() const; // returns ip address string or empty string if error std::string GetLocalIPAddress() const; // must be connected // returns port number or 0 if error uint16_t GetRemotePortNumber() const; // must be connected // returns ip address string or empty string if error std::string GetRemoteIPAddress() const; int SetOptionNoDelay(); int SetOptionReuseAddress(); Error Connect(llvm::StringRef name) override; Error Listen(llvm::StringRef name, int backlog) override; - Error Accept(llvm::StringRef name, bool child_processes_inherit, - Socket *&conn_socket) override; + Error Accept(Socket *&conn_socket) override; + + Error CreateSocket(int domain); + + bool IsValid() const override; + +private: + TCPSocket(NativeSocket socket, const TCPSocket &listen_socket); + + void CloseListenSockets(); + + std::map m_listen_sockets; }; } #endif // ifndef liblldb_TCPSocket_h_ Index: vendor/lldb/dist/include/lldb/Host/common/UDPSocket.h =================================================================== --- vendor/lldb/dist/include/lldb/Host/common/UDPSocket.h (revision 317691) +++ vendor/lldb/dist/include/lldb/Host/common/UDPSocket.h (revision 317692) @@ -1,36 +1,37 @@ //===-- UDPSocket.h ---------------------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #ifndef liblldb_UDPSocket_h_ #define liblldb_UDPSocket_h_ #include "lldb/Host/Socket.h" namespace lldb_private { class UDPSocket : public Socket { public: - UDPSocket(bool child_processes_inherit, Error &error); + UDPSocket(bool should_close, bool child_processes_inherit); static Error Connect(llvm::StringRef name, bool child_processes_inherit, Socket *&socket); private: - UDPSocket(NativeSocket socket); + UDPSocket(NativeSocket socket, const UDPSocket &listen_socket); size_t Send(const void *buf, const size_t num_bytes) override; Error Connect(llvm::StringRef name) override; Error Listen(llvm::StringRef name, int backlog) override; - Error Accept(llvm::StringRef name, bool child_processes_inherit, - Socket *&socket) override; + Error Accept(Socket *&socket) override; + + Error CreateSocket(); SocketAddress m_sockaddr; }; } #endif // ifndef liblldb_UDPSocket_h_ Index: vendor/lldb/dist/include/lldb/Host/linux/AbstractSocket.h =================================================================== --- vendor/lldb/dist/include/lldb/Host/linux/AbstractSocket.h (revision 317691) +++ vendor/lldb/dist/include/lldb/Host/linux/AbstractSocket.h (revision 317692) @@ -1,26 +1,26 @@ //===-- AbstractSocket.h ----------------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #ifndef liblldb_AbstractSocket_h_ #define liblldb_AbstractSocket_h_ #include "lldb/Host/posix/DomainSocket.h" namespace lldb_private { class AbstractSocket : public DomainSocket { public: - AbstractSocket(bool child_processes_inherit, Error &error); + AbstractSocket(bool child_processes_inherit); protected: size_t GetNameOffset() const override; void DeleteSocketFile(llvm::StringRef name) override; }; } #endif // ifndef liblldb_AbstractSocket_h_ Index: vendor/lldb/dist/include/lldb/Host/posix/MainLoopPosix.h =================================================================== --- vendor/lldb/dist/include/lldb/Host/posix/MainLoopPosix.h (revision 317691) +++ vendor/lldb/dist/include/lldb/Host/posix/MainLoopPosix.h (nonexistent) @@ -1,104 +0,0 @@ -//===-- MainLoopPosix.h -----------------------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef lldb_Host_posix_MainLoopPosix_h_ -#define lldb_Host_posix_MainLoopPosix_h_ - -#include "lldb/Host/MainLoopBase.h" - -#include "llvm/ADT/DenseMap.h" - -namespace lldb_private { - -// Posix implementation of the MainLoopBase class. It can monitor file -// descriptors for -// readability using pselect. In addition to the common base, this class -// provides the ability to -// invoke a given handler when a signal is received. -// -// Since this class is primarily intended to be used for single-threaded -// processing, it does not -// attempt to perform any internal synchronisation and any concurrent accesses -// must be protected -// externally. However, it is perfectly legitimate to have more than one -// instance of this class -// running on separate threads, or even a single thread (with some limitations -// on signal -// monitoring). -// TODO: Add locking if this class is to be used in a multi-threaded context. -class MainLoopPosix : public MainLoopBase { -private: - class SignalHandle; - -public: - typedef std::unique_ptr SignalHandleUP; - - ~MainLoopPosix() override; - - ReadHandleUP RegisterReadObject(const lldb::IOObjectSP &object_sp, - const Callback &callback, - Error &error) override; - - // Listening for signals from multiple MainLoopPosix instances is perfectly - // safe as long as they - // don't try to listen for the same signal. The callback function is invoked - // when the control - // returns to the Run() function, not when the hander is executed. This means - // that you can - // treat the callback as a normal function and perform things which would not - // be safe in a - // signal handler. However, since the callback is not invoked synchronously, - // you cannot use - // this mechanism to handle SIGSEGV and the like. - SignalHandleUP RegisterSignal(int signo, const Callback &callback, - Error &error); - - Error Run() override; - - // This should only be performed from a callback. Do not attempt to terminate - // the processing - // from another thread. - // TODO: Add synchronization if we want to be terminated from another thread. - void RequestTermination() override { m_terminate_request = true; } - -protected: - void UnregisterReadObject(IOObject::WaitableHandle handle) override; - - void UnregisterSignal(int signo); - -private: - class SignalHandle { - public: - ~SignalHandle() { m_mainloop.UnregisterSignal(m_signo); } - - private: - SignalHandle(MainLoopPosix &mainloop, int signo) - : m_mainloop(mainloop), m_signo(signo) {} - - MainLoopPosix &m_mainloop; - int m_signo; - - friend class MainLoopPosix; - DISALLOW_COPY_AND_ASSIGN(SignalHandle); - }; - - struct SignalInfo { - Callback callback; - struct sigaction old_action; - bool was_blocked : 1; - }; - - llvm::DenseMap m_read_fds; - llvm::DenseMap m_signals; - bool m_terminate_request : 1; -}; - -} // namespace lldb_private - -#endif // lldb_Host_posix_MainLoopPosix_h_ Property changes on: vendor/lldb/dist/include/lldb/Host/posix/MainLoopPosix.h ___________________________________________________________________ Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: vendor/lldb/dist/include/lldb/Host/posix/DomainSocket.h =================================================================== --- vendor/lldb/dist/include/lldb/Host/posix/DomainSocket.h (revision 317691) +++ vendor/lldb/dist/include/lldb/Host/posix/DomainSocket.h (revision 317692) @@ -1,37 +1,35 @@ //===-- DomainSocket.h ------------------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #ifndef liblldb_DomainSocket_h_ #define liblldb_DomainSocket_h_ #include "lldb/Host/Socket.h" namespace lldb_private { class DomainSocket : public Socket { public: - DomainSocket(bool child_processes_inherit, Error &error); + DomainSocket(bool should_close, bool child_processes_inherit); Error Connect(llvm::StringRef name) override; Error Listen(llvm::StringRef name, int backlog) override; - Error Accept(llvm::StringRef name, bool child_processes_inherit, - Socket *&socket) override; + Error Accept(Socket *&socket) override; protected: - DomainSocket(SocketProtocol protocol, bool child_processes_inherit, - Error &error); + DomainSocket(SocketProtocol protocol, bool child_processes_inherit); virtual size_t GetNameOffset() const; virtual void DeleteSocketFile(llvm::StringRef name); private: - DomainSocket(NativeSocket socket); + DomainSocket(NativeSocket socket, const DomainSocket &listen_socket); }; } #endif // ifndef liblldb_DomainSocket_h_ Index: vendor/lldb/dist/include/lldb/Symbol/ObjectFile.h =================================================================== --- vendor/lldb/dist/include/lldb/Symbol/ObjectFile.h (revision 317691) +++ vendor/lldb/dist/include/lldb/Symbol/ObjectFile.h (revision 317692) @@ -1,876 +1,876 @@ //===-- ObjectFile.h --------------------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #ifndef liblldb_ObjectFile_h_ #define liblldb_ObjectFile_h_ #include "lldb/Core/FileSpecList.h" #include "lldb/Core/ModuleChild.h" #include "lldb/Core/PluginInterface.h" #include "lldb/Symbol/Symtab.h" #include "lldb/Symbol/UnwindTable.h" #include "lldb/Utility/DataExtractor.h" #include "lldb/Utility/Endian.h" #include "lldb/Utility/FileSpec.h" #include "lldb/Utility/UUID.h" #include "lldb/lldb-private.h" namespace lldb_private { class ObjectFileJITDelegate { public: ObjectFileJITDelegate() {} virtual ~ObjectFileJITDelegate() {} virtual lldb::ByteOrder GetByteOrder() const = 0; virtual uint32_t GetAddressByteSize() const = 0; virtual void PopulateSymtab(lldb_private::ObjectFile *obj_file, lldb_private::Symtab &symtab) = 0; virtual void PopulateSectionList(lldb_private::ObjectFile *obj_file, lldb_private::SectionList §ion_list) = 0; virtual bool GetArchitecture(lldb_private::ArchSpec &arch) = 0; }; //---------------------------------------------------------------------- /// @class ObjectFile ObjectFile.h "lldb/Symbol/ObjectFile.h" /// @brief A plug-in interface definition class for object file parsers. /// /// Object files belong to Module objects and know how to extract /// information from executable, shared library, and object (.o) files /// used by operating system runtime. The symbol table and section list /// for an object file. /// /// Object files can be represented by the entire file, or by part of a /// file. An example of a partial file ObjectFile is one that contains /// information for one of multiple architectures in the same file. /// /// Once an architecture is selected the object file information can be /// extracted from this abstract class. //---------------------------------------------------------------------- class ObjectFile : public std::enable_shared_from_this, public PluginInterface, public ModuleChild { friend class lldb_private::Module; public: typedef enum { 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 eTypeUnknown } Type; typedef enum { eStrataInvalid = 0, eStrataUnknown, eStrataUser, eStrataKernel, eStrataRawImage, eStrataJIT } Strata; //------------------------------------------------------------------ /// Construct with a parent module, offset, and header data. /// /// Object files belong to modules and a valid module must be /// supplied upon construction. The at an offset within a file for /// objects that contain more than one architecture or object. //------------------------------------------------------------------ ObjectFile(const lldb::ModuleSP &module_sp, const FileSpec *file_spec_ptr, lldb::offset_t file_offset, lldb::offset_t length, const lldb::DataBufferSP &data_sp, lldb::offset_t data_offset); ObjectFile(const lldb::ModuleSP &module_sp, const lldb::ProcessSP &process_sp, lldb::addr_t header_addr, lldb::DataBufferSP &data_sp); //------------------------------------------------------------------ /// Destructor. /// /// The destructor is virtual since this class is designed to be /// inherited from by the plug-in instance. //------------------------------------------------------------------ ~ObjectFile() override; //------------------------------------------------------------------ /// Dump a description of this object to a Stream. /// /// Dump a description of the current contents of this object /// to the supplied stream \a s. The dumping should include the /// section list if it has been parsed, and the symbol table /// if it has been parsed. /// /// @param[in] s /// The stream to which to dump the object description. //------------------------------------------------------------------ virtual void Dump(Stream *s) = 0; //------------------------------------------------------------------ /// Find a ObjectFile plug-in that can parse \a file_spec. /// /// Scans all loaded plug-in interfaces that implement versions of /// the ObjectFile plug-in interface and returns the first /// instance that can parse the file. /// /// @param[in] module /// The parent module that owns this object file. /// /// @param[in] file_spec /// A file specification that indicates which file to use as the /// object file. /// /// @param[in] file_offset /// The offset into the file at which to start parsing the /// object. This is for files that contain multiple /// architectures or objects. /// /// @param[in] file_size /// The size of the current object file if it can be determined /// or if it is known. This can be zero. /// /// @see ObjectFile::ParseHeader() //------------------------------------------------------------------ static lldb::ObjectFileSP FindPlugin(const lldb::ModuleSP &module_sp, const FileSpec *file_spec, lldb::offset_t file_offset, lldb::offset_t file_size, lldb::DataBufferSP &data_sp, lldb::offset_t &data_offset); //------------------------------------------------------------------ /// Find a ObjectFile plug-in that can parse a file in memory. /// /// Scans all loaded plug-in interfaces that implement versions of /// the ObjectFile plug-in interface and returns the first /// instance that can parse the file. /// /// @param[in] module /// The parent module that owns this object file. /// /// @param[in] process_sp /// A shared pointer to the process whose memory space contains /// an object file. This will be stored as a std::weak_ptr. /// /// @param[in] header_addr /// The address of the header for the object file in memory. //------------------------------------------------------------------ static lldb::ObjectFileSP FindPlugin(const lldb::ModuleSP &module_sp, const lldb::ProcessSP &process_sp, lldb::addr_t header_addr, lldb::DataBufferSP &file_data_sp); static size_t GetModuleSpecifications(const FileSpec &file, lldb::offset_t file_offset, lldb::offset_t file_size, ModuleSpecList &specs); static size_t GetModuleSpecifications(const lldb_private::FileSpec &file, lldb::DataBufferSP &data_sp, lldb::offset_t data_offset, lldb::offset_t file_offset, lldb::offset_t file_size, lldb_private::ModuleSpecList &specs); //------------------------------------------------------------------ /// Split a path into a file path with object name. /// /// For paths like "/tmp/foo.a(bar.o)" we often need to split a path /// up into the actual path name and into the object name so we can /// make a valid object file from it. /// /// @param[in] path_with_object /// A path that might contain an archive path with a .o file /// specified in parens in the basename of the path. /// /// @param[out] archive_file /// If \b true is returned, \a file_spec will be filled in with /// the path to the archive. /// /// @param[out] archive_object /// If \b true is returned, \a object will be filled in with /// the name of the object inside the archive. /// /// @return /// \b true if the path matches the pattern of archive + object /// and \a archive_file and \a archive_object are modified, /// \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, lldb_private::ConstString &archive_object, bool must_exist); //------------------------------------------------------------------ /// Gets the address size in bytes for the current object file. /// /// @return /// The size of an address in bytes for the currently selected /// architecture (and object for archives). Returns zero if no /// architecture or object has been selected. //------------------------------------------------------------------ virtual uint32_t GetAddressByteSize() const = 0; //------------------------------------------------------------------ /// Get the address type given a file address in an object file. /// /// Many binary file formats know what kinds /// This is primarily for ARM binaries, though it can be applied to /// any executable file format that supports different opcode types /// within the same binary. ARM binaries support having both ARM and /// Thumb within the same executable container. We need to be able /// to get /// @return /// The size of an address in bytes for the currently selected /// architecture (and object for archives). Returns zero if no /// architecture or object has been selected. //------------------------------------------------------------------ virtual lldb::AddressClass GetAddressClass(lldb::addr_t file_addr); //------------------------------------------------------------------ /// Extract the dependent modules from an object file. /// /// If an object file has information about which other images it /// depends on (such as shared libraries), this function will /// provide the list. Since many executables or shared libraries /// may depend on the same files, /// FileSpecList::AppendIfUnique(const FileSpec &) should be /// used to make sure any files that are added are not already in /// the list. /// /// @param[out] file_list /// A list of file specification objects that gets dependent /// files appended to. /// /// @return /// The number of new files that were appended to \a file_list. /// /// @see FileSpecList::AppendIfUnique(const FileSpec &) //------------------------------------------------------------------ virtual uint32_t GetDependentModules(FileSpecList &file_list) = 0; //------------------------------------------------------------------ /// Tells whether this object file is capable of being the main executable /// for a process. /// /// @return /// \b true if it is, \b false otherwise. //------------------------------------------------------------------ virtual bool IsExecutable() const = 0; //------------------------------------------------------------------ /// Returns the offset into a file at which this object resides. /// /// Some files contain many object files, and this function allows /// access to an object's offset within the file. /// /// @return /// The offset in bytes into the file. Defaults to zero for /// simple object files that a represented by an entire file. //------------------------------------------------------------------ virtual lldb::addr_t GetFileOffset() const { return m_file_offset; } virtual lldb::addr_t GetByteSize() const { return m_length; } //------------------------------------------------------------------ /// Get accessor to the object file specification. /// /// @return /// The file specification object pointer if there is one, or /// NULL if this object is only from memory. //------------------------------------------------------------------ virtual FileSpec &GetFileSpec() { return m_file; } //------------------------------------------------------------------ /// Get const accessor to the object file specification. /// /// @return /// The const file specification object pointer if there is one, /// or NULL if this object is only from memory. //------------------------------------------------------------------ virtual const FileSpec &GetFileSpec() const { return m_file; } //------------------------------------------------------------------ /// Get the name of the cpu, vendor and OS for this object file. /// /// This value is a string that represents the target triple where /// the cpu type, the vendor and the OS are encoded into a string. /// /// @param[out] target_triple /// The string value of the target triple. /// /// @return /// \b True if the target triple was able to be computed, \b /// false otherwise. //------------------------------------------------------------------ virtual bool GetArchitecture(ArchSpec &arch) = 0; //------------------------------------------------------------------ /// Gets the section list for the currently selected architecture /// (and object for archives). /// /// Section list parsing can be deferred by ObjectFile instances /// until this accessor is called the first time. /// /// @return /// The list of sections contained in this object file. //------------------------------------------------------------------ virtual SectionList *GetSectionList(bool update_module_section_list = true); virtual void CreateSections(SectionList &unified_section_list) = 0; //------------------------------------------------------------------ /// Notify the ObjectFile that the file addresses in the Sections /// for this module have been changed. //------------------------------------------------------------------ virtual void SectionFileAddressesChanged() {} //------------------------------------------------------------------ /// Gets the symbol table for the currently selected architecture /// (and object for archives). /// /// Symbol table parsing can be deferred by ObjectFile instances /// until this accessor is called the first time. /// /// @return /// The symbol table for this object file. //------------------------------------------------------------------ virtual Symtab *GetSymtab() = 0; //------------------------------------------------------------------ /// Appends a Symbol for the specified so_addr to the symbol table. /// /// If verify_unique is false, the symbol table is not searched /// to determine if a Symbol found at this address has already been /// added to the symbol table. When verify_unique is true, this /// method resolves the Symbol as the first match in the SymbolTable /// and appends a Symbol only if required/found. /// /// @return /// The resolved symbol or nullptr. Returns nullptr if a /// a Symbol could not be found for the specified so_addr. //------------------------------------------------------------------ virtual Symbol *ResolveSymbolForAddress(const Address &so_addr, bool verify_unique) { // Typically overridden to lazily add stripped symbols recoverable from // the exception handling unwind information (i.e. without parsing // the entire eh_frame section. // // The availability of LC_FUNCTION_STARTS allows ObjectFileMachO // to efficiently add stripped symbols when the symbol table is // first constructed. Poorer cousins are PECoff and ELF. return nullptr; } //------------------------------------------------------------------ /// Detect if this object file has been stripped of local symbols. //------------------------------------------------------------------ /// Detect if this object file has been stripped of local symbols. /// /// @return /// Return \b true if the object file has been stripped of local /// symbols. //------------------------------------------------------------------ virtual bool IsStripped() = 0; //------------------------------------------------------------------ /// 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. /// /// If the object file format contains a UUID, the value should be /// returned. Else ObjectFile instances should return the MD5 /// checksum of all of the bytes for the object file (or memory for /// memory based object files). /// /// @return /// Returns \b true if a UUID was successfully extracted into /// \a uuid, \b false otherwise. //------------------------------------------------------------------ virtual bool GetUUID(lldb_private::UUID *uuid) = 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 /// symbols from another, /// the re-exported libraries will be returned in the FileSpecList. /// /// @return /// Returns filespeclist. //------------------------------------------------------------------ virtual lldb_private::FileSpecList GetReExportedLibraries() { return FileSpecList(); } //------------------------------------------------------------------ /// Sets the load address for an entire module, assuming a rigid /// slide of sections, if possible in the implementation. /// /// @return /// Returns true iff any section's load address changed. //------------------------------------------------------------------ virtual bool SetLoadAddress(Target &target, lldb::addr_t value, bool value_is_offset) { return false; } //------------------------------------------------------------------ /// Gets whether endian swapping should occur when extracting data /// from this object file. /// /// @return /// Returns \b true if endian swapping is needed, \b false /// otherwise. //------------------------------------------------------------------ virtual lldb::ByteOrder GetByteOrder() const = 0; //------------------------------------------------------------------ /// Attempts to parse the object header. /// /// This function is used as a test to see if a given plug-in /// instance can parse the header data already contained in /// ObjectFile::m_data. If an object file parser does not /// recognize that magic bytes in a header, false should be returned /// and the next plug-in can attempt to parse an object file. /// /// @return /// Returns \b true if the header was parsed successfully, \b /// false otherwise. //------------------------------------------------------------------ virtual bool ParseHeader() = 0; //------------------------------------------------------------------ /// Returns a reference to the UnwindTable for this ObjectFile /// /// The UnwindTable contains FuncUnwinders objects for any function in /// this ObjectFile. If a FuncUnwinders object hasn't been created yet /// (i.e. the function has yet to be unwound in a stack walk), it /// will be created when requested. Specifically, we do not create /// FuncUnwinders objects for functions until they are needed. /// /// @return /// Returns the unwind table for this object file. //------------------------------------------------------------------ virtual lldb_private::UnwindTable &GetUnwindTable() { return m_unwind_table; } //------------------------------------------------------------------ /// Returns if the function bounds for symbols in this symbol file /// are likely accurate. /// /// The unwinder can emulate the instructions of functions to understand /// prologue/epilogue code sequences, where registers are spilled on /// the stack, etc. This feature relies on having the correct start /// addresses of all functions. If the ObjectFile has a way to tell /// that symbols have been stripped and there's no way to reconstruct /// start addresses (e.g. LC_FUNCTION_STARTS on Mach-O, or eh_frame /// unwind info), the ObjectFile should indicate that assembly emulation /// should not be used for this module. /// /// It is uncommon for this to return false. An ObjectFile needs to /// be sure that symbol start addresses are unavailable before false /// is returned. If it is unclear, this should return true. /// /// @return /// Returns true if assembly emulation should be used for this /// module. /// Only returns false if the ObjectFile is sure that symbol /// addresses are insufficient for accurate assembly emulation. //------------------------------------------------------------------ virtual bool AllowAssemblyEmulationUnwindPlans() { return true; } //------------------------------------------------------------------ /// Similar to Process::GetImageInfoAddress(). /// /// Some platforms embed auxiliary structures useful to debuggers in the /// address space of the inferior process. This method returns the address /// of such a structure if the information can be resolved via entries in /// the object file. ELF, for example, provides a means to hook into the /// runtime linker so that a debugger may monitor the loading and unloading /// of shared libraries. /// /// @return /// The address of any auxiliary tables, or an invalid address if this /// object file format does not support or contain such information. virtual lldb_private::Address GetImageInfoAddress(Target *target) { return Address(); } //------------------------------------------------------------------ /// Returns the address of the Entry Point in this object file - if /// the object file doesn't have an entry point (because it is not an /// executable file) then an invalid address is returned. /// /// @return /// Returns the entry address for this module. //------------------------------------------------------------------ virtual lldb_private::Address GetEntryPointAddress() { return Address(); } //------------------------------------------------------------------ /// Returns the address that represents the header of this object /// file. /// /// The header address is defined as where the header for the object /// file is that describes the content of the file. If the header /// doesn't appear in a section that is defined in the object file, /// an address with no section is returned that has the file offset /// set in the m_file_offset member of the lldb_private::Address object. /// /// @return /// Returns the entry address for this module. //------------------------------------------------------------------ virtual lldb_private::Address GetHeaderAddress() { return Address(m_memory_addr); } virtual uint32_t GetNumThreadContexts() { return 0; } //------------------------------------------------------------------ /// Some object files may have an identifier string embedded in them, /// e.g. in a Mach-O core file using the LC_IDENT load command (which /// is obsolete, but can still be found in some old files) /// /// @return /// Returns the identifier string if one exists, else an empty /// string. //------------------------------------------------------------------ virtual std::string GetIdentifierString () { return std::string(); } //------------------------------------------------------------------ /// When the ObjectFile is a core file, lldb needs to locate the /// "binary" in the core file. lldb can iterate over the pages looking /// for a valid binary, but some core files may have metadata /// describing where the main binary is exactly which removes ambiguity /// when there are multiple binaries present in the captured memory pages. /// /// @param[out] address /// If the address of the binary is specified, this will be set. /// This is an address is the virtual address space of the core file /// memory segments; it is not an offset into the object file. /// If no address is available, will be set to LLDB_INVALID_ADDRESS. /// /// @param[out] uuid /// If the uuid of the binary is specified, this will be set. /// If no UUID is available, will be cleared. /// /// @return /// Returns true if either address or uuid has been set. //------------------------------------------------------------------ virtual bool GetCorefileMainBinaryInfo (lldb::addr_t &address, UUID &uuid) { address = LLDB_INVALID_ADDRESS; uuid.Clear(); return false; } virtual lldb::RegisterContextSP GetThreadContextAtIndex(uint32_t idx, lldb_private::Thread &thread) { return lldb::RegisterContextSP(); } //------------------------------------------------------------------ /// The object file should be able to calculate its type by looking /// at its file header and possibly the sections or other data in /// the object file. The file type is used in the debugger to help /// select the correct plug-ins for the job at hand, so this is /// important to get right. If any eTypeXXX definitions do not match /// up with the type of file you are loading, please feel free to /// add a new enumeration value. /// /// @return /// The calculated file type for the current object file. //------------------------------------------------------------------ virtual Type CalculateType() = 0; //------------------------------------------------------------------ /// In cases where the type can't be calculated (elf files), this /// routine allows someone to explicitly set it. As an example, /// SymbolVendorELF uses this routine to set eTypeDebugInfo when /// loading debug link files. virtual void SetType(Type type) { m_type = type; } //------------------------------------------------------------------ /// The object file should be able to calculate the strata of the /// object file. /// /// Many object files for platforms might be for either user space /// debugging or for kernel debugging. If your object file subclass /// can figure this out, it will help with debugger plug-in selection /// when it comes time to debug. /// /// @return /// The calculated object file strata for the current object /// file. //------------------------------------------------------------------ virtual Strata CalculateStrata() = 0; //------------------------------------------------------------------ /// Get the object file version numbers. /// /// Many object files have a set of version numbers that describe /// the version of the executable or shared library. Typically there /// are major, minor and build, but there may be more. This function /// will extract the versions from object files if they are available. /// /// If \a versions is NULL, or if \a num_versions is 0, the return /// value will indicate how many version numbers are available in /// this object file. Then a subsequent call can be made to this /// function with a value of \a versions and \a num_versions that /// has enough storage to store some or all version numbers. /// /// @param[out] versions /// A pointer to an array of uint32_t types that is \a num_versions /// long. If this value is NULL, the return value will indicate /// how many version numbers are required for a subsequent call /// to this function so that all versions can be retrieved. If /// the value is non-NULL, then at most \a num_versions of the /// existing versions numbers will be filled into \a versions. /// If there is no version information available, \a versions /// will be filled with \a num_versions UINT32_MAX values /// and zero will be returned. /// /// @param[in] num_versions /// The maximum number of entries to fill into \a versions. If /// this value is zero, then the return value will indicate /// how many version numbers there are in total so another call /// to this function can be make with adequate storage in /// \a versions to get all of the version numbers. If \a /// num_versions is less than the actual number of version /// numbers in this object file, only \a num_versions will be /// filled into \a versions (if \a versions is non-NULL). /// /// @return /// This function always returns the number of version numbers /// that this object file has regardless of the number of /// version numbers that were copied into \a versions. //------------------------------------------------------------------ virtual uint32_t GetVersion(uint32_t *versions, uint32_t num_versions) { if (versions && num_versions) { for (uint32_t i = 0; i < num_versions; ++i) versions[i] = UINT32_MAX; } return 0; } //------------------------------------------------------------------ /// Get the minimum OS version this object file can run on. /// /// Some object files have information that specifies the minimum OS /// version that they can be used on. /// /// If \a versions is NULL, or if \a num_versions is 0, the return /// value will indicate how many version numbers are available in /// this object file. Then a subsequent call can be made to this /// function with a value of \a versions and \a num_versions that /// has enough storage to store some or all version numbers. /// /// @param[out] versions /// A pointer to an array of uint32_t types that is \a num_versions /// long. If this value is NULL, the return value will indicate /// how many version numbers are required for a subsequent call /// to this function so that all versions can be retrieved. If /// the value is non-NULL, then at most \a num_versions of the /// existing versions numbers will be filled into \a versions. /// If there is no version information available, \a versions /// will be filled with \a num_versions UINT32_MAX values /// and zero will be returned. /// /// @param[in] num_versions /// The maximum number of entries to fill into \a versions. If /// this value is zero, then the return value will indicate /// how many version numbers there are in total so another call /// to this function can be make with adequate storage in /// \a versions to get all of the version numbers. If \a /// num_versions is less than the actual number of version /// numbers in this object file, only \a num_versions will be /// filled into \a versions (if \a versions is non-NULL). /// /// @return /// This function always returns the number of version numbers /// that this object file has regardless of the number of /// version numbers that were copied into \a versions. //------------------------------------------------------------------ virtual uint32_t GetMinimumOSVersion(uint32_t *versions, uint32_t num_versions) { if (versions && num_versions) { for (uint32_t i = 0; i < num_versions; ++i) versions[i] = UINT32_MAX; } return 0; } //------------------------------------------------------------------ /// Get the SDK OS version this object file was built with. /// /// The versions arguments and returns values are the same as the /// GetMinimumOSVersion() //------------------------------------------------------------------ virtual uint32_t GetSDKVersion(uint32_t *versions, uint32_t num_versions) { if (versions && num_versions) { for (uint32_t i = 0; i < num_versions; ++i) versions[i] = UINT32_MAX; } return 0; } //------------------------------------------------------------------ /// Return true if this file is a dynamic link editor (dyld) /// /// Often times dyld has symbols that mirror symbols in libc and /// other shared libraries (like "malloc" and "free") and the user /// does _not_ want to stop in these shared libraries by default. /// We can ask the ObjectFile if it is such a file and should be /// avoided for things like settings breakpoints and doing function /// lookups for expressions. //------------------------------------------------------------------ virtual bool GetIsDynamicLinkEditor() { return false; } //------------------------------------------------------------------ // Member Functions //------------------------------------------------------------------ Type GetType() { if (m_type == eTypeInvalid) m_type = CalculateType(); return m_type; } Strata GetStrata() { if (m_strata == eStrataInvalid) m_strata = CalculateStrata(); return m_strata; } // When an object file is in memory, subclasses should try and lock // the process weak pointer. If the process weak pointer produces a // valid ProcessSP, then subclasses can call this function to read // memory. static lldb::DataBufferSP ReadMemory(const lldb::ProcessSP &process_sp, lldb::addr_t addr, size_t byte_size); size_t GetData(lldb::offset_t offset, size_t length, DataExtractor &data) const; size_t CopyData(lldb::offset_t offset, size_t length, void *dst) const; virtual size_t ReadSectionData(const Section *section, lldb::offset_t section_offset, void *dst, size_t dst_len) const; virtual size_t ReadSectionData(const Section *section, DataExtractor §ion_data) const; size_t MemoryMapSectionData(const Section *section, DataExtractor §ion_data) const; bool IsInMemory() const { return m_memory_addr != LLDB_INVALID_ADDRESS; } // Strip linker annotations (such as @@VERSION) from symbol names. - virtual std::string + virtual llvm::StringRef StripLinkerSymbolAnnotations(llvm::StringRef symbol_name) const { - return symbol_name.str(); + return symbol_name; } static lldb::SymbolType GetSymbolTypeFromName( llvm::StringRef name, lldb::SymbolType symbol_type_hint = lldb::eSymbolTypeUndefined); //------------------------------------------------------------------ /// Loads this objfile to memory. /// /// Loads the bits needed to create an executable image to the memory. /// It is useful with bare-metal targets where target does not have the /// ability to start a process itself. /// /// @param[in] target /// Target where to load. /// /// @return //------------------------------------------------------------------ virtual Error LoadInMemory(Target &target, bool set_pc); protected: //------------------------------------------------------------------ // Member variables. //------------------------------------------------------------------ FileSpec m_file; Type m_type; Strata m_strata; lldb::addr_t m_file_offset; ///< The offset in bytes into the file, or the ///address in memory lldb::addr_t m_length; ///< The length of this object file if it is known (can ///be zero if length is unknown or can't be ///determined). DataExtractor m_data; ///< The data for this object file so things can be parsed lazily. lldb_private::UnwindTable m_unwind_table; /// < Table of FuncUnwinders objects /// created for this ObjectFile's /// functions lldb::ProcessWP m_process_wp; const lldb::addr_t m_memory_addr; std::unique_ptr m_sections_ap; std::unique_ptr m_symtab_ap; uint32_t m_synthetic_symbol_idx; //------------------------------------------------------------------ /// Sets the architecture for a module. At present the architecture /// can only be set if it is invalid. It is not allowed to switch from /// one concrete architecture to another. /// /// @param[in] new_arch /// The architecture this module will be set to. /// /// @return /// Returns \b true if the architecture was changed, \b /// false otherwise. //------------------------------------------------------------------ bool SetModulesArchitecture(const ArchSpec &new_arch); ConstString GetNextSyntheticSymbolName(); private: DISALLOW_COPY_AND_ASSIGN(ObjectFile); }; } // namespace lldb_private #endif // liblldb_ObjectFile_h_ Index: vendor/lldb/dist/include/lldb/Symbol/SymbolFile.h =================================================================== --- vendor/lldb/dist/include/lldb/Symbol/SymbolFile.h (revision 317691) +++ vendor/lldb/dist/include/lldb/Symbol/SymbolFile.h (revision 317692) @@ -1,212 +1,214 @@ //===-- SymbolFile.h --------------------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #ifndef liblldb_SymbolFile_h_ #define liblldb_SymbolFile_h_ #include "lldb/Core/PluginInterface.h" #include "lldb/Symbol/CompilerDecl.h" #include "lldb/Symbol/CompilerDeclContext.h" #include "lldb/Symbol/CompilerType.h" #include "lldb/Symbol/Type.h" #include "lldb/lldb-private.h" #include "llvm/ADT/DenseSet.h" namespace lldb_private { class SymbolFile : public PluginInterface { public: //------------------------------------------------------------------ // Symbol file ability bits. // // Each symbol file can claim to support one or more symbol file // abilities. These get returned from SymbolFile::GetAbilities(). // These help us to determine which plug-in will be best to load // the debug information found in files. //------------------------------------------------------------------ enum Abilities { CompileUnits = (1u << 0), LineTables = (1u << 1), Functions = (1u << 2), Blocks = (1u << 3), GlobalVariables = (1u << 4), LocalVariables = (1u << 5), VariableTypes = (1u << 6), kAllAbilities = ((1u << 7) - 1u) }; static SymbolFile *FindPlugin(ObjectFile *obj_file); //------------------------------------------------------------------ // Constructors and Destructors //------------------------------------------------------------------ SymbolFile(ObjectFile *obj_file) : m_obj_file(obj_file), m_abilities(0), m_calculated_abilities(false) {} ~SymbolFile() override {} //------------------------------------------------------------------ /// Get a mask of what this symbol file supports for the object file /// that it was constructed with. /// /// Each symbol file gets to respond with a mask of abilities that /// it supports for each object file. This happens when we are /// trying to figure out which symbol file plug-in will get used /// for a given object file. The plug-in that responds with the /// best mix of "SymbolFile::Abilities" bits set, will get chosen to /// be the symbol file parser. This allows each plug-in to check for /// sections that contain data a symbol file plug-in would need. For /// example the DWARF plug-in requires DWARF sections in a file that /// contain debug information. If the DWARF plug-in doesn't find /// these sections, it won't respond with many ability bits set, and /// we will probably fall back to the symbol table SymbolFile plug-in /// which uses any information in the symbol table. Also, plug-ins /// might check for some specific symbols in a symbol table in the /// case where the symbol table contains debug information (STABS /// and COFF). Not a lot of work should happen in these functions /// as the plug-in might not get selected due to another plug-in /// having more abilities. Any initialization work should be saved /// for "void SymbolFile::InitializeObject()" which will get called /// on the SymbolFile object with the best set of abilities. /// /// @return /// A uint32_t mask containing bits from the SymbolFile::Abilities /// enumeration. Any bits that are set represent an ability that /// this symbol plug-in can parse from the object file. ///------------------------------------------------------------------ uint32_t GetAbilities() { if (!m_calculated_abilities) { m_abilities = CalculateAbilities(); m_calculated_abilities = true; } return m_abilities; } virtual uint32_t CalculateAbilities() = 0; //------------------------------------------------------------------ /// Initialize the SymbolFile object. /// /// The SymbolFile object with the best set of abilities (detected /// in "uint32_t SymbolFile::GetAbilities()) will have this function /// called if it is chosen to parse an object file. More complete /// initialization can happen in this function which will get called /// prior to any other functions in the SymbolFile protocol. //------------------------------------------------------------------ virtual void InitializeObject() {} //------------------------------------------------------------------ // Compile Unit function calls //------------------------------------------------------------------ // Approach 1 - iterator virtual uint32_t GetNumCompileUnits() = 0; virtual lldb::CompUnitSP ParseCompileUnitAtIndex(uint32_t index) = 0; virtual lldb::LanguageType ParseCompileUnitLanguage(const SymbolContext &sc) = 0; virtual size_t ParseCompileUnitFunctions(const SymbolContext &sc) = 0; virtual bool ParseCompileUnitLineTable(const SymbolContext &sc) = 0; virtual bool ParseCompileUnitDebugMacros(const SymbolContext &sc) = 0; virtual bool ParseCompileUnitSupportFiles(const SymbolContext &sc, FileSpecList &support_files) = 0; virtual bool ParseCompileUnitIsOptimized(const lldb_private::SymbolContext &sc) { return false; } virtual bool ParseImportedModules(const SymbolContext &sc, std::vector &imported_modules) = 0; virtual size_t ParseFunctionBlocks(const SymbolContext &sc) = 0; virtual size_t ParseTypes(const SymbolContext &sc) = 0; virtual size_t ParseVariablesForContext(const SymbolContext &sc) = 0; virtual Type *ResolveTypeUID(lldb::user_id_t type_uid) = 0; virtual bool CompleteType(CompilerType &compiler_type) = 0; virtual void ParseDeclsForContext(CompilerDeclContext decl_ctx) {} virtual CompilerDecl GetDeclForUID(lldb::user_id_t uid) { return CompilerDecl(); } virtual CompilerDeclContext GetDeclContextForUID(lldb::user_id_t uid) { return CompilerDeclContext(); } virtual CompilerDeclContext GetDeclContextContainingUID(lldb::user_id_t uid) { return CompilerDeclContext(); } virtual uint32_t ResolveSymbolContext(const Address &so_addr, uint32_t resolve_scope, SymbolContext &sc) = 0; virtual uint32_t ResolveSymbolContext(const FileSpec &file_spec, uint32_t line, bool check_inlines, uint32_t resolve_scope, SymbolContextList &sc_list); virtual uint32_t FindGlobalVariables(const ConstString &name, const CompilerDeclContext *parent_decl_ctx, bool append, uint32_t max_matches, VariableList &variables); virtual uint32_t FindGlobalVariables(const RegularExpression ®ex, bool append, uint32_t max_matches, VariableList &variables); virtual uint32_t FindFunctions(const ConstString &name, const CompilerDeclContext *parent_decl_ctx, uint32_t name_type_mask, bool include_inlines, bool append, SymbolContextList &sc_list); virtual uint32_t FindFunctions(const RegularExpression ®ex, bool include_inlines, bool append, SymbolContextList &sc_list); virtual uint32_t FindTypes(const SymbolContext &sc, const ConstString &name, const CompilerDeclContext *parent_decl_ctx, bool append, uint32_t max_matches, llvm::DenseSet &searched_symbol_files, TypeMap &types); virtual size_t FindTypes(const std::vector &context, bool append, TypeMap &types); virtual void GetMangledNamesForFunction(const std::string &scope_qualified_name, std::vector &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, uint32_t type_mask, lldb_private::TypeList &type_list) = 0; + virtual void PreloadSymbols(); + virtual lldb_private::TypeSystem * GetTypeSystemForLanguage(lldb::LanguageType language); virtual CompilerDeclContext FindNamespace(const SymbolContext &sc, const ConstString &name, const CompilerDeclContext *parent_decl_ctx) { return CompilerDeclContext(); } ObjectFile *GetObjectFile() { return m_obj_file; } const ObjectFile *GetObjectFile() const { return m_obj_file; } //------------------------------------------------------------------ /// Notify the SymbolFile that the file addresses in the Sections /// for this module have been changed. //------------------------------------------------------------------ virtual void SectionFileAddressesChanged() {} protected: ObjectFile *m_obj_file; // The object file that symbols can be extracted from. uint32_t m_abilities; bool m_calculated_abilities; private: DISALLOW_COPY_AND_ASSIGN(SymbolFile); }; } // namespace lldb_private #endif // liblldb_SymbolFile_h_ Index: vendor/lldb/dist/include/lldb/Symbol/Symtab.h =================================================================== --- vendor/lldb/dist/include/lldb/Symbol/Symtab.h (revision 317691) +++ vendor/lldb/dist/include/lldb/Symbol/Symtab.h (revision 317692) @@ -1,204 +1,205 @@ //===-- Symtab.h ------------------------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #ifndef liblldb_Symtab_h_ #define liblldb_Symtab_h_ #include #include #include "lldb/Core/RangeMap.h" #include "lldb/Core/UniqueCStringMap.h" #include "lldb/Symbol/Symbol.h" #include "lldb/lldb-private.h" namespace lldb_private { class Symtab { public: typedef std::vector IndexCollection; typedef UniqueCStringMap NameToIndexMap; typedef enum Debug { eDebugNo, // Not a debug symbol eDebugYes, // A debug symbol eDebugAny } Debug; typedef enum Visibility { eVisibilityAny, eVisibilityExtern, eVisibilityPrivate } Visibility; Symtab(ObjectFile *objfile); ~Symtab(); + void PreloadSymbols(); void Reserve(size_t count); Symbol *Resize(size_t count); 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 &indexes) const; uint32_t GetIndexForSymbol(const Symbol *symbol) const; std::recursive_mutex &GetMutex() { return m_mutex; } Symbol *FindSymbolByID(lldb::user_id_t uid) const; Symbol *SymbolAtIndex(size_t idx); const Symbol *SymbolAtIndex(size_t idx) const; Symbol *FindSymbolWithType(lldb::SymbolType symbol_type, Debug symbol_debug_type, Visibility symbol_visibility, uint32_t &start_idx); //---------------------------------------------------------------------- /// Get the parent symbol for the given symbol. /// /// Many symbols in symbol tables are scoped by other symbols that /// contain one or more symbol. This function will look for such a /// containing symbol and return it if there is one. //---------------------------------------------------------------------- const Symbol *GetParent(Symbol *symbol) const; uint32_t AppendSymbolIndexesWithType(lldb::SymbolType symbol_type, std::vector &indexes, uint32_t start_idx = 0, uint32_t end_index = UINT32_MAX) const; uint32_t AppendSymbolIndexesWithTypeAndFlagsValue( lldb::SymbolType symbol_type, uint32_t flags_value, std::vector &indexes, uint32_t start_idx = 0, uint32_t end_index = UINT32_MAX) const; uint32_t AppendSymbolIndexesWithType(lldb::SymbolType symbol_type, Debug symbol_debug_type, Visibility symbol_visibility, std::vector &matches, uint32_t start_idx = 0, uint32_t end_index = UINT32_MAX) const; uint32_t AppendSymbolIndexesWithName(const ConstString &symbol_name, std::vector &matches); uint32_t AppendSymbolIndexesWithName(const ConstString &symbol_name, Debug symbol_debug_type, Visibility symbol_visibility, std::vector &matches); uint32_t AppendSymbolIndexesWithNameAndType(const ConstString &symbol_name, lldb::SymbolType symbol_type, std::vector &matches); uint32_t AppendSymbolIndexesWithNameAndType(const ConstString &symbol_name, lldb::SymbolType symbol_type, Debug symbol_debug_type, Visibility symbol_visibility, std::vector &matches); uint32_t AppendSymbolIndexesMatchingRegExAndType(const RegularExpression ®ex, lldb::SymbolType symbol_type, std::vector &indexes); uint32_t AppendSymbolIndexesMatchingRegExAndType( const RegularExpression ®ex, lldb::SymbolType symbol_type, Debug symbol_debug_type, Visibility symbol_visibility, std::vector &indexes); size_t FindAllSymbolsWithNameAndType(const ConstString &name, lldb::SymbolType symbol_type, std::vector &symbol_indexes); size_t FindAllSymbolsWithNameAndType(const ConstString &name, lldb::SymbolType symbol_type, Debug symbol_debug_type, Visibility symbol_visibility, std::vector &symbol_indexes); size_t FindAllSymbolsMatchingRexExAndType( const RegularExpression ®ex, lldb::SymbolType symbol_type, Debug symbol_debug_type, Visibility symbol_visibility, std::vector &symbol_indexes); Symbol *FindFirstSymbolWithNameAndType(const ConstString &name, lldb::SymbolType symbol_type, Debug symbol_debug_type, Visibility symbol_visibility); Symbol *FindSymbolAtFileAddress(lldb::addr_t file_addr); Symbol *FindSymbolContainingFileAddress(lldb::addr_t file_addr); void ForEachSymbolContainingFileAddress( lldb::addr_t file_addr, std::function const &callback); size_t FindFunctionSymbols(const ConstString &name, uint32_t name_type_mask, SymbolContextList &sc_list); void CalculateSymbolSizes(); void SortSymbolIndexesByValue(std::vector &indexes, bool remove_duplicates) const; static void DumpSymbolHeader(Stream *s); void Finalize() { // Shrink to fit the symbols so we don't waste memory if (m_symbols.capacity() > m_symbols.size()) { collection new_symbols(m_symbols.begin(), m_symbols.end()); m_symbols.swap(new_symbols); } } void AppendSymbolNamesToMap(const IndexCollection &indexes, bool add_demangled, bool add_mangled, NameToIndexMap &name_to_index_map) const; ObjectFile *GetObjectFile() { return m_objfile; } protected: typedef std::vector collection; typedef collection::iterator iterator; typedef collection::const_iterator const_iterator; typedef RangeDataVector FileRangeToIndexMap; void InitNameIndexes(); void InitAddressIndexes(); ObjectFile *m_objfile; collection m_symbols; FileRangeToIndexMap m_file_addr_to_index; UniqueCStringMap m_name_to_index; UniqueCStringMap m_basename_to_index; UniqueCStringMap m_method_to_index; UniqueCStringMap m_selector_to_index; mutable std::recursive_mutex m_mutex; // Provide thread safety for this symbol table bool m_file_addr_to_index_computed : 1, m_name_indexes_computed : 1; private: bool CheckSymbolAtIndex(size_t idx, Debug symbol_debug_type, Visibility symbol_visibility) const { switch (symbol_debug_type) { case eDebugNo: if (m_symbols[idx].IsDebug() == true) return false; break; case eDebugYes: if (m_symbols[idx].IsDebug() == false) return false; break; case eDebugAny: break; } switch (symbol_visibility) { case eVisibilityAny: return true; case eVisibilityExtern: return m_symbols[idx].IsExternal(); case eVisibilityPrivate: return !m_symbols[idx].IsExternal(); } return false; } void SymbolIndicesToSymbolContextList(std::vector &symbol_indexes, SymbolContextList &sc_list); DISALLOW_COPY_AND_ASSIGN(Symtab); }; } // namespace lldb_private #endif // liblldb_Symtab_h_ Index: vendor/lldb/dist/include/lldb/Target/Target.h =================================================================== --- vendor/lldb/dist/include/lldb/Target/Target.h (revision 317691) +++ vendor/lldb/dist/include/lldb/Target/Target.h (revision 317692) @@ -1,1271 +1,1275 @@ //===-- Target.h ------------------------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #ifndef liblldb_Target_h_ #define liblldb_Target_h_ // C Includes // C++ Includes #include #include #include #include #include // Other libraries and framework includes // Project includes #include "lldb/Breakpoint/BreakpointList.h" #include "lldb/Breakpoint/WatchpointList.h" #include "lldb/Core/ArchSpec.h" #include "lldb/Core/Broadcaster.h" #include "lldb/Core/Disassembler.h" #include "lldb/Core/ModuleList.h" #include "lldb/Core/UserSettingsController.h" #include "lldb/Expression/Expression.h" #include "lldb/Symbol/TypeSystem.h" #include "lldb/Target/ExecutionContextScope.h" #include "lldb/Target/PathMappingList.h" #include "lldb/Target/ProcessLaunchInfo.h" #include "lldb/Target/SectionLoadHistory.h" #include "lldb/Utility/Timeout.h" #include "lldb/lldb-public.h" namespace lldb_private { extern OptionEnumValueElement g_dynamic_value_types[]; typedef enum InlineStrategy { eInlineBreakpointsNever = 0, eInlineBreakpointsHeaders, eInlineBreakpointsAlways } InlineStrategy; typedef enum LoadScriptFromSymFile { eLoadScriptFromSymFileTrue, eLoadScriptFromSymFileFalse, eLoadScriptFromSymFileWarn } LoadScriptFromSymFile; typedef enum LoadCWDlldbinitFile { eLoadCWDlldbinitTrue, eLoadCWDlldbinitFalse, eLoadCWDlldbinitWarn } LoadCWDlldbinitFile; //---------------------------------------------------------------------- // TargetProperties //---------------------------------------------------------------------- class TargetExperimentalProperties : public Properties { public: TargetExperimentalProperties(); }; class TargetProperties : public Properties { public: TargetProperties(Target *target); ~TargetProperties() override; ArchSpec GetDefaultArchitecture() const; void SetDefaultArchitecture(const ArchSpec &arch); bool GetMoveToNearestCode() const; lldb::DynamicValueType GetPreferDynamicValue() const; bool SetPreferDynamicValue(lldb::DynamicValueType d); + bool GetPreloadSymbols() const; + + void SetPreloadSymbols(bool b); + bool GetDisableASLR() const; void SetDisableASLR(bool b); bool GetDetachOnError() const; void SetDetachOnError(bool b); bool GetDisableSTDIO() const; void SetDisableSTDIO(bool b); const char *GetDisassemblyFlavor() const; // void // SetDisassemblyFlavor(const char *flavor); InlineStrategy GetInlineStrategy() const; llvm::StringRef GetArg0() const; void SetArg0(llvm::StringRef arg); bool GetRunArguments(Args &args) const; void SetRunArguments(const Args &args); size_t GetEnvironmentAsArgs(Args &env) const; void SetEnvironmentFromArgs(const Args &env); bool GetSkipPrologue() const; PathMappingList &GetSourcePathMap() const; FileSpecList &GetExecutableSearchPaths(); FileSpecList &GetDebugFileSearchPaths(); FileSpecList &GetClangModuleSearchPaths(); bool GetEnableAutoImportClangModules() const; bool GetEnableAutoApplyFixIts() const; bool GetEnableNotifyAboutFixIts() const; bool GetEnableSaveObjects() const; bool GetEnableSyntheticValue() const; uint32_t GetMaximumNumberOfChildrenToDisplay() const; uint32_t GetMaximumSizeOfStringSummary() const; uint32_t GetMaximumMemReadSize() const; FileSpec GetStandardInputPath() const; FileSpec GetStandardErrorPath() const; FileSpec GetStandardOutputPath() const; void SetStandardInputPath(llvm::StringRef path); void SetStandardOutputPath(llvm::StringRef path); void SetStandardErrorPath(llvm::StringRef path); void SetStandardInputPath(const char *path) = delete; void SetStandardOutputPath(const char *path) = delete; void SetStandardErrorPath(const char *path) = delete; bool GetBreakpointsConsultPlatformAvoidList(); lldb::LanguageType GetLanguage() const; const char *GetExpressionPrefixContentsAsCString(); bool GetUseHexImmediates() const; bool GetUseFastStepping() const; bool GetDisplayExpressionsInCrashlogs() const; LoadScriptFromSymFile GetLoadScriptFromSymbolFile() const; LoadCWDlldbinitFile GetLoadCWDlldbinitFile() const; Disassembler::HexImmediateStyle GetHexImmediateStyle() const; MemoryModuleLoadLevel GetMemoryModuleLoadLevel() const; bool GetUserSpecifiedTrapHandlerNames(Args &args) const; void SetUserSpecifiedTrapHandlerNames(const Args &args); bool GetNonStopModeEnabled() const; void SetNonStopModeEnabled(bool b); bool GetDisplayRuntimeSupportValues() const; void SetDisplayRuntimeSupportValues(bool b); const ProcessLaunchInfo &GetProcessLaunchInfo(); void SetProcessLaunchInfo(const ProcessLaunchInfo &launch_info); bool GetInjectLocalVariables(ExecutionContext *exe_ctx) const; void SetInjectLocalVariables(ExecutionContext *exe_ctx, bool b); 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 *); //------------------------------------------------------------------ // Member variables. //------------------------------------------------------------------ ProcessLaunchInfo m_launch_info; std::unique_ptr m_experimental_properties_up; }; class EvaluateExpressionOptions { public: // MSVC has a bug here that reports C4268: 'const' static/global data // initialized with compiler generated default constructor fills the object // with zeros. // Confirmed that MSVC is *not* zero-initializing, it's just a bogus warning. #if defined(_MSC_VER) #pragma warning(push) #pragma warning(disable : 4268) #endif static constexpr std::chrono::milliseconds default_timeout{500}; #if defined(_MSC_VER) #pragma warning(pop) #endif static constexpr ExecutionPolicy default_execution_policy = eExecutionPolicyOnlyWhenNeeded; EvaluateExpressionOptions() = default; ExecutionPolicy GetExecutionPolicy() const { return m_execution_policy; } void SetExecutionPolicy(ExecutionPolicy policy = eExecutionPolicyAlways) { m_execution_policy = policy; } lldb::LanguageType GetLanguage() const { return m_language; } void SetLanguage(lldb::LanguageType language) { m_language = language; } bool DoesCoerceToId() const { return m_coerce_to_id; } const char *GetPrefix() const { return (m_prefix.empty() ? nullptr : m_prefix.c_str()); } void SetPrefix(const char *prefix) { if (prefix && prefix[0]) m_prefix = prefix; else m_prefix.clear(); } void SetCoerceToId(bool coerce = true) { m_coerce_to_id = coerce; } bool DoesUnwindOnError() const { return m_unwind_on_error; } void SetUnwindOnError(bool unwind = false) { m_unwind_on_error = unwind; } bool DoesIgnoreBreakpoints() const { return m_ignore_breakpoints; } void SetIgnoreBreakpoints(bool ignore = false) { m_ignore_breakpoints = ignore; } bool DoesKeepInMemory() const { return m_keep_in_memory; } void SetKeepInMemory(bool keep = true) { m_keep_in_memory = keep; } lldb::DynamicValueType GetUseDynamic() const { return m_use_dynamic; } void SetUseDynamic(lldb::DynamicValueType dynamic = lldb::eDynamicCanRunTarget) { m_use_dynamic = dynamic; } const Timeout &GetTimeout() const { return m_timeout; } void SetTimeout(const Timeout &timeout) { m_timeout = timeout; } const Timeout &GetOneThreadTimeout() const { return m_one_thread_timeout; } void SetOneThreadTimeout(const Timeout &timeout) { m_one_thread_timeout = timeout; } bool GetTryAllThreads() const { return m_try_others; } void SetTryAllThreads(bool try_others = true) { m_try_others = try_others; } bool GetStopOthers() const { return m_stop_others; } void SetStopOthers(bool stop_others = true) { m_stop_others = stop_others; } bool GetDebug() const { return m_debug; } void SetDebug(bool b) { m_debug = b; if (m_debug) m_generate_debug_info = true; } bool GetGenerateDebugInfo() const { return m_generate_debug_info; } void SetGenerateDebugInfo(bool b) { m_generate_debug_info = b; } bool GetColorizeErrors() const { return m_ansi_color_errors; } void SetColorizeErrors(bool b) { m_ansi_color_errors = b; } bool GetTrapExceptions() const { return m_trap_exceptions; } void SetTrapExceptions(bool b) { m_trap_exceptions = b; } bool GetREPLEnabled() const { return m_repl; } void SetREPLEnabled(bool b) { m_repl = b; } void SetCancelCallback(lldb::ExpressionCancelCallback callback, void *baton) { m_cancel_callback_baton = baton; m_cancel_callback = callback; } bool InvokeCancelCallback(lldb::ExpressionEvaluationPhase phase) const { return ((m_cancel_callback != nullptr) ? m_cancel_callback(phase, m_cancel_callback_baton) : false); } // Allows the expression contents to be remapped to point to the specified // file and line // using #line directives. void SetPoundLine(const char *path, uint32_t line) const { if (path && path[0]) { m_pound_line_file = path; m_pound_line_line = line; } else { m_pound_line_file.clear(); m_pound_line_line = 0; } } const char *GetPoundLineFilePath() const { return (m_pound_line_file.empty() ? nullptr : m_pound_line_file.c_str()); } uint32_t GetPoundLineLine() const { return m_pound_line_line; } void SetResultIsInternal(bool b) { m_result_is_internal = b; } bool GetResultIsInternal() const { return m_result_is_internal; } void SetAutoApplyFixIts(bool b) { m_auto_apply_fixits = b; } bool GetAutoApplyFixIts() const { return m_auto_apply_fixits; } private: ExecutionPolicy m_execution_policy = default_execution_policy; lldb::LanguageType m_language = lldb::eLanguageTypeUnknown; std::string m_prefix; bool m_coerce_to_id = false; bool m_unwind_on_error = true; bool m_ignore_breakpoints = false; bool m_keep_in_memory = false; bool m_try_others = true; bool m_stop_others = true; bool m_debug = false; bool m_trap_exceptions = true; bool m_repl = false; bool m_generate_debug_info = false; bool m_ansi_color_errors = false; bool m_result_is_internal = false; bool m_auto_apply_fixits = true; lldb::DynamicValueType m_use_dynamic = lldb::eNoDynamicValues; Timeout m_timeout = default_timeout; Timeout m_one_thread_timeout = llvm::None; lldb::ExpressionCancelCallback m_cancel_callback = nullptr; void *m_cancel_callback_baton = nullptr; // If m_pound_line_file is not empty and m_pound_line_line is non-zero, // use #line %u "%s" before the expression content to remap where the source // originates mutable std::string m_pound_line_file; mutable uint32_t m_pound_line_line; }; //---------------------------------------------------------------------- // Target //---------------------------------------------------------------------- class Target : public std::enable_shared_from_this, public TargetProperties, public Broadcaster, public ExecutionContextScope, public ModuleList::Notifier { public: friend class TargetList; //------------------------------------------------------------------ /// Broadcaster event bits definitions. //------------------------------------------------------------------ enum { eBroadcastBitBreakpointChanged = (1 << 0), eBroadcastBitModulesLoaded = (1 << 1), eBroadcastBitModulesUnloaded = (1 << 2), eBroadcastBitWatchpointChanged = (1 << 3), eBroadcastBitSymbolsLoaded = (1 << 4) }; // These two functions fill out the Broadcaster interface: static ConstString &GetStaticBroadcasterClass(); ConstString &GetBroadcasterClass() const override { return GetStaticBroadcasterClass(); } // This event data class is for use by the TargetList to broadcast new target // notifications. class TargetEventData : public EventData { public: TargetEventData(const lldb::TargetSP &target_sp); TargetEventData(const lldb::TargetSP &target_sp, const ModuleList &module_list); ~TargetEventData() override; static const ConstString &GetFlavorString(); const ConstString &GetFlavor() const override { return TargetEventData::GetFlavorString(); } void Dump(Stream *s) const override; static const TargetEventData *GetEventDataFromEvent(const Event *event_ptr); static lldb::TargetSP GetTargetFromEvent(const Event *event_ptr); static ModuleList GetModuleListFromEvent(const Event *event_ptr); const lldb::TargetSP &GetTarget() const { return m_target_sp; } const ModuleList &GetModuleList() const { return m_module_list; } private: lldb::TargetSP m_target_sp; ModuleList m_module_list; DISALLOW_COPY_AND_ASSIGN(TargetEventData); }; ~Target() override; static void SettingsInitialize(); static void SettingsTerminate(); static FileSpecList GetDefaultExecutableSearchPaths(); static FileSpecList GetDefaultDebugFileSearchPaths(); static FileSpecList GetDefaultClangModuleSearchPaths(); static ArchSpec GetDefaultArchitecture(); static void SetDefaultArchitecture(const ArchSpec &arch); // void // UpdateInstanceName (); lldb::ModuleSP GetSharedModule(const ModuleSpec &module_spec, Error *error_ptr = nullptr); //---------------------------------------------------------------------- // Settings accessors //---------------------------------------------------------------------- static const lldb::TargetPropertiesSP &GetGlobalProperties(); std::recursive_mutex &GetAPIMutex() { return m_mutex; } void DeleteCurrentProcess(); void CleanupProcess(); //------------------------------------------------------------------ /// Dump a description of this object to a Stream. /// /// Dump a description of the contents of this object to the /// supplied stream \a s. The dumped content will be only what has /// been loaded or parsed up to this point at which this function /// is called, so this is a good way to see what has been parsed /// in a target. /// /// @param[in] s /// The stream to which to dump the object description. //------------------------------------------------------------------ void Dump(Stream *s, lldb::DescriptionLevel description_level); const lldb::ProcessSP &CreateProcess(lldb::ListenerSP listener, llvm::StringRef plugin_name, const FileSpec *crash_file); const lldb::ProcessSP &GetProcessSP() const; bool IsValid() { return m_valid; } void Destroy(); Error Launch(ProcessLaunchInfo &launch_info, Stream *stream); // Optional stream to receive first stop info Error Attach(ProcessAttachInfo &attach_info, Stream *stream); // Optional stream to receive first stop info //------------------------------------------------------------------ // This part handles the breakpoints. //------------------------------------------------------------------ BreakpointList &GetBreakpointList(bool internal = false); const BreakpointList &GetBreakpointList(bool internal = false) const; lldb::BreakpointSP GetLastCreatedBreakpoint() { return m_last_created_breakpoint; } lldb::BreakpointSP GetBreakpointByID(lldb::break_id_t break_id); // Use this to create a file and line breakpoint to a given module or all // module it is nullptr lldb::BreakpointSP CreateBreakpoint(const FileSpecList *containingModules, const FileSpec &file, uint32_t line_no, lldb::addr_t offset, LazyBool check_inlines, LazyBool skip_prologue, bool internal, bool request_hardware, LazyBool move_to_nearest_code); // Use this to create breakpoint that matches regex against the source lines // in files given in source_file_list: // If function_names is non-empty, also filter by function after the matches // are made. lldb::BreakpointSP CreateSourceRegexBreakpoint( const FileSpecList *containingModules, const FileSpecList *source_file_list, const std::unordered_set &function_names, RegularExpression &source_regex, bool internal, bool request_hardware, LazyBool move_to_nearest_code); // Use this to create a breakpoint from a load address lldb::BreakpointSP CreateBreakpoint(lldb::addr_t load_addr, bool internal, bool request_hardware); // Use this to create a breakpoint from a load address and a module file spec lldb::BreakpointSP CreateAddressInModuleBreakpoint(lldb::addr_t file_addr, bool internal, const FileSpec *file_spec, bool request_hardware); // Use this to create Address breakpoints: lldb::BreakpointSP CreateBreakpoint(const Address &addr, bool internal, bool request_hardware); // Use this to create a function breakpoint by regexp in // containingModule/containingSourceFiles, or all modules if it is nullptr // When "skip_prologue is set to eLazyBoolCalculate, we use the current target // setting, else we use the values passed in lldb::BreakpointSP CreateFuncRegexBreakpoint( const FileSpecList *containingModules, const FileSpecList *containingSourceFiles, RegularExpression &func_regexp, lldb::LanguageType requested_language, LazyBool skip_prologue, bool internal, bool request_hardware); // Use this to create a function breakpoint by name in containingModule, or // all modules if it is nullptr // When "skip_prologue is set to eLazyBoolCalculate, we use the current target // setting, else we use the values passed in. // func_name_type_mask is or'ed values from the FunctionNameType enum. lldb::BreakpointSP CreateBreakpoint(const FileSpecList *containingModules, const FileSpecList *containingSourceFiles, const char *func_name, uint32_t func_name_type_mask, lldb::LanguageType language, lldb::addr_t offset, LazyBool skip_prologue, bool internal, bool request_hardware); lldb::BreakpointSP CreateExceptionBreakpoint(enum lldb::LanguageType language, bool catch_bp, bool throw_bp, bool internal, Args *additional_args = nullptr, Error *additional_args_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 the case where you just want to set // a breakpoint on a set of names // you already know. // func_name_type_mask is or'ed values from the FunctionNameType enum. lldb::BreakpointSP CreateBreakpoint(const FileSpecList *containingModules, const FileSpecList *containingSourceFiles, const char *func_names[], size_t num_names, uint32_t func_name_type_mask, lldb::LanguageType language, lldb::addr_t offset, LazyBool skip_prologue, bool internal, bool request_hardware); lldb::BreakpointSP CreateBreakpoint(const FileSpecList *containingModules, const FileSpecList *containingSourceFiles, const std::vector &func_names, uint32_t func_name_type_mask, lldb::LanguageType language, lldb::addr_t m_offset, LazyBool skip_prologue, bool internal, bool request_hardware); // Use this to create a general breakpoint: lldb::BreakpointSP CreateBreakpoint(lldb::SearchFilterSP &filter_sp, lldb::BreakpointResolverSP &resolver_sp, bool internal, bool request_hardware, bool resolve_indirect_symbols); // Use this to create a watchpoint: lldb::WatchpointSP CreateWatchpoint(lldb::addr_t addr, size_t size, const CompilerType *type, uint32_t kind, Error &error); lldb::WatchpointSP GetLastCreatedWatchpoint() { return m_last_created_watchpoint; } WatchpointList &GetWatchpointList() { return m_watchpoint_list; } void RemoveAllBreakpoints(bool internal_also = false); void DisableAllBreakpoints(bool internal_also = false); void EnableAllBreakpoints(bool internal_also = false); bool DisableBreakpointByID(lldb::break_id_t break_id); bool EnableBreakpointByID(lldb::break_id_t break_id); bool RemoveBreakpointByID(lldb::break_id_t break_id); // The flag 'end_to_end', default to true, signifies that the operation is // performed end to end, for both the debugger and the debuggee. bool RemoveAllWatchpoints(bool end_to_end = true); bool DisableAllWatchpoints(bool end_to_end = true); bool EnableAllWatchpoints(bool end_to_end = true); bool ClearAllWatchpointHitCounts(); bool ClearAllWatchpointHistoricValues(); bool IgnoreAllWatchpoints(uint32_t ignore_count); bool DisableWatchpointByID(lldb::watch_id_t watch_id); bool EnableWatchpointByID(lldb::watch_id_t watch_id); bool RemoveWatchpointByID(lldb::watch_id_t watch_id); bool IgnoreWatchpointByID(lldb::watch_id_t watch_id, uint32_t ignore_count); Error SerializeBreakpointsToFile(const FileSpec &file, const BreakpointIDList &bp_ids, bool append); Error CreateBreakpointsFromFile(const FileSpec &file, BreakpointIDList &new_bps); Error CreateBreakpointsFromFile(const FileSpec &file, std::vector &names, BreakpointIDList &new_bps); //------------------------------------------------------------------ /// Get \a load_addr as a callable code load address for this target /// /// Take \a load_addr and potentially add any address bits that are /// needed to make the address callable. For ARM this can set bit /// zero (if it already isn't) if \a load_addr is a thumb function. /// If \a addr_class is set to eAddressClassInvalid, then the address /// adjustment will always happen. If it is set to an address class /// that doesn't have code in it, LLDB_INVALID_ADDRESS will be /// returned. //------------------------------------------------------------------ lldb::addr_t GetCallableLoadAddress( lldb::addr_t load_addr, lldb::AddressClass addr_class = lldb::eAddressClassInvalid) const; //------------------------------------------------------------------ /// Get \a load_addr as an opcode for this target. /// /// Take \a load_addr and potentially strip any address bits that are /// needed to make the address point to an opcode. For ARM this can /// clear bit zero (if it already isn't) if \a load_addr is a /// thumb function and load_addr is in code. /// If \a addr_class is set to eAddressClassInvalid, then the address /// adjustment will always happen. If it is set to an address class /// that doesn't have code in it, LLDB_INVALID_ADDRESS will be /// returned. //------------------------------------------------------------------ lldb::addr_t GetOpcodeLoadAddress( lldb::addr_t load_addr, lldb::AddressClass addr_class = lldb::eAddressClassInvalid) const; // Get load_addr as breakable load address for this target. // Take a addr and check if for any reason there is a better address than this // to put a breakpoint on. // If there is then return that address. // For MIPS, if instruction at addr is a delay slot instruction then this // method will find the address of its // previous instruction and return that address. lldb::addr_t GetBreakableLoadAddress(lldb::addr_t addr); void ModulesDidLoad(ModuleList &module_list); void ModulesDidUnload(ModuleList &module_list, bool delete_locations); void SymbolsDidLoad(ModuleList &module_list); void ClearModules(bool delete_locations); //------------------------------------------------------------------ /// Called as the last function in Process::DidExec(). /// /// Process::DidExec() will clear a lot of state in the process, /// then try to reload a dynamic loader plugin to discover what /// binaries are currently available and then this function should /// be called to allow the target to do any cleanup after everything /// has been figured out. It can remove breakpoints that no longer /// make sense as the exec might have changed the target /// architecture, and unloaded some modules that might get deleted. //------------------------------------------------------------------ void DidExec(); //------------------------------------------------------------------ /// Gets the module for the main executable. /// /// Each process has a notion of a main executable that is the file /// that will be executed or attached to. Executable files can have /// dependent modules that are discovered from the object files, or /// discovered at runtime as things are dynamically loaded. /// /// @return /// The shared pointer to the executable module which can /// contains a nullptr Module object if no executable has been /// set. /// /// @see DynamicLoader /// @see ObjectFile::GetDependentModules (FileSpecList&) /// @see Process::SetExecutableModule(lldb::ModuleSP&) //------------------------------------------------------------------ lldb::ModuleSP GetExecutableModule(); Module *GetExecutableModulePointer(); //------------------------------------------------------------------ /// Set the main executable module. /// /// Each process has a notion of a main executable that is the file /// that will be executed or attached to. Executable files can have /// dependent modules that are discovered from the object files, or /// discovered at runtime as things are dynamically loaded. /// /// Setting the executable causes any of the current dependent /// image information to be cleared and replaced with the static /// dependent image information found by calling /// ObjectFile::GetDependentModules (FileSpecList&) on the main /// executable and any modules on which it depends. Calling /// Process::GetImages() will return the newly found images that /// were obtained from all of the object files. /// /// @param[in] module_sp /// A shared pointer reference to the module that will become /// the main executable for this process. /// /// @param[in] get_dependent_files /// If \b true then ask the object files to track down any /// known dependent files. /// /// @see ObjectFile::GetDependentModules (FileSpecList&) /// @see Process::GetImages() //------------------------------------------------------------------ void SetExecutableModule(lldb::ModuleSP &module_sp, bool get_dependent_files); bool LoadScriptingResources(std::list &errors, Stream *feedback_stream = nullptr, bool continue_on_error = true) { return m_images.LoadScriptingResourcesInTarget( this, errors, feedback_stream, continue_on_error); } //------------------------------------------------------------------ /// Get accessor for the images for this process. /// /// Each process has a notion of a main executable that is the file /// that will be executed or attached to. Executable files can have /// dependent modules that are discovered from the object files, or /// discovered at runtime as things are dynamically loaded. After /// a main executable has been set, the images will contain a list /// of all the files that the executable depends upon as far as the /// object files know. These images will usually contain valid file /// virtual addresses only. When the process is launched or attached /// to, the DynamicLoader plug-in will discover where these images /// were loaded in memory and will resolve the load virtual /// addresses is each image, and also in images that are loaded by /// code. /// /// @return /// A list of Module objects in a module list. //------------------------------------------------------------------ const ModuleList &GetImages() const { return m_images; } ModuleList &GetImages() { return m_images; } //------------------------------------------------------------------ /// Return whether this FileSpec corresponds to a module that should be /// considered for general searches. /// /// This API will be consulted by the SearchFilterForUnconstrainedSearches /// and any module that returns \b true will not be searched. Note the /// SearchFilterForUnconstrainedSearches is the search filter that /// gets used in the CreateBreakpoint calls when no modules is provided. /// /// 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. /// /// @return \b true if the module should be excluded, \b false otherwise. //------------------------------------------------------------------ bool ModuleIsExcludedForUnconstrainedSearches(const FileSpec &module_spec); //------------------------------------------------------------------ /// Return whether this module should be considered for general searches. /// /// This API will be consulted by the SearchFilterForUnconstrainedSearches /// and any module that returns \b true will not be searched. Note the /// SearchFilterForUnconstrainedSearches is the search filter that /// gets used in the CreateBreakpoint calls when no modules is provided. /// /// The target call at present just consults the Platform's call of the /// same name. /// /// FIXME: When we get time we should add a way for the user to set modules /// that they /// don't want searched, in addition to or instead of the platform ones. /// /// @param[in] module_sp /// A shared pointer reference to the module that checked. /// /// @return \b true if the module should be excluded, \b false otherwise. //------------------------------------------------------------------ bool ModuleIsExcludedForUnconstrainedSearches(const lldb::ModuleSP &module_sp); const ArchSpec &GetArchitecture() const { return m_arch; } //------------------------------------------------------------------ /// Set the architecture for this target. /// /// If the current target has no Images read in, then this just sets the /// architecture, which will /// be used to select the architecture of the ExecutableModule when that is /// set. /// If the current target has an ExecutableModule, then calling /// SetArchitecture with a different /// architecture from the currently selected one will reset the /// ExecutableModule to that slice /// of the file backing the ExecutableModule. If the file backing the /// ExecutableModule does not /// contain a fork of this architecture, then this code will return false, and /// the architecture /// won't be changed. /// If the input arch_spec is the same as the already set architecture, this /// is a no-op. /// /// @param[in] arch_spec /// The new architecture. /// /// @return /// \b true if the architecture was successfully set, \bfalse otherwise. //------------------------------------------------------------------ bool SetArchitecture(const ArchSpec &arch_spec); bool MergeArchitecture(const ArchSpec &arch_spec); Debugger &GetDebugger() { return m_debugger; } size_t ReadMemoryFromFileCache(const Address &addr, void *dst, size_t dst_len, Error &error); // Reading memory through the target allows us to skip going to the process // for reading memory if possible and it allows us to try and read from // any constant sections in our object files on disk. If you always want // live program memory, read straight from the process. If you possibly // want to read from const sections in object files, read from the target. // This version of ReadMemory will try and read memory from the process // if the process is alive. The order is: // 1 - if (prefer_file_cache == true) then read from object file cache // 2 - if there is a valid process, try and read from its memory // 3 - if (prefer_file_cache == false) then read from object file cache size_t ReadMemory(const Address &addr, bool prefer_file_cache, void *dst, size_t dst_len, Error &error, lldb::addr_t *load_addr_ptr = nullptr); size_t ReadCStringFromMemory(const Address &addr, std::string &out_str, Error &error); size_t ReadCStringFromMemory(const Address &addr, char *dst, size_t dst_max_len, Error &result_error); size_t ReadScalarIntegerFromMemory(const Address &addr, bool prefer_file_cache, uint32_t byte_size, bool is_signed, Scalar &scalar, Error &error); uint64_t ReadUnsignedIntegerFromMemory(const Address &addr, bool prefer_file_cache, size_t integer_byte_size, uint64_t fail_value, Error &error); bool ReadPointerFromMemory(const Address &addr, bool prefer_file_cache, Error &error, Address &pointer_addr); SectionLoadList &GetSectionLoadList() { return m_section_load_history.GetCurrentSectionLoadList(); } // const SectionLoadList& // GetSectionLoadList() const // { // return const_cast(&m_section_load_history)->GetCurrentSectionLoadList(); // } static Target *GetTargetFromContexts(const ExecutionContext *exe_ctx_ptr, const SymbolContext *sc_ptr); //------------------------------------------------------------------ // lldb::ExecutionContextScope pure virtual functions //------------------------------------------------------------------ lldb::TargetSP CalculateTarget() override; lldb::ProcessSP CalculateProcess() override; lldb::ThreadSP CalculateThread() override; lldb::StackFrameSP CalculateStackFrame() override; void CalculateExecutionContext(ExecutionContext &exe_ctx) override; PathMappingList &GetImageSearchPathList(); TypeSystem *GetScratchTypeSystemForLanguage(Error *error, lldb::LanguageType language, bool create_on_demand = true); PersistentExpressionState * GetPersistentExpressionStateForLanguage(lldb::LanguageType language); // Creates a UserExpression for the given language, the rest of the 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, Error &error); // Creates a FunctionCaller for the given language, the rest of the parameters // have the // same meaning as for the FunctionCaller constructor. Since a FunctionCaller // can't be // IR Interpreted, it makes no sense to call this with an // ExecutionContextScope that lacks // a Process. // Returns a new-ed object which the caller owns. FunctionCaller *GetFunctionCallerForLanguage(lldb::LanguageType language, const CompilerType &return_type, const Address &function_address, const ValueList &arg_value_list, const char *name, Error &error); // Creates a UtilityFunction for the given language, the rest of the // parameters have the // same meaning as for the UtilityFunction constructor. // Returns a new-ed object which the caller owns. UtilityFunction *GetUtilityFunctionForLanguage(const char *expr, lldb::LanguageType language, const char *name, Error &error); ClangASTContext *GetScratchClangASTContext(bool create_on_demand = true); lldb::ClangASTImporterSP GetClangASTImporter(); //---------------------------------------------------------------------- // Install any files through the platform that need be to installed // prior to launching or attaching. //---------------------------------------------------------------------- Error Install(ProcessLaunchInfo *launch_info); bool ResolveFileAddress(lldb::addr_t load_addr, Address &so_addr); bool ResolveLoadAddress(lldb::addr_t load_addr, Address &so_addr, uint32_t stop_id = SectionLoadHistory::eStopIDNow); bool SetSectionLoadAddress(const lldb::SectionSP §ion, lldb::addr_t load_addr, bool warn_multiple = false); size_t UnloadModuleSections(const lldb::ModuleSP &module_sp); size_t UnloadModuleSections(const ModuleList &module_list); bool SetSectionUnloaded(const lldb::SectionSP §ion_sp); bool SetSectionUnloaded(const lldb::SectionSP §ion_sp, lldb::addr_t load_addr); void ClearAllLoadedSections(); // Since expressions results can persist beyond the lifetime of a process, // and the const expression results are available after a process is gone, // we provide a way for expressions to be evaluated from the Target itself. // If an expression is going to be run, then it should have a frame filled // in in th execution context. lldb::ExpressionResults EvaluateExpression( llvm::StringRef expression, ExecutionContextScope *exe_scope, lldb::ValueObjectSP &result_valobj_sp, const EvaluateExpressionOptions &options = EvaluateExpressionOptions(), std::string *fixed_expression = nullptr); lldb::ExpressionVariableSP GetPersistentVariable(const ConstString &name); lldb::addr_t GetPersistentSymbol(const ConstString &name); //------------------------------------------------------------------ // Target Stop Hooks //------------------------------------------------------------------ class StopHook : public UserID { public: StopHook(const StopHook &rhs); ~StopHook(); StringList *GetCommandPointer() { return &m_commands; } const StringList &GetCommands() { return m_commands; } lldb::TargetSP &GetTarget() { return m_target_sp; } void SetCommands(StringList &in_commands) { m_commands = in_commands; } // Set the specifier. The stop hook will own the specifier, and is // responsible for deleting it when we're done. void SetSpecifier(SymbolContextSpecifier *specifier); SymbolContextSpecifier *GetSpecifier() { return m_specifier_sp.get(); } // Set the Thread Specifier. The stop hook will own the thread specifier, // and is responsible for deleting it when we're done. void SetThreadSpecifier(ThreadSpec *specifier); ThreadSpec *GetThreadSpecifier() { return m_thread_spec_ap.get(); } bool IsActive() { return m_active; } void SetIsActive(bool is_active) { m_active = is_active; } void GetDescription(Stream *s, lldb::DescriptionLevel level) const; private: lldb::TargetSP m_target_sp; StringList m_commands; lldb::SymbolContextSpecifierSP m_specifier_sp; std::unique_ptr m_thread_spec_ap; bool m_active; // Use CreateStopHook to make a new empty stop hook. The GetCommandPointer // and fill it with commands, // and SetSpecifier to set the specifier shared pointer (can be null, that // will match anything.) StopHook(lldb::TargetSP target_sp, lldb::user_id_t uid); friend class Target; }; typedef std::shared_ptr StopHookSP; // Add an empty stop hook to the Target's stop hook list, and returns a shared // pointer to it in new_hook. // Returns the id of the new hook. StopHookSP CreateStopHook(); void RunStopHooks(); size_t GetStopHookSize(); bool SetSuppresStopHooks(bool suppress) { bool old_value = m_suppress_stop_hooks; m_suppress_stop_hooks = suppress; return old_value; } bool GetSuppressStopHooks() { return m_suppress_stop_hooks; } // StopHookSP & // GetStopHookByIndex (size_t index); // bool RemoveStopHookByID(lldb::user_id_t uid); void RemoveAllStopHooks(); StopHookSP GetStopHookByID(lldb::user_id_t uid); bool SetStopHookActiveStateByID(lldb::user_id_t uid, bool active_state); void SetAllStopHooksActiveState(bool active_state); size_t GetNumStopHooks() const { return m_stop_hooks.size(); } StopHookSP GetStopHookAtIndex(size_t index) { if (index >= GetNumStopHooks()) return StopHookSP(); StopHookCollection::iterator pos = m_stop_hooks.begin(); while (index > 0) { pos++; index--; } return (*pos).second; } lldb::PlatformSP GetPlatform() { return m_platform_sp; } void SetPlatform(const lldb::PlatformSP &platform_sp) { m_platform_sp = platform_sp; } SourceManager &GetSourceManager(); ClangModulesDeclVendor *GetClangModulesDeclVendor(); //------------------------------------------------------------------ // Methods. //------------------------------------------------------------------ lldb::SearchFilterSP GetSearchFilterForModule(const FileSpec *containingModule); lldb::SearchFilterSP GetSearchFilterForModuleList(const FileSpecList *containingModuleList); lldb::SearchFilterSP GetSearchFilterForModuleAndCUList(const FileSpecList *containingModules, const FileSpecList *containingSourceFiles); lldb::REPLSP GetREPL(Error &err, lldb::LanguageType language, const char *repl_options, bool can_create); void SetREPL(lldb::LanguageType language, lldb::REPLSP repl_sp); protected: //------------------------------------------------------------------ /// Implementing of ModuleList::Notifier. //------------------------------------------------------------------ void ModuleAdded(const ModuleList &module_list, const lldb::ModuleSP &module_sp) override; void ModuleRemoved(const ModuleList &module_list, const lldb::ModuleSP &module_sp) override; void ModuleUpdated(const ModuleList &module_list, const lldb::ModuleSP &old_module_sp, const lldb::ModuleSP &new_module_sp) override; void WillClearList(const ModuleList &module_list) override; //------------------------------------------------------------------ // Member variables. //------------------------------------------------------------------ Debugger &m_debugger; 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 ArchSpec m_arch; ModuleList m_images; ///< The list of images for this process (shared /// libraries and anything dynamically loaded). SectionLoadHistory m_section_load_history; BreakpointList m_breakpoint_list; BreakpointList m_internal_breakpoint_list; lldb::BreakpointSP m_last_created_breakpoint; WatchpointList m_watchpoint_list; lldb::WatchpointSP m_last_created_watchpoint; // We want to tightly control the process destruction process so // we can correctly tear down everything that we need to, so the only // class that knows about the process lifespan is this target class. lldb::ProcessSP m_process_sp; lldb::SearchFilterSP m_search_filter_sp; PathMappingList m_image_search_paths; TypeSystemMap m_scratch_type_system_map; typedef std::map REPLMap; REPLMap m_repl_map; lldb::ClangASTImporterSP m_ast_importer_sp; lldb::ClangModulesDeclVendorUP m_clang_modules_decl_vendor_ap; lldb::SourceManagerUP m_source_manager_ap; typedef std::map StopHookCollection; StopHookCollection m_stop_hooks; lldb::user_id_t m_stop_hook_next_id; bool m_valid; bool m_suppress_stop_hooks; bool m_is_dummy_target; static void ImageSearchPathsChanged(const PathMappingList &path_list, void *baton); private: //------------------------------------------------------------------ /// Construct with optional file and arch. /// /// This member is private. Clients must use /// TargetList::CreateTarget(const FileSpec*, const ArchSpec*) /// so all targets can be tracked from the central target list. /// /// @see TargetList::CreateTarget(const FileSpec*, const ArchSpec*) //------------------------------------------------------------------ Target(Debugger &debugger, const ArchSpec &target_arch, const lldb::PlatformSP &platform_sp, bool is_dummy_target); // Helper function. bool ProcessIsValid(); // Copy breakpoints, stop hooks and so forth from the dummy target: void PrimeFromDummyTarget(Target *dummy_target); void AddBreakpoint(lldb::BreakpointSP breakpoint_sp, bool internal); DISALLOW_COPY_AND_ASSIGN(Target); }; } // namespace lldb_private #endif // liblldb_Target_h_ Index: vendor/lldb/dist/lldb.xcodeproj/project.pbxproj =================================================================== --- vendor/lldb/dist/lldb.xcodeproj/project.pbxproj (revision 317691) +++ vendor/lldb/dist/lldb.xcodeproj/project.pbxproj (revision 317692) @@ -1,10502 +1,10518 @@ // !$*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 */, 2687EACD1508115900DD8C2E /* 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 */, 2687EACB1508115000DD8C2E /* 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 */, 2687EACF1508116300DD8C2E /* PBXTargetDependency */, ); name = ios; productName = ios; }; /* End PBXAggregateTarget section */ /* Begin PBXBuildFile section */ 23042D121976CA1D00621B2C /* PlatformKalimba.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 23042D101976CA0A00621B2C /* PlatformKalimba.cpp */; }; 23059A0719532B96007B8189 /* LinuxSignals.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 23059A0519532B96007B8189 /* LinuxSignals.cpp */; }; 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, ); }; }; 230EC45B1D63C3BA008DF59F /* ThreadPlanCallOnFunctionExit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 230EC4581D63C3A7008DF59F /* ThreadPlanCallOnFunctionExit.cpp */; }; 232CB615191E00CD00EF39FC /* NativeBreakpoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 232CB60B191E00CC00EF39FC /* NativeBreakpoint.cpp */; }; 232CB617191E00CD00EF39FC /* NativeBreakpointList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 232CB60D191E00CC00EF39FC /* NativeBreakpointList.cpp */; }; 232CB619191E00CD00EF39FC /* NativeProcessProtocol.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 232CB60F191E00CC00EF39FC /* NativeProcessProtocol.cpp */; }; 232CB61B191E00CD00EF39FC /* NativeThreadProtocol.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 232CB611191E00CC00EF39FC /* NativeThreadProtocol.cpp */; }; 232CB61D191E00CD00EF39FC /* SoftwareBreakpoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 232CB613191E00CC00EF39FC /* SoftwareBreakpoint.cpp */; }; 233B007D1960C9F90090E598 /* ProcessInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 233B007B1960C9E60090E598 /* ProcessInfo.cpp */; }; 233B007F1960CB280090E598 /* ProcessLaunchInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 233B007E1960CB280090E598 /* ProcessLaunchInfo.cpp */; }; 236124A41986B4E2004EFC37 /* IOObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 236124A21986B4E2004EFC37 /* IOObject.cpp */; }; 236124A51986B4E2004EFC37 /* Socket.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 236124A31986B4E2004EFC37 /* Socket.cpp */; }; 2374D7531D4BB2FF005C9575 /* GDBRemoteClientBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2374D74E1D4BB299005C9575 /* GDBRemoteClientBase.cpp */; }; 2377C2F819E613C100737875 /* PipePosix.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2377C2F719E613C100737875 /* PipePosix.cpp */; }; 237A8BAF1DEC9C7800CEBAFF /* RegisterInfoPOSIX_arm64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 237A8BAB1DEC9BBC00CEBAFF /* RegisterInfoPOSIX_arm64.cpp */; }; 238F2B9E1D2C82D0001FF92A /* StructuredDataPlugin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 238F2B9D1D2C82D0001FF92A /* StructuredDataPlugin.cpp */; }; 238F2BA11D2C835A001FF92A /* StructuredDataPlugin.h in Headers */ = {isa = PBXBuildFile; fileRef = 238F2B9F1D2C835A001FF92A /* StructuredDataPlugin.h */; }; 238F2BA21D2C835A001FF92A /* SystemRuntime.h in Headers */ = {isa = PBXBuildFile; fileRef = 238F2BA01D2C835A001FF92A /* SystemRuntime.h */; }; 238F2BA81D2C85FA001FF92A /* StructuredDataDarwinLog.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 238F2BA61D2C85FA001FF92A /* StructuredDataDarwinLog.cpp */; }; 238F2BA91D2C85FA001FF92A /* StructuredDataDarwinLog.h in Headers */ = {isa = PBXBuildFile; fileRef = 238F2BA71D2C85FA001FF92A /* StructuredDataDarwinLog.h */; }; 239481861C59EBDD00DF7168 /* libncurses.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 239481851C59EBDD00DF7168 /* libncurses.dylib */; }; 23CB15331D66DA9300EDDDE1 /* GoParserTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AEC6FF9F1BE970A2007882C1 /* GoParserTest.cpp */; }; 23CB15341D66DA9300EDDDE1 /* CPlusPlusLanguageTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 23CB14FA1D66CCF100EDDDE1 /* CPlusPlusLanguageTest.cpp */; }; 23CB15351D66DA9300EDDDE1 /* UriParserTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2321F9461BDD346100BA9A93 /* UriParserTest.cpp */; }; 23CB15361D66DA9300EDDDE1 /* FileSpecTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 23CB14FD1D66CD2400EDDDE1 /* FileSpecTest.cpp */; }; 23CB15371D66DA9300EDDDE1 /* PythonTestSuite.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF45E1FC1BF57C8D000563EB /* PythonTestSuite.cpp */; }; 23CB15381D66DA9300EDDDE1 /* PythonExceptionStateTests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3FA093141BF65D3A0037DD08 /* PythonExceptionStateTests.cpp */; }; 23CB15391D66DA9300EDDDE1 /* DataExtractorTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 23CB14E81D66CC0E00EDDDE1 /* DataExtractorTest.cpp */; }; 23CB153A1D66DA9300EDDDE1 /* GDBRemoteClientBaseTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2370A37D1D66C587000E7BE6 /* GDBRemoteClientBaseTest.cpp */; }; 23CB153B1D66DA9300EDDDE1 /* SocketTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2321F93A1BDD332400BA9A93 /* SocketTest.cpp */; }; 23CB153C1D66DA9300EDDDE1 /* TestArgs.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2321F93E1BDD33CE00BA9A93 /* TestArgs.cpp */; }; 23CB153D1D66DA9300EDDDE1 /* GDBRemoteCommunicationClientTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2370A37E1D66C587000E7BE6 /* GDBRemoteCommunicationClientTest.cpp */; }; 23CB153E1D66DA9300EDDDE1 /* PythonDataObjectsTests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2321F94D1BDD360F00BA9A93 /* PythonDataObjectsTests.cpp */; }; 23CB153F1D66DA9300EDDDE1 /* SymbolsTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2321F93B1BDD332400BA9A93 /* SymbolsTest.cpp */; }; 23CB15401D66DA9300EDDDE1 /* TestClangASTContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 23CB150C1D66CF5600EDDDE1 /* TestClangASTContext.cpp */; }; 23CB15411D66DA9300EDDDE1 /* StringExtractorTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2321F9441BDD346100BA9A93 /* StringExtractorTest.cpp */; }; 23CB15421D66DA9300EDDDE1 /* TaskPoolTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2321F9451BDD346100BA9A93 /* TaskPoolTest.cpp */; }; 23CB15431D66DA9300EDDDE1 /* BroadcasterTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 23CB14E61D66CC0E00EDDDE1 /* BroadcasterTest.cpp */; }; 23CB15441D66DA9300EDDDE1 /* ScalarTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 23CB14E91D66CC0E00EDDDE1 /* ScalarTest.cpp */; }; 23CB15451D66DA9300EDDDE1 /* SocketAddressTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2321F9391BDD332400BA9A93 /* SocketAddressTest.cpp */; }; 23CB15461D66DA9300EDDDE1 /* GDBRemoteTestUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2370A37F1D66C587000E7BE6 /* GDBRemoteTestUtils.cpp */; }; 23CB15471D66DA9300EDDDE1 /* EditlineTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2326CF511BDD693B00A5CEAC /* EditlineTest.cpp */; }; 23CB15491D66DA9300EDDDE1 /* libxml2.2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 23CB14E31D66CA2200EDDDE1 /* libxml2.2.dylib */; }; 23CB154A1D66DA9300EDDDE1 /* libpanel.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 2326CF4E1BDD687800A5CEAC /* libpanel.dylib */; }; 23CB154B1D66DA9300EDDDE1 /* libedit.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 2326CF4C1BDD684B00A5CEAC /* libedit.dylib */; }; 23CB154C1D66DA9300EDDDE1 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 2326CF4A1BDD681800A5CEAC /* libz.dylib */; }; 23CB154D1D66DA9300EDDDE1 /* libncurses.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 2326CF471BDD67C100A5CEAC /* libncurses.dylib */; }; 23CB154E1D66DA9300EDDDE1 /* liblldb-core.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2689FFCA13353D7A00698AC0 /* liblldb-core.a */; }; 23D0658F1D4A7BEE0008EDE6 /* RenderScriptExpressionOpts.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 23D065821D4A7BDA0008EDE6 /* RenderScriptExpressionOpts.cpp */; }; 23D065901D4A7BEE0008EDE6 /* RenderScriptRuntime.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 23D065841D4A7BDA0008EDE6 /* RenderScriptRuntime.cpp */; }; 23D065911D4A7BEE0008EDE6 /* RenderScriptx86ABIFixups.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 23D065861D4A7BDA0008EDE6 /* RenderScriptx86ABIFixups.cpp */; }; 23D4007D1C2101F2000C3885 /* DWARFDebugMacro.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 23E77CD61C20F29F007192AD /* DWARFDebugMacro.cpp */; }; 23D4007E1C210201000C3885 /* DebugMacros.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 23E77CDB1C20F2F2007192AD /* DebugMacros.cpp */; }; 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, ); }; }; 23DCEA461D1C4D0F00A602B4 /* SBMemoryRegionInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 23DCEA421D1C4C6900A602B4 /* SBMemoryRegionInfo.cpp */; }; 23DCEA471D1C4D0F00A602B4 /* SBMemoryRegionInfoList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 23DCEA431D1C4C6900A602B4 /* SBMemoryRegionInfoList.cpp */; }; 23DDF226196C3EE600BB8417 /* CommandOptionValidators.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 23DDF224196C3EE600BB8417 /* CommandOptionValidators.cpp */; }; 23E2E5251D90373D006F38BB /* ArchSpecTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 23E2E5161D903689006F38BB /* ArchSpecTest.cpp */; }; 23E2E5271D903782006F38BB /* MinidumpParserTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 23E2E51A1D9036F2006F38BB /* MinidumpParserTest.cpp */; }; 23E2E5321D903832006F38BB /* BreakpointIDTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 23E2E52D1D90382B006F38BB /* BreakpointIDTest.cpp */; }; 23E2E5441D904913006F38BB /* MinidumpParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 23E2E5371D9048FB006F38BB /* MinidumpParser.cpp */; }; 23E2E5451D904913006F38BB /* MinidumpTypes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 23E2E5391D9048FB006F38BB /* MinidumpTypes.cpp */; }; 23EFE389193D1ABC00E54E54 /* SBTypeEnumMember.h in Headers */ = {isa = PBXBuildFile; fileRef = 23EFE388193D1ABC00E54E54 /* SBTypeEnumMember.h */; settings = {ATTRIBUTES = (Public, ); }; }; 23EFE38B193D1AEC00E54E54 /* SBTypeEnumMember.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 23EFE38A193D1AEC00E54E54 /* SBTypeEnumMember.cpp */; }; 23F4034D1926E0F60046DC9B /* NativeRegisterContextRegisterInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 23F403481926CC250046DC9B /* NativeRegisterContextRegisterInfo.cpp */; }; 250D6AE31A9679440049CC70 /* FileSystem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 250D6AE11A9679270049CC70 /* FileSystem.cpp */; }; 25420ECD1A6490B8009ADBCB /* OptionValueChar.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 25420ECC1A6490B8009ADBCB /* OptionValueChar.cpp */; }; 25420ED21A649D88009ADBCB /* PipeBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 25420ED11A649D88009ADBCB /* PipeBase.cpp */; }; 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, ); }; }; 254FBBA31A9166F100BD6378 /* SBAttachInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 254FBBA21A9166F100BD6378 /* SBAttachInfo.h */; settings = {ATTRIBUTES = (Public, ); }; }; 254FBBA51A91670E00BD6378 /* SBAttachInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 254FBBA41A91670E00BD6378 /* SBAttachInfo.cpp */; }; 255EFF741AFABA720069F277 /* LockFileBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 255EFF731AFABA720069F277 /* LockFileBase.cpp */; }; 255EFF761AFABA950069F277 /* LockFilePosix.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 255EFF751AFABA950069F277 /* LockFilePosix.cpp */; }; 256CBDB41ADD0EFD00BC6CDC /* RegisterContextPOSIXCore_arm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 256CBDB21ADD0EFD00BC6CDC /* RegisterContextPOSIXCore_arm.cpp */; }; 256CBDBC1ADD107200BC6CDC /* RegisterContextLinux_mips64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 256CBDB81ADD107200BC6CDC /* RegisterContextLinux_mips64.cpp */; }; 256CBDC01ADD11C000BC6CDC /* RegisterContextPOSIX_arm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 256CBDBE1ADD11C000BC6CDC /* RegisterContextPOSIX_arm.cpp */; }; 2579065C1BD0488100178368 /* TCPSocket.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2579065A1BD0488100178368 /* TCPSocket.cpp */; }; 2579065D1BD0488100178368 /* UDPSocket.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2579065B1BD0488100178368 /* UDPSocket.cpp */; }; 2579065F1BD0488D00178368 /* DomainSocket.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2579065E1BD0488D00178368 /* DomainSocket.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 */; }; 260157C61885F51C00F875CF /* libpanel.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 260157C41885F4FF00F875CF /* libpanel.dylib */; }; 260157C81885F53100F875CF /* libpanel.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 260157C41885F4FF00F875CF /* libpanel.dylib */; }; 2606EDDF184E68A10034641B /* liblldb-core.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2689FFCA13353D7A00698AC0 /* liblldb-core.a */; }; 260A63171861008E00FECF8E /* IOHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = 260A63161861008E00FECF8E /* IOHandler.h */; }; 260A63191861009E00FECF8E /* IOHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260A63181861009E00FECF8E /* IOHandler.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 */; }; 260CC64B15D0440D002BF2E0 /* OptionValueProperties.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260CC63E15D0440D002BF2E0 /* OptionValueProperties.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 */; }; 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 */; }; 260E07C6136FA69E00CF21D3 /* OptionGroupUUID.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260E07C5136FA69E00CF21D3 /* OptionGroupUUID.cpp */; }; 260E07C8136FAB9200CF21D3 /* OptionGroupFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260E07C7136FAB9200CF21D3 /* OptionGroupFile.cpp */; }; 26151DC31B41E4A200FF7F1C /* SharingPtr.h in Headers */ = {isa = PBXBuildFile; fileRef = 261B5A5311C3F2AD00AABD0A /* SharingPtr.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, ); }; }; 262173A318395D4600C52091 /* SectionLoadHistory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 262173A218395D4600C52091 /* SectionLoadHistory.cpp */; }; 26274FA714030F79006BA130 /* DynamicLoaderDarwinKernel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26274FA514030F79006BA130 /* DynamicLoaderDarwinKernel.cpp */; }; 2628A4D513D4977900F5487A /* ThreadKDP.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2628A4D313D4977900F5487A /* ThreadKDP.cpp */; }; 262CFC7711A4510000946C6C /* debugserver in Resources */ = {isa = PBXBuildFile; fileRef = 26CE05A0115C31E50022F371 /* debugserver */; }; 262ED0081631FA3A00879631 /* OptionGroupString.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 262ED0071631FA3A00879631 /* OptionGroupString.cpp */; }; 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, ); }; }; 2635879417822FC2004C30BA /* SymbolVendorELF.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2635879017822E56004C30BA /* SymbolVendorELF.cpp */; }; 263641191B34AEE200145B2F /* ABISysV_mips64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 263641151B34AEE200145B2F /* ABISysV_mips64.cpp */; }; 26368A3C126B697600E8659F /* darwin-debug.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26368A3B126B697600E8659F /* darwin-debug.cpp */; }; 26368AF7126B960500E8659F /* darwin-debug in Resources */ = {isa = PBXBuildFile; fileRef = 26579F68126A25920007C5CB /* darwin-debug */; }; 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, ); }; }; 263E949F13661AEA00E7D1CE /* UnwindAssembly-x86.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 263E949D13661AE400E7D1CE /* UnwindAssembly-x86.cpp */; }; 263FDE601A79A01500E68013 /* FormatEntity.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 263FDE5F1A79A01500E68013 /* FormatEntity.cpp */; }; 2640E19F15DC78FD00F23B50 /* Property.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2640E19E15DC78FD00F23B50 /* Property.cpp */; }; 264297571D1DF247003F2BF4 /* SBMemoryRegionInfoList.h in Headers */ = {isa = PBXBuildFile; fileRef = 264297541D1DF209003F2BF4 /* SBMemoryRegionInfoList.h */; settings = {ATTRIBUTES = (Public, ); }; }; 264297581D1DF250003F2BF4 /* SBMemoryRegionInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 264297531D1DF209003F2BF4 /* SBMemoryRegionInfo.h */; settings = {ATTRIBUTES = (Public, ); }; }; 2642FBAE13D003B400ED6808 /* CommunicationKDP.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2642FBA813D003B400ED6808 /* CommunicationKDP.cpp */; }; 2642FBB013D003B400ED6808 /* ProcessKDP.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2642FBAA13D003B400ED6808 /* ProcessKDP.cpp */; }; 2642FBB213D003B400ED6808 /* ProcessKDPLog.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2642FBAC13D003B400ED6808 /* ProcessKDPLog.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 */; }; 26474CAC18D0CB070073DEBA /* RegisterContextFreeBSD_x86_64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26474CA618D0CB070073DEBA /* RegisterContextFreeBSD_x86_64.cpp */; }; 26474CB218D0CB180073DEBA /* RegisterContextLinux_i386.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26474CAE18D0CB180073DEBA /* RegisterContextLinux_i386.cpp */; }; 26474CB418D0CB180073DEBA /* RegisterContextLinux_x86_64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26474CB018D0CB180073DEBA /* RegisterContextLinux_x86_64.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 */; }; 26474CCB18D0CB5B0073DEBA /* RegisterContextPOSIX_mips64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26474CC418D0CB5B0073DEBA /* RegisterContextPOSIX_mips64.cpp */; }; 26474CCD18D0CB5B0073DEBA /* RegisterContextPOSIX_x86.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26474CC618D0CB5B0073DEBA /* RegisterContextPOSIX_x86.cpp */; }; 26491E3E15E1DB9F00CBFFC2 /* OptionValueRegex.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26491E3D15E1DB9F00CBFFC2 /* OptionValueRegex.cpp */; }; 264A12FC1372522000875C42 /* EmulateInstructionARM64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 264A12FA1372522000875C42 /* EmulateInstructionARM64.cpp */; }; 264A58EE1A7DBCAD00A6B1B0 /* OptionValueFormatEntity.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 264A58ED1A7DBCAD00A6B1B0 /* OptionValueFormatEntity.cpp */; }; 264A97BF133918BC0017F0BE /* PlatformRemoteGDBServer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 264A97BD133918BC0017F0BE /* PlatformRemoteGDBServer.cpp */; }; 264D8D5013661BD7003A368F /* UnwindAssembly.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 264D8D4F13661BD7003A368F /* UnwindAssembly.cpp */; }; 265192C61BA8E905002F08F6 /* CompilerDecl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 265192C51BA8E905002F08F6 /* CompilerDecl.cpp */; }; 265205A813D3E3F700132FE2 /* RegisterContextKDP_arm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 265205A213D3E3F700132FE2 /* RegisterContextKDP_arm.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 */; }; 2654A6801E54D59400DA1013 /* ModuleCache.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2654A67F1E54D59400DA1013 /* ModuleCache.cpp */; }; 2654A6831E54D5E200DA1013 /* RegisterNumber.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2654A6821E54D5E200DA1013 /* RegisterNumber.cpp */; }; 2654A68D1E552D1500DA1013 /* PseudoTerminal.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2654A68C1E552D1500DA1013 /* PseudoTerminal.cpp */; }; 2654A6901E552ED500DA1013 /* VASprintf.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2654A68F1E552ED500DA1013 /* VASprintf.cpp */; }; 2656BBC31AE0739C00441749 /* libedit.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 26F5C32A10F3DFDD009D5894 /* libedit.dylib */; }; 2656BBC41AE073A800441749 /* libncurses.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 2670F8111862B44A006B332C /* libncurses.dylib */; }; 2656BBC51AE073AD00441749 /* libpanel.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 260157C41885F4FF00F875CF /* libpanel.dylib */; }; 2656BBC61AE073B500441749 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 966C6B7818E6A56A0093F5EC /* libz.dylib */; }; 2657AFB71B86910100958979 /* CompilerDeclContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2657AFB61B86910100958979 /* CompilerDeclContext.cpp */; }; 2660AAB914622483003A9694 /* LLDBWrapPython.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26A4EEB511682AAC007A372A /* LLDBWrapPython.cpp */; settings = {COMPILER_FLAGS = "-Dregister="; }; }; 26651A18133BF9E0005B64B7 /* Opcode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26651A17133BF9DF005B64B7 /* Opcode.cpp */; }; 2666ADC61B3CB675001FAFD3 /* DynamicLoaderHexagonDYLD.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2666ADC11B3CB675001FAFD3 /* DynamicLoaderHexagonDYLD.cpp */; }; 2666ADC81B3CB675001FAFD3 /* HexagonDYLDRendezvous.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2666ADC31B3CB675001FAFD3 /* HexagonDYLDRendezvous.cpp */; }; 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, ); }; }; 26680214115FD12C008E1FE4 /* lldb-types.h in Headers */ = {isa = PBXBuildFile; fileRef = 26BC7C2910F1B3BC00F91463 /* lldb-types.h */; settings = {ATTRIBUTES = (Public, ); }; }; 26680219115FD13D008E1FE4 /* SBBreakpoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 9AF16A9E11402D69007A7B3F /* SBBreakpoint.h */; settings = {ATTRIBUTES = (Public, ); }; }; 2668021A115FD13D008E1FE4 /* SBBreakpointLocation.h in Headers */ = {isa = PBXBuildFile; fileRef = 9AF16CC611408686007A7B3F /* SBBreakpointLocation.h */; settings = {ATTRIBUTES = (Public, ); }; }; 2668021B115FD13D008E1FE4 /* SBBroadcaster.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A9830F31125FC5800A56CB0 /* SBBroadcaster.h */; settings = {ATTRIBUTES = (Public, ); }; }; 2668021D115FD13D008E1FE4 /* SBCommandInterpreter.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A9830F71125FC5800A56CB0 /* SBCommandInterpreter.h */; settings = {ATTRIBUTES = (Public, ); }; }; 2668021E115FD13D008E1FE4 /* SBCommandReturnObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A9830F91125FC5800A56CB0 /* SBCommandReturnObject.h */; settings = {ATTRIBUTES = (Public, ); }; }; 2668021F115FD13D008E1FE4 /* SBCommunication.h in Headers */ = {isa = PBXBuildFile; fileRef = 260223E7115F06D500A601A2 /* SBCommunication.h */; settings = {ATTRIBUTES = (Public, ); }; }; 26680220115FD13D008E1FE4 /* SBDebugger.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A9830FB1125FC5800A56CB0 /* SBDebugger.h */; settings = {ATTRIBUTES = (Public, ); }; }; 26680221115FD13D008E1FE4 /* SBDefines.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A9830FC1125FC5800A56CB0 /* SBDefines.h */; settings = {ATTRIBUTES = (Public, ); }; }; 26680222115FD13D008E1FE4 /* SBError.h in Headers */ = {isa = PBXBuildFile; fileRef = 2682F286115EF3BD00CCFF99 /* SBError.h */; settings = {ATTRIBUTES = (Public, ); }; }; 26680223115FD13D008E1FE4 /* SBEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A9830FE1125FC5800A56CB0 /* SBEvent.h */; settings = {ATTRIBUTES = (Public, ); }; }; 26680224115FD13D008E1FE4 /* SBFileSpec.h in Headers */ = {isa = PBXBuildFile; fileRef = 26022531115F27FA00A601A2 /* SBFileSpec.h */; settings = {ATTRIBUTES = (Public, ); }; }; 26680225115FD13D008E1FE4 /* SBFrame.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A633FE8112DCE3C001A7E43 /* SBFrame.h */; settings = {ATTRIBUTES = (Public, ); }; }; 26680227115FD13D008E1FE4 /* SBListener.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A9831021125FC5800A56CB0 /* SBListener.h */; settings = {ATTRIBUTES = (Public, ); }; }; 2668022A115FD13D008E1FE4 /* SBProcess.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A9831041125FC5800A56CB0 /* SBProcess.h */; settings = {ATTRIBUTES = (Public, ); }; }; 2668022B115FD13D008E1FE4 /* SBSourceManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A9831061125FC5800A56CB0 /* SBSourceManager.h */; settings = {ATTRIBUTES = (Public, ); }; }; 2668022C115FD13D008E1FE4 /* SBTarget.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A9831081125FC5800A56CB0 /* SBTarget.h */; settings = {ATTRIBUTES = (Public, ); }; }; 2668022E115FD13D008E1FE4 /* SBThread.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A98310A1125FC5800A56CB0 /* SBThread.h */; settings = {ATTRIBUTES = (Public, ); }; }; 2668022F115FD19D008E1FE4 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 26F5C39010F3FA26009D5894 /* CoreFoundation.framework */; }; 26680233115FD1A7008E1FE4 /* libobjc.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 26F5C37410F3F61B009D5894 /* libobjc.dylib */; }; 26680324116005D9008E1FE4 /* SBThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A9831091125FC5800A56CB0 /* SBThread.cpp */; }; 26680326116005DB008E1FE4 /* SBTarget.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A9831071125FC5800A56CB0 /* SBTarget.cpp */; }; 26680327116005DC008E1FE4 /* SBSourceManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A9831051125FC5800A56CB0 /* SBSourceManager.cpp */; }; 26680328116005DE008E1FE4 /* SBProcess.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A9831031125FC5800A56CB0 /* SBProcess.cpp */; }; 2668032A116005E0008E1FE4 /* SBListener.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A9831011125FC5800A56CB0 /* SBListener.cpp */; }; 2668032C116005E2008E1FE4 /* SBFrame.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A633FE7112DCE3C001A7E43 /* SBFrame.cpp */; }; 2668032D116005E3008E1FE4 /* SBFileSpec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26022532115F281400A601A2 /* SBFileSpec.cpp */; }; 2668032E116005E5008E1FE4 /* SBEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A9830FD1125FC5800A56CB0 /* SBEvent.cpp */; }; 2668032F116005E6008E1FE4 /* SBError.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2682F284115EF3A700CCFF99 /* SBError.cpp */; }; 26680330116005E7008E1FE4 /* SBDebugger.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A9830FA1125FC5800A56CB0 /* SBDebugger.cpp */; }; 26680331116005E9008E1FE4 /* SBCommunication.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260223E8115F06E500A601A2 /* SBCommunication.cpp */; }; 26680332116005EA008E1FE4 /* SBCommandReturnObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A9830F81125FC5800A56CB0 /* SBCommandReturnObject.cpp */; }; 26680333116005EC008E1FE4 /* SBCommandInterpreter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A9830F61125FC5800A56CB0 /* SBCommandInterpreter.cpp */; }; 26680335116005EE008E1FE4 /* SBBroadcaster.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A9830F21125FC5800A56CB0 /* SBBroadcaster.cpp */; }; 26680336116005EF008E1FE4 /* SBBreakpointLocation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9AF16CC7114086A1007A7B3F /* SBBreakpointLocation.cpp */; }; 26680337116005F1008E1FE4 /* SBBreakpoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9AF16A9C11402D5B007A7B3F /* SBBreakpoint.cpp */; }; 2668035C11601108008E1FE4 /* LLDB.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 26680207115FD0ED008E1FE4 /* LLDB.framework */; }; 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 */; }; 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 */; }; 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 */; }; 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 */; }; 266942271A6DC2AC0063BE93 /* MICmnLLDBDebugger.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 266941AF1A6DC2AC0063BE93 /* MICmnLLDBDebugger.cpp */; }; 266942281A6DC2AC0063BE93 /* MICmnLLDBDebuggerHandleEvents.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 266941B11A6DC2AC0063BE93 /* MICmnLLDBDebuggerHandleEvents.cpp */; }; 266942291A6DC2AC0063BE93 /* MICmnLLDBDebugSessionInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 266941B31A6DC2AC0063BE93 /* MICmnLLDBDebugSessionInfo.cpp */; }; 2669422A1A6DC2AC0063BE93 /* MICmnLLDBDebugSessionInfoVarObj.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 266941B51A6DC2AC0063BE93 /* MICmnLLDBDebugSessionInfoVarObj.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 */; }; 2669424D1A6DC32B0063BE93 /* LLDB.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 26680207115FD0ED008E1FE4 /* LLDB.framework */; }; 266DFE9713FD656E00D0C574 /* OperatingSystem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 266DFE9613FD656E00D0C574 /* OperatingSystem.cpp */; }; 266E82971B8CE3AC008FCA06 /* DWARFDIE.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 266E82961B8CE3AC008FCA06 /* DWARFDIE.cpp */; }; 266E829D1B8E542C008FCA06 /* DWARFAttribute.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 266E829C1B8E542C008FCA06 /* DWARFAttribute.cpp */; }; 2670F8121862B44A006B332C /* libncurses.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 2670F8111862B44A006B332C /* libncurses.dylib */; }; 26744EF11338317700EF765A /* GDBRemoteCommunicationClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26744EED1338317700EF765A /* GDBRemoteCommunicationClient.cpp */; }; 26744EF31338317700EF765A /* GDBRemoteCommunicationServer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26744EEF1338317700EF765A /* GDBRemoteCommunicationServer.cpp */; }; 26764C971E48F482008D3573 /* ConstString.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26764C961E48F482008D3573 /* ConstString.cpp */; }; 26764C991E48F4D2008D3573 /* Error.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26764C981E48F4D2008D3573 /* Error.cpp */; }; 26764C9E1E48F51E008D3573 /* Stream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26764C9D1E48F51E008D3573 /* Stream.cpp */; }; 26764CA01E48F528008D3573 /* RegularExpression.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26764C9F1E48F528008D3573 /* RegularExpression.cpp */; }; 26764CA21E48F547008D3573 /* StreamString.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26764CA11E48F547008D3573 /* StreamString.cpp */; }; 26780C611867C33D00234593 /* libncurses.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 2670F8111862B44A006B332C /* libncurses.dylib */; }; 267A47FB1B1411C40021A5BC /* NativeRegisterContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 267A47FA1B1411C40021A5BC /* NativeRegisterContext.cpp */; }; 267A47FF1B1411D90021A5BC /* NativeWatchpointList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 267A47FE1B1411D90021A5BC /* NativeWatchpointList.cpp */; }; 267A48011B1411E40021A5BC /* XML.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 267A48001B1411E40021A5BC /* XML.cpp */; }; 267C012B136880DF006E963E /* OptionGroupValueObjectDisplay.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 267C012A136880DF006E963E /* OptionGroupValueObjectDisplay.cpp */; }; 267C01371368C49C006E963E /* OptionGroupOutputFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BCFC531368B3E4006DC050 /* OptionGroupOutputFile.cpp */; }; 267DFB461B06752A00000FB7 /* MICmdArgValPrintValues.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 267DFB441B06752A00000FB7 /* MICmdArgValPrintValues.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 */; }; 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 */; }; 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 */; }; 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 */; }; 267F685A1CC02EBE0086832B /* RegisterInfos_s390x.h in Headers */ = {isa = PBXBuildFile; fileRef = 267F68591CC02EBE0086832B /* RegisterInfos_s390x.h */; }; 268648C416531BF800F04704 /* com.apple.debugserver.posix.plist in CopyFiles */ = {isa = PBXBuildFile; fileRef = 268648C116531BF800F04704 /* com.apple.debugserver.posix.plist */; }; 268648C516531BF800F04704 /* com.apple.debugserver.applist.internal.plist in CopyFiles */ = {isa = PBXBuildFile; fileRef = 268648C216531BF800F04704 /* com.apple.debugserver.applist.internal.plist */; }; 268648C616531BF800F04704 /* com.apple.debugserver.internal.plist in CopyFiles */ = {isa = PBXBuildFile; fileRef = 268648C316531BF800F04704 /* com.apple.debugserver.internal.plist */; }; 2686536C1370ACB200D186A3 /* OptionGroupBoolean.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2686536B1370ACB200D186A3 /* OptionGroupBoolean.cpp */; }; 268653701370AE7200D186A3 /* OptionGroupUInt64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2686536F1370AE7200D186A3 /* OptionGroupUInt64.cpp */; }; 2689000113353DB600698AC0 /* BreakpointResolverAddress.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26D0DD5310FE555900271C65 /* BreakpointResolverAddress.cpp */; }; 2689000313353DB600698AC0 /* BreakpointResolverFileLine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26D0DD5410FE555900271C65 /* BreakpointResolverFileLine.cpp */; }; 2689000513353DB600698AC0 /* BreakpointResolverName.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26D0DD5510FE555900271C65 /* BreakpointResolverName.cpp */; }; 2689000713353DB600698AC0 /* BreakpointSite.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E1310F1B83100F91463 /* BreakpointSite.cpp */; }; 2689000913353DB600698AC0 /* BreakpointSiteList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E1410F1B83100F91463 /* BreakpointSiteList.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 */; }; 2689001113353DB600698AC0 /* Watchpoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E1810F1B83100F91463 /* Watchpoint.cpp */; }; 2689001213353DDE00698AC0 /* CommandObjectApropos.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CA9637911B6E99A00780E28 /* CommandObjectApropos.cpp */; }; 2689001313353DDE00698AC0 /* CommandObjectArgs.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 499F381F11A5B3F300F5CE02 /* CommandObjectArgs.cpp */; }; 2689001413353DDE00698AC0 /* CommandObjectBreakpoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E2D10F1B84700F91463 /* CommandObjectBreakpoint.cpp */; }; 2689001513353DDE00698AC0 /* CommandObjectBreakpointCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A42976211861AA600FE05CD /* CommandObjectBreakpointCommand.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 */; }; 2689001B13353DDE00698AC0 /* CommandObjectHelp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E3310F1B84700F91463 /* CommandObjectHelp.cpp */; }; 2689001D13353DDE00698AC0 /* CommandObjectLog.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 264AD83711095BA600E0B039 /* CommandObjectLog.cpp */; }; 2689001E13353DDE00698AC0 /* CommandObjectMemory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E3610F1B84700F91463 /* CommandObjectMemory.cpp */; }; 2689001F13353DDE00698AC0 /* CommandObjectPlatform.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26879CE71333F58B0012C1F8 /* CommandObjectPlatform.cpp */; }; 2689002013353DDE00698AC0 /* CommandObjectProcess.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E3810F1B84700F91463 /* CommandObjectProcess.cpp */; }; 2689002113353DDE00698AC0 /* CommandObjectQuit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E3910F1B84700F91463 /* CommandObjectQuit.cpp */; }; 2689002213353DDE00698AC0 /* CommandObjectRegister.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E3B10F1B84700F91463 /* CommandObjectRegister.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 */; }; 2689002613353DDE00698AC0 /* CommandObjectSyntax.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E4510F1B84700F91463 /* CommandObjectSyntax.cpp */; }; 2689002713353DDE00698AC0 /* CommandObjectTarget.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 269416AD119A024800FF2715 /* CommandObjectTarget.cpp */; }; 2689002813353DDE00698AC0 /* CommandObjectThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E4610F1B84700F91463 /* CommandObjectThread.cpp */; }; 2689002913353DDE00698AC0 /* CommandObjectVersion.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B296983412C2FB2B002D92C3 /* CommandObjectVersion.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 */; }; 2689002F13353E0400698AC0 /* ArchSpec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E6B10F1B85900F91463 /* ArchSpec.cpp */; }; 2689003113353E0400698AC0 /* Broadcaster.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E6D10F1B85900F91463 /* Broadcaster.cpp */; }; 2689003213353E0400698AC0 /* Communication.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E6E10F1B85900F91463 /* Communication.cpp */; }; 2689003313353E0400698AC0 /* Connection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E6F10F1B85900F91463 /* Connection.cpp */; }; 2689003913353E0400698AC0 /* Debugger.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 263664921140A4930075843B /* Debugger.cpp */; }; 2689003A13353E0400698AC0 /* Disassembler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E7610F1B85900F91463 /* Disassembler.cpp */; }; 2689003B13353E0400698AC0 /* EmulateInstruction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26D9FDC812F784FD0003F2EE /* EmulateInstruction.cpp */; }; 2689003D13353E0400698AC0 /* Event.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E7910F1B85900F91463 /* Event.cpp */; }; 2689003E13353E0400698AC0 /* FileSpecList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E7B10F1B85900F91463 /* FileSpecList.cpp */; }; 2689004113353E0400698AC0 /* Listener.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E7E10F1B85900F91463 /* Listener.cpp */; }; 2689004213353E0400698AC0 /* Log.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E7F10F1B85900F91463 /* Log.cpp */; }; 2689004313353E0400698AC0 /* Mangled.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E8010F1B85900F91463 /* Mangled.cpp */; }; 2689004413353E0400698AC0 /* Module.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E8110F1B85900F91463 /* Module.cpp */; }; 2689004513353E0400698AC0 /* ModuleChild.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E8210F1B85900F91463 /* ModuleChild.cpp */; }; 2689004613353E0400698AC0 /* ModuleList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E8310F1B85900F91463 /* ModuleList.cpp */; }; 2689004713353E0400698AC0 /* PluginManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E8A10F1B85900F91463 /* PluginManager.cpp */; }; 2689004913353E0400698AC0 /* Scalar.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E8D10F1B85900F91463 /* Scalar.cpp */; }; 2689004A13353E0400698AC0 /* SearchFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E1510F1B83100F91463 /* SearchFilter.cpp */; }; 2689004B13353E0400698AC0 /* Section.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E8E10F1B85900F91463 /* Section.cpp */; }; 2689004C13353E0400698AC0 /* SourceManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E8F10F1B85900F91463 /* SourceManager.cpp */; }; 2689004D13353E0400698AC0 /* State.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E9010F1B85900F91463 /* State.cpp */; }; 2689004F13353E0400698AC0 /* StreamFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E9210F1B85900F91463 /* StreamFile.cpp */; }; 2689005113353E0400698AC0 /* StringList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A35765F116E76B900E8ED2F /* StringList.cpp */; }; 2689005213353E0400698AC0 /* Timer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E9610F1B85900F91463 /* Timer.cpp */; }; 2689005413353E0400698AC0 /* UserSettingsController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A4633DC11F65D9A00955CE1 /* UserSettingsController.cpp */; }; 2689005613353E0400698AC0 /* Value.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E9910F1B85900F91463 /* Value.cpp */; }; 2689005713353E0400698AC0 /* ValueObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E9A10F1B85900F91463 /* ValueObject.cpp */; }; 2689005813353E0400698AC0 /* ValueObjectChild.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E9B10F1B85900F91463 /* ValueObjectChild.cpp */; }; 2689005913353E0400698AC0 /* ValueObjectConstResult.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26424E3C125986CB0016D82C /* ValueObjectConstResult.cpp */; }; 2689005A13353E0400698AC0 /* ValueObjectList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E9C10F1B85900F91463 /* ValueObjectList.cpp */; }; 2689005B13353E0400698AC0 /* ValueObjectRegister.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 264334381110F63100CDB6C6 /* ValueObjectRegister.cpp */; }; 2689005C13353E0400698AC0 /* ValueObjectVariable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E9D10F1B85900F91463 /* ValueObjectVariable.cpp */; }; 2689005E13353E0E00698AC0 /* ClangASTSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49D7072811B5AD11001AD875 /* ClangASTSource.cpp */; }; 2689005F13353E0E00698AC0 /* ClangFunctionCaller.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C98D3DA118FB96F00E575D0 /* ClangFunctionCaller.cpp */; }; 2689006013353E0E00698AC0 /* ClangExpressionDeclMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49F1A74511B3388F003ED505 /* ClangExpressionDeclMap.cpp */; }; 2689006113353E0E00698AC0 /* ClangExpressionParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49445C2512245E3600C11A81 /* ClangExpressionParser.cpp */; }; 2689006313353E0E00698AC0 /* ClangPersistentVariables.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49D4FE871210B61C00CDB854 /* ClangPersistentVariables.cpp */; }; 2689006413353E0E00698AC0 /* ClangUserExpression.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7ED510F1B86700F91463 /* ClangUserExpression.cpp */; }; 2689006513353E0E00698AC0 /* ClangUtilityFunction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 497C86BD122823D800B54702 /* ClangUtilityFunction.cpp */; }; 2689006613353E0E00698AC0 /* DWARFExpression.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7ED810F1B86700F91463 /* DWARFExpression.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 */; }; 2689006A13353E0E00698AC0 /* IRDynamicChecks.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49CF9829122C70BD007A0B96 /* IRDynamicChecks.cpp */; }; 2689006B13353E0E00698AC0 /* IRForTarget.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49307AAD11DEA4D90081F992 /* IRForTarget.cpp */; }; 2689006D13353E0E00698AC0 /* IRExecutionUnit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C98D3DB118FB96F00E575D0 /* IRExecutionUnit.cpp */; }; 2689006E13353E1A00698AC0 /* File.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260C6EA213011581005E16B0 /* File.cpp */; }; 2689006F13353E1A00698AC0 /* FileSpec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26FA43171301048600E71120 /* FileSpec.cpp */; }; 2689007113353E1A00698AC0 /* Host.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 69A01E1C1236C5D400C660B5 /* Host.cpp */; }; 2689007313353E1A00698AC0 /* Symbols.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 69A01E1F1236C5D400C660B5 /* Symbols.cpp */; }; 2689007413353E1A00698AC0 /* Terminal.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 268DA873130095ED00C9483A /* Terminal.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 */; }; 2689007C13353E1A00698AC0 /* Symbols.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2689B0B5113EE47E00A4AEDB /* Symbols.cpp */; }; 2689007D13353E2200698AC0 /* Args.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E6C10F1B85900F91463 /* Args.cpp */; }; 2689007F13353E2200698AC0 /* CommandCompletions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C09CB74116BD98B00C7A725 /* CommandCompletions.cpp */; }; 2689008013353E2200698AC0 /* CommandInterpreter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7F0810F1B8DD00F91463 /* CommandInterpreter.cpp */; }; 2689008113353E2200698AC0 /* CommandObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7F0910F1B8DD00F91463 /* CommandObject.cpp */; }; 2689008313353E2200698AC0 /* CommandObjectMultiword.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26DFBC58113B48F300DD817F /* CommandObjectMultiword.cpp */; }; 2689008413353E2200698AC0 /* CommandObjectRegexCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26DFBC59113B48F300DD817F /* CommandObjectRegexCommand.cpp */; }; 2689008513353E2200698AC0 /* CommandReturnObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7F0A10F1B8DD00F91463 /* CommandReturnObject.cpp */; }; 2689008613353E2200698AC0 /* Options.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E8610F1B85900F91463 /* Options.cpp */; }; 2689008713353E2200698AC0 /* ScriptInterpreter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A82010B10FFB49800182560 /* ScriptInterpreter.cpp */; }; 2689008D13353E4200698AC0 /* DynamicLoaderMacOSXDYLD.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260C897A10F57C5600BB2B04 /* DynamicLoaderMacOSXDYLD.cpp */; }; 2689008E13353E4200698AC0 /* DynamicLoaderStatic.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 268A683D1321B53B000E3FB8 /* DynamicLoaderStatic.cpp */; }; 2689009613353E4200698AC0 /* ObjectContainerBSDArchive.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26A3B4AC1181454800381BC2 /* ObjectContainerBSDArchive.cpp */; }; 2689009713353E4200698AC0 /* ObjectContainerUniversalMachO.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260C898010F57C5600BB2B04 /* ObjectContainerUniversalMachO.cpp */; }; 2689009813353E4200698AC0 /* ELFHeader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26D27C9D11ED3A4E0024D721 /* ELFHeader.cpp */; }; 2689009913353E4200698AC0 /* ObjectFileELF.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260C898510F57C5600BB2B04 /* ObjectFileELF.cpp */; }; 2689009A13353E4200698AC0 /* ObjectFileMachO.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260C898810F57C5600BB2B04 /* ObjectFileMachO.cpp */; }; 2689009B13353E4200698AC0 /* PlatformMacOSX.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26C5577B132575AD008FD8FE /* PlatformMacOSX.cpp */; }; 2689009C13353E4200698AC0 /* PlatformRemoteiOS.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2675F6FE1332BE690067997B /* PlatformRemoteiOS.cpp */; }; 2689009D13353E4200698AC0 /* GDBRemoteCommunication.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2618EE5B1315B29C001D6D71 /* GDBRemoteCommunication.cpp */; }; 2689009E13353E4200698AC0 /* GDBRemoteRegisterContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2618EE5D1315B29C001D6D71 /* GDBRemoteRegisterContext.cpp */; }; 2689009F13353E4200698AC0 /* ProcessGDBRemote.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2618EE5F1315B29C001D6D71 /* ProcessGDBRemote.cpp */; }; 268900A013353E4200698AC0 /* ProcessGDBRemoteLog.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2618EE611315B29C001D6D71 /* ProcessGDBRemoteLog.cpp */; }; 268900A113353E4200698AC0 /* ThreadGDBRemote.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2618EE631315B29C001D6D71 /* ThreadGDBRemote.cpp */; }; 268900AF13353E5000698AC0 /* UnwindLLDB.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF68D32F1255A110002FF25B /* UnwindLLDB.cpp */; }; 268900B013353E5000698AC0 /* RegisterContextLLDB.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF68D2541255416E002FF25B /* RegisterContextLLDB.cpp */; }; 268900B413353E5000698AC0 /* RegisterContextMacOSXFrameBackchain.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26E3EEF711A994E800FBADB6 /* RegisterContextMacOSXFrameBackchain.cpp */; }; 268900B513353E5000698AC0 /* StopInfoMachException.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2615DBC81208B5FC0021781D /* StopInfoMachException.cpp */; }; 268900B613353E5000698AC0 /* UnwindMacOSXFrameBackchain.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26E3EEE311A9901300FBADB6 /* UnwindMacOSXFrameBackchain.cpp */; }; 268900B713353E5F00698AC0 /* DWARFAbbreviationDeclaration.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260C89B310F57C5600BB2B04 /* DWARFAbbreviationDeclaration.cpp */; }; 268900B813353E5F00698AC0 /* DWARFCompileUnit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260C89B710F57C5600BB2B04 /* DWARFCompileUnit.cpp */; }; 268900B913353E5F00698AC0 /* DWARFDebugAbbrev.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260C89B910F57C5600BB2B04 /* DWARFDebugAbbrev.cpp */; }; 268900BA13353E5F00698AC0 /* DWARFDebugAranges.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260C89BB10F57C5600BB2B04 /* DWARFDebugAranges.cpp */; }; 268900BB13353E5F00698AC0 /* DWARFDebugArangeSet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260C89BD10F57C5600BB2B04 /* DWARFDebugArangeSet.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 */; }; 268900BF13353E5F00698AC0 /* DWARFDebugMacinfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260C89C510F57C5600BB2B04 /* DWARFDebugMacinfo.cpp */; }; 268900C013353E5F00698AC0 /* DWARFDebugMacinfoEntry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260C89C710F57C5600BB2B04 /* DWARFDebugMacinfoEntry.cpp */; }; 268900C113353E5F00698AC0 /* DWARFDebugPubnames.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260C89C910F57C5600BB2B04 /* DWARFDebugPubnames.cpp */; }; 268900C213353E5F00698AC0 /* DWARFDebugPubnamesSet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260C89CB10F57C5600BB2B04 /* DWARFDebugPubnamesSet.cpp */; }; 268900C313353E5F00698AC0 /* DWARFDebugRanges.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260C89CD10F57C5600BB2B04 /* DWARFDebugRanges.cpp */; }; 268900C413353E5F00698AC0 /* DWARFDefines.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260C89CF10F57C5600BB2B04 /* DWARFDefines.cpp */; }; 268900C513353E5F00698AC0 /* DWARFDIECollection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260C89D110F57C5600BB2B04 /* DWARFDIECollection.cpp */; }; 268900C613353E5F00698AC0 /* DWARFFormValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260C89D310F57C5600BB2B04 /* DWARFFormValue.cpp */; }; 268900C913353E5F00698AC0 /* NameToDIE.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2618D9EA12406FE600F2B8FE /* NameToDIE.cpp */; }; 268900CA13353E5F00698AC0 /* SymbolFileDWARF.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260C89D910F57C5600BB2B04 /* SymbolFileDWARF.cpp */; }; 268900CB13353E5F00698AC0 /* LogChannelDWARF.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26109B3B1155D70100CC3529 /* LogChannelDWARF.cpp */; }; 268900CC13353E5F00698AC0 /* SymbolFileDWARFDebugMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260C89DB10F57C5600BB2B04 /* SymbolFileDWARFDebugMap.cpp */; }; 268900CD13353E5F00698AC0 /* UniqueDWARFASTType.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26B8B42312EEC52A00A831B2 /* UniqueDWARFASTType.cpp */; }; 268900CE13353E5F00698AC0 /* SymbolFileSymtab.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260C89DE10F57C5600BB2B04 /* SymbolFileSymtab.cpp */; }; 268900CF13353E5F00698AC0 /* SymbolVendorMacOSX.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260C89E210F57C5600BB2B04 /* SymbolVendorMacOSX.cpp */; }; 268900D013353E6F00698AC0 /* Block.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7F1310F1B8EC00F91463 /* Block.cpp */; }; 268900D113353E6F00698AC0 /* ClangASTContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7F1410F1B8EC00F91463 /* ClangASTContext.cpp */; }; 268900D213353E6F00698AC0 /* CompilerType.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49E45FAD11F660FE008F7B28 /* CompilerType.cpp */; }; 268900D313353E6F00698AC0 /* ClangExternalASTSourceCallbacks.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26E69030129C6BEF00DDECD9 /* ClangExternalASTSourceCallbacks.cpp */; }; 268900D513353E6F00698AC0 /* CompileUnit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7F1510F1B8EC00F91463 /* CompileUnit.cpp */; }; 268900D613353E6F00698AC0 /* Declaration.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7F1610F1B8EC00F91463 /* Declaration.cpp */; }; 268900D713353E6F00698AC0 /* DWARFCallFrameInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7F1710F1B8EC00F91463 /* DWARFCallFrameInfo.cpp */; }; 268900D813353E6F00698AC0 /* Function.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7F1810F1B8EC00F91463 /* Function.cpp */; }; 268900D913353E6F00698AC0 /* FuncUnwinders.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 961FABB81235DE1600F93A47 /* FuncUnwinders.cpp */; }; 268900DA13353E6F00698AC0 /* LineEntry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7F1910F1B8EC00F91463 /* LineEntry.cpp */; }; 268900DB13353E6F00698AC0 /* LineTable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7F1A10F1B8EC00F91463 /* LineTable.cpp */; }; 268900DC13353E6F00698AC0 /* ObjectFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7F4C10F1BC1A00F91463 /* ObjectFile.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 */; }; 268900E013353E6F00698AC0 /* SymbolVendor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF94005711C03F6500085DB9 /* SymbolVendor.cpp */; }; 268900E113353E6F00698AC0 /* Symtab.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7F1F10F1B8EC00F91463 /* Symtab.cpp */; }; 268900E213353E6F00698AC0 /* Type.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7F2010F1B8EC00F91463 /* Type.cpp */; }; 268900E313353E6F00698AC0 /* TypeList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7F2110F1B8EC00F91463 /* TypeList.cpp */; }; 268900E413353E6F00698AC0 /* UnwindPlan.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 961FABB91235DE1600F93A47 /* UnwindPlan.cpp */; }; 268900E513353E6F00698AC0 /* UnwindTable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 961FABBA1235DE1600F93A47 /* UnwindTable.cpp */; }; 268900E613353E6F00698AC0 /* Variable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7F2210F1B8EC00F91463 /* Variable.cpp */; }; 268900E713353E6F00698AC0 /* VariableList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7F2310F1B8EC00F91463 /* VariableList.cpp */; }; 268900E813353E6F00698AC0 /* ABI.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 497E7B9D1188F6690065CCA1 /* ABI.cpp */; }; 268900E913353E6F00698AC0 /* CPPLanguageRuntime.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CB443BC1249920C00C13DC2 /* CPPLanguageRuntime.cpp */; }; 268900EA13353E6F00698AC0 /* DynamicLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E7710F1B85900F91463 /* DynamicLoader.cpp */; }; 268900EB13353E6F00698AC0 /* ExecutionContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7F3510F1B90C00F91463 /* ExecutionContext.cpp */; }; 268900EC13353E6F00698AC0 /* LanguageRuntime.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CB4430A12491DDA00C13DC2 /* LanguageRuntime.cpp */; }; 268900ED13353E6F00698AC0 /* ObjCLanguageRuntime.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CB443F212499B5000C13DC2 /* ObjCLanguageRuntime.cpp */; }; 268900EE13353E6F00698AC0 /* PathMappingList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 495BBACB119A0DBE00418BEA /* PathMappingList.cpp */; }; 268900EF13353E6F00698AC0 /* Platform.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 264A43BD1320BCEB005B4096 /* Platform.cpp */; }; 268900F013353E6F00698AC0 /* Process.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7F3610F1B90C00F91463 /* Process.cpp */; }; 268900F113353E6F00698AC0 /* RegisterContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7F3710F1B90C00F91463 /* RegisterContext.cpp */; }; 268900F213353E6F00698AC0 /* SectionLoadList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2618D7911240116900F2B8FE /* SectionLoadList.cpp */; }; 268900F313353E6F00698AC0 /* StackFrame.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7F3810F1B90C00F91463 /* StackFrame.cpp */; }; 268900F413353E6F00698AC0 /* StackFrameList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7F3910F1B90C00F91463 /* StackFrameList.cpp */; }; 268900F513353E6F00698AC0 /* StackID.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7F3A10F1B90C00F91463 /* StackID.cpp */; }; 268900F613353E6F00698AC0 /* StopInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2615DB861208A9E40021781D /* StopInfo.cpp */; }; 268900F713353E6F00698AC0 /* Target.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7F3B10F1B90C00F91463 /* Target.cpp */; }; 268900F813353E6F00698AC0 /* TargetList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7F3C10F1B90C00F91463 /* TargetList.cpp */; }; 268900F913353E6F00698AC0 /* Thread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7F3D10F1B90C00F91463 /* Thread.cpp */; }; 268900FA13353E6F00698AC0 /* ThreadList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7F3E10F1B90C00F91463 /* ThreadList.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 */; }; 268900FE13353E6F00698AC0 /* ThreadPlanCallUserExpression.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C7CF7E51295E12B00B4FBB5 /* ThreadPlanCallUserExpression.cpp */; }; 268900FF13353E6F00698AC0 /* ThreadPlanShouldStopHere.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C43DEFA110641F300E55CBF /* ThreadPlanShouldStopHere.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 */; }; 2689010313353E6F00698AC0 /* ThreadPlanStepRange.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260C847610F50EFC00BB2B04 /* ThreadPlanStepRange.cpp */; }; 2689010413353E6F00698AC0 /* ThreadPlanStepInRange.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C43DF8911069C3200E55CBF /* ThreadPlanStepInRange.cpp */; }; 2689010513353E6F00698AC0 /* ThreadPlanStepOverRange.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C43DF8A11069C3200E55CBF /* ThreadPlanStepOverRange.cpp */; }; 2689010613353E6F00698AC0 /* ThreadPlanRunToAddress.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CAFCE031101218900CA63DB /* ThreadPlanRunToAddress.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 */; }; 2689010C13353E6F00698AC0 /* UnixSignals.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C00987011500B4300F316B0 /* UnixSignals.cpp */; }; 2689011013353E8200698AC0 /* SharingPtr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 261B5A5211C3F2AD00AABD0A /* SharingPtr.cpp */; }; 2689011113353E8200698AC0 /* StringExtractor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2660D9F611922A1300958FBD /* StringExtractor.cpp */; }; 2689011213353E8200698AC0 /* StringExtractorGDBRemote.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2676A093119C93C8008A98EF /* StringExtractorGDBRemote.cpp */; }; 268901161335BBC300698AC0 /* liblldb-core.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2689FFCA13353D7A00698AC0 /* liblldb-core.a */; }; 2689FFDA13353D9D00698AC0 /* lldb.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E7410F1B85900F91463 /* lldb.cpp */; }; 2689FFEF13353DB600698AC0 /* Breakpoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E0A10F1B83100F91463 /* Breakpoint.cpp */; }; 2689FFF113353DB600698AC0 /* BreakpointID.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E0B10F1B83100F91463 /* BreakpointID.cpp */; }; 2689FFF313353DB600698AC0 /* BreakpointIDList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E0C10F1B83100F91463 /* BreakpointIDList.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 */; }; 2689FFFD13353DB600698AC0 /* BreakpointOptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E1110F1B83100F91463 /* BreakpointOptions.cpp */; }; 2689FFFF13353DB600698AC0 /* BreakpointResolver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E1210F1B83100F91463 /* BreakpointResolver.cpp */; }; 268F9D53123AA15200B91E9B /* SBSymbolContextList.h in Headers */ = {isa = PBXBuildFile; fileRef = 268F9D52123AA15200B91E9B /* SBSymbolContextList.h */; settings = {ATTRIBUTES = (Public, ); }; }; 268F9D55123AA16600B91E9B /* SBSymbolContextList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 268F9D54123AA16600B91E9B /* SBSymbolContextList.cpp */; }; 2690B3711381D5C300ECFBAE /* Memory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2690B3701381D5C300ECFBAE /* Memory.cpp */; }; 2692BA15136610C100F9E14D /* UnwindAssemblyInstEmulation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2692BA13136610C100F9E14D /* UnwindAssemblyInstEmulation.cpp */; }; 2694E99D14FC0BB30076DE67 /* PlatformFreeBSD.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2694E99A14FC0BB30076DE67 /* PlatformFreeBSD.cpp */; }; 2694E9A414FC0BBD0076DE67 /* PlatformLinux.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2694E9A114FC0BBD0076DE67 /* PlatformLinux.cpp */; }; 26954EBE1401EE8B00294D09 /* DynamicRegisterInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26954EBC1401EE8B00294D09 /* DynamicRegisterInfo.cpp */; }; 26957D9813D381C900670048 /* RegisterContextDarwin_arm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26957D9213D381C900670048 /* RegisterContextDarwin_arm.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 */; }; 2697A39315E404B1003E682C /* OptionValueArch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2697A39215E404B1003E682C /* OptionValueArch.cpp */; }; 2697A54D133A6305004E4240 /* PlatformDarwin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2697A54B133A6305004E4240 /* PlatformDarwin.cpp */; }; 2698699B15E6CBD0002415FF /* OperatingSystemPython.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2698699815E6CBD0002415FF /* OperatingSystemPython.cpp */; }; 269DDD4A1B8FD1C300D0DBD8 /* DWARFASTParserClang.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 269DDD481B8FD1C300D0DBD8 /* DWARFASTParserClang.cpp */; }; 26A375811D59462700D6CBDB /* SelectHelper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26A3757F1D59462700D6CBDB /* SelectHelper.cpp */; }; 26A527C114E24F5F00F3A14A /* ProcessMachCore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26A527BD14E24F5F00F3A14A /* ProcessMachCore.cpp */; }; 26A527C314E24F5F00F3A14A /* ThreadMachCore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26A527BF14E24F5F00F3A14A /* ThreadMachCore.cpp */; }; 26A69C5F137A17A500262477 /* RegisterValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26C6886E137880C400407EDF /* RegisterValue.cpp */; }; 26A7A035135E6E4200FB369E /* OptionValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26A7A034135E6E4200FB369E /* OptionValue.cpp */; }; 26AB92121819D74600E63F3E /* DWARFDataExtractor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26AB92101819D74600E63F3E /* DWARFDataExtractor.cpp */; }; 26B1EFAE154638AF00E2DAC7 /* DWARFDeclContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26B1EFAC154638AF00E2DAC7 /* DWARFDeclContext.cpp */; }; 26B1FCC21338115F002886E2 /* Host.mm in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7EE810F1B88F00F91463 /* Host.mm */; }; 26B42C4D1187ABA50079C8C8 /* LLDB.h in Headers */ = {isa = PBXBuildFile; fileRef = 26B42C4C1187ABA50079C8C8 /* LLDB.h */; settings = {ATTRIBUTES = (Public, ); }; }; 26B7564E14F89356008D9CB3 /* PlatformiOSSimulator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26B7564C14F89356008D9CB3 /* PlatformiOSSimulator.cpp */; }; 26B75B441AD6E29A001F7A57 /* MipsLinuxSignals.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26B75B421AD6E29A001F7A57 /* MipsLinuxSignals.cpp */; }; 26B8283D142D01E9002DBC64 /* SBSection.h in Headers */ = {isa = PBXBuildFile; fileRef = 26B8283C142D01E9002DBC64 /* SBSection.h */; settings = {ATTRIBUTES = (Public, ); }; }; 26B82840142D020F002DBC64 /* SBSection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26B8283F142D020F002DBC64 /* SBSection.cpp */; }; 26BC179918C7F2B300D2196D /* JITLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC179718C7F2B300D2196D /* JITLoader.cpp */; }; 26BC179A18C7F2B300D2196D /* JITLoaderList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC179818C7F2B300D2196D /* JITLoaderList.cpp */; }; 26BC17AB18C7F4CB00D2196D /* ProcessElfCore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC17A218C7F4CB00D2196D /* ProcessElfCore.cpp */; }; 26BC17AD18C7F4CB00D2196D /* RegisterContextPOSIXCore_mips64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC17A418C7F4CB00D2196D /* RegisterContextPOSIXCore_mips64.cpp */; }; 26BC17AF18C7F4CB00D2196D /* RegisterContextPOSIXCore_x86_64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC17A618C7F4CB00D2196D /* RegisterContextPOSIXCore_x86_64.cpp */; }; 26BC17B118C7F4CB00D2196D /* ThreadElfCore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC17A818C7F4CB00D2196D /* ThreadElfCore.cpp */; }; 26BCFC521368AE38006DC050 /* OptionGroupFormat.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BCFC511368AE38006DC050 /* OptionGroupFormat.cpp */; }; 26BD407F135D2AE000237D80 /* FileLineResolver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BD407E135D2ADF00237D80 /* FileLineResolver.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 */; }; 26C72C94124322890068DC16 /* SBStream.h in Headers */ = {isa = PBXBuildFile; fileRef = 26C72C93124322890068DC16 /* SBStream.h */; settings = {ATTRIBUTES = (Public, ); }; }; 26C72C961243229A0068DC16 /* SBStream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26C72C951243229A0068DC16 /* SBStream.cpp */; }; 26C7C4831BFFEA7E009BD01F /* WindowsMiniDump.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26C7C4811BFFEA7E009BD01F /* WindowsMiniDump.cpp */; }; 26C7C4841BFFEA7E009BD01F /* WindowsMiniDump.h in Headers */ = {isa = PBXBuildFile; fileRef = 26C7C4821BFFEA7E009BD01F /* WindowsMiniDump.h */; }; 26CA97A1172B1FD5005DC71B /* RegisterContextThreadMemory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26CA979F172B1FD5005DC71B /* RegisterContextThreadMemory.cpp */; }; 26CEB5EF18761CB2008F575A /* libedit.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 26F5C32A10F3DFDD009D5894 /* libedit.dylib */; }; 26CEB5F218762056008F575A /* CommandObjectGUI.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26CEB5F018762056008F575A /* CommandObjectGUI.cpp */; }; 26CFDCA3186163A4000E63E5 /* Editline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26CFDCA2186163A4000E63E5 /* Editline.cpp */; }; 26CFDCA818616473000E63E5 /* libedit.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 26F5C32A10F3DFDD009D5894 /* libedit.dylib */; }; 26D265BC136B4269002EEE45 /* lldb-public.h in Headers */ = {isa = PBXBuildFile; fileRef = 26651A14133BEC76005B64B7 /* lldb-public.h */; settings = {ATTRIBUTES = (Public, ); }; }; 26D52C1F1A980FE300E5D2FB /* MICmdCmdSymbol.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26D52C1D1A980FE300E5D2FB /* MICmdCmdSymbol.cpp */; }; 26D55235159A7DB100708D8D /* libxml2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 26D55234159A7DB100708D8D /* libxml2.dylib */; }; 26D5E15F135BAEA2006EA0A7 /* OptionGroupArchitecture.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26D5E15E135BAEA2006EA0A7 /* OptionGroupArchitecture.cpp */; }; 26D5E163135BB054006EA0A7 /* OptionGroupPlatform.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26D5E162135BB054006EA0A7 /* OptionGroupPlatform.cpp */; }; 26D7E45D13D5E30A007FD12B /* SocketAddress.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26D7E45C13D5E30A007FD12B /* SocketAddress.cpp */; }; 26DAED6315D327C200E15819 /* OptionValuePathMappings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26DAED6215D327C200E15819 /* OptionValuePathMappings.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 */; }; 26DB3E1F1379E7AD0080DC73 /* ABISysV_x86_64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26DB3E131379E7AD0080DC73 /* ABISysV_x86_64.cpp */; }; 26DC6A1D1337FECA00FF7998 /* lldb-platform.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26DC6A1C1337FECA00FF7998 /* lldb-platform.cpp */; }; 26DE1E6C11616C2E00A093E2 /* lldb-forward.h in Headers */ = {isa = PBXBuildFile; fileRef = 26DE1E6A11616C2E00A093E2 /* lldb-forward.h */; settings = {ATTRIBUTES = (Public, ); }; }; 26DE204111618AB900A093E2 /* SBSymbolContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 26DE204011618AB900A093E2 /* SBSymbolContext.h */; settings = {ATTRIBUTES = (Public, ); }; }; 26DE204311618ACA00A093E2 /* SBAddress.h in Headers */ = {isa = PBXBuildFile; fileRef = 26DE204211618ACA00A093E2 /* SBAddress.h */; settings = {ATTRIBUTES = (Public, ); }; }; 26DE204511618ADA00A093E2 /* SBAddress.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26DE204411618ADA00A093E2 /* SBAddress.cpp */; }; 26DE204711618AED00A093E2 /* SBSymbolContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26DE204611618AED00A093E2 /* SBSymbolContext.cpp */; }; 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, ); }; }; 26DE205311618FAC00A093E2 /* SBFunction.h in Headers */ = {isa = PBXBuildFile; fileRef = 26DE205211618FAC00A093E2 /* SBFunction.h */; settings = {ATTRIBUTES = (Public, ); }; }; 26DE205511618FB800A093E2 /* SBCompileUnit.h in Headers */ = {isa = PBXBuildFile; fileRef = 26DE205411618FB800A093E2 /* SBCompileUnit.h */; settings = {ATTRIBUTES = (Public, ); }; }; 26DE205711618FC500A093E2 /* SBBlock.h in Headers */ = {isa = PBXBuildFile; fileRef = 26DE205611618FC500A093E2 /* SBBlock.h */; settings = {ATTRIBUTES = (Public, ); }; }; 26DE205911618FE700A093E2 /* SBLineEntry.h in Headers */ = {isa = PBXBuildFile; fileRef = 26DE205811618FE700A093E2 /* SBLineEntry.h */; settings = {ATTRIBUTES = (Public, ); }; }; 26DE205B11618FF600A093E2 /* SBSymbol.h in Headers */ = {isa = PBXBuildFile; fileRef = 26DE205A11618FF600A093E2 /* SBSymbol.h */; settings = {ATTRIBUTES = (Public, ); }; }; 26DE205D1161901400A093E2 /* SBFunction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26DE205C1161901400A093E2 /* SBFunction.cpp */; }; 26DE205F1161901B00A093E2 /* SBCompileUnit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26DE205E1161901B00A093E2 /* SBCompileUnit.cpp */; }; 26DE20611161902700A093E2 /* SBBlock.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26DE20601161902600A093E2 /* SBBlock.cpp */; }; 26DE20631161904200A093E2 /* SBLineEntry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26DE20621161904200A093E2 /* SBLineEntry.cpp */; }; 26DE20651161904E00A093E2 /* SBSymbol.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26DE20641161904E00A093E2 /* SBSymbol.cpp */; }; 26E152261419CAD4007967D0 /* ObjectFilePECOFF.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26E152231419CACA007967D0 /* ObjectFilePECOFF.cpp */; }; 26ED3D6D13C563810017D45E /* OptionGroupVariable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26ED3D6C13C563810017D45E /* OptionGroupVariable.cpp */; }; 26EFB61B1BFE8D3E00544801 /* PlatformNetBSD.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26EFB6181BFE8D3E00544801 /* PlatformNetBSD.cpp */; }; 26EFB61C1BFE8D3E00544801 /* PlatformNetBSD.h in Headers */ = {isa = PBXBuildFile; fileRef = 26EFB6191BFE8D3E00544801 /* PlatformNetBSD.h */; }; 26EFC4CD18CFAF0D00865D87 /* ObjectFileJIT.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26EFC4CA18CFAF0D00865D87 /* ObjectFileJIT.cpp */; }; 26F006561B4DD86700B872E5 /* DynamicLoaderWindowsDYLD.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26F006541B4DD86700B872E5 /* DynamicLoaderWindowsDYLD.cpp */; }; 26F4A21C13FBA31A0064B613 /* ThreadMemory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26F4A21A13FBA31A0064B613 /* ThreadMemory.cpp */; }; 26F5C27710F3D9E4009D5894 /* Driver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26F5C27310F3D9E4009D5894 /* Driver.cpp */; }; 26F5C32D10F3DFDD009D5894 /* libtermcap.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 26F5C32B10F3DFDD009D5894 /* libtermcap.dylib */; }; 26FFC19914FC072100087D58 /* AuxVector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26FFC19314FC072100087D58 /* AuxVector.cpp */; }; 26FFC19B14FC072100087D58 /* DYLDRendezvous.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26FFC19514FC072100087D58 /* DYLDRendezvous.cpp */; }; 26FFC19D14FC072100087D58 /* DynamicLoaderPOSIXDYLD.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26FFC19714FC072100087D58 /* DynamicLoaderPOSIXDYLD.cpp */; }; 304B2E461CAAA57B007829FE /* ClangUtil.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3032B1B61CAAA3D1004BE1AB /* ClangUtil.cpp */; }; 30B38A001CAAA6D7009524E3 /* ClangUtil.h in Headers */ = {isa = PBXBuildFile; fileRef = 3032B1B91CAAA400004BE1AB /* ClangUtil.h */; }; - 30DED5DE1B4ECB49004CC508 /* MainLoopPosix.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 30DED5DC1B4ECB17004CC508 /* MainLoopPosix.cpp */; }; 332CCB181AFF41620034D4C4 /* SBLanguageRuntime.h in Headers */ = {isa = PBXBuildFile; fileRef = 3392EBB71AFF402200858B9F /* SBLanguageRuntime.h */; settings = {ATTRIBUTES = (Public, ); }; }; 33E5E8471A674FB60024ED68 /* StringConvert.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 33E5E8411A672A240024ED68 /* StringConvert.cpp */; }; 3F8160A61AB9F7DD001DA9DF /* Logging.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3F8160A51AB9F7DD001DA9DF /* Logging.cpp */; }; 3F81691A1ABA2419001DA9DF /* NameMatches.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3F8169181ABA2419001DA9DF /* NameMatches.cpp */; }; 3F81692C1ABB7A1E001DA9DF /* SystemInitializerFull.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3F81692A1ABB7A16001DA9DF /* SystemInitializerFull.cpp */; }; 3F8169311ABB7A6D001DA9DF /* SystemInitializer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3F81692E1ABB7A6D001DA9DF /* SystemInitializer.cpp */; }; 3F8169321ABB7A6D001DA9DF /* SystemInitializerCommon.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3F81692F1ABB7A6D001DA9DF /* SystemInitializerCommon.cpp */; }; 3F8169331ABB7A6D001DA9DF /* SystemLifetimeManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3F8169301ABB7A6D001DA9DF /* SystemLifetimeManager.cpp */; }; 3FBA69E11B6067120008F44A /* ScriptInterpreterNone.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3FBA69DD1B6067020008F44A /* ScriptInterpreterNone.cpp */; }; 3FBA69EC1B6067430008F44A /* PythonDataObjects.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3FBA69E31B60672A0008F44A /* PythonDataObjects.cpp */; }; 3FBA69ED1B60674B0008F44A /* ScriptInterpreterPython.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3FBA69E51B60672A0008F44A /* ScriptInterpreterPython.cpp */; }; 3FDFDDBD199C3A06009756A7 /* FileAction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3FDFDDBC199C3A06009756A7 /* FileAction.cpp */; }; 3FDFDDBF199D345E009756A7 /* FileCache.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3FDFDDBE199D345E009756A7 /* FileCache.cpp */; }; 3FDFDDC6199D37ED009756A7 /* FileSystem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3FDFDDC5199D37ED009756A7 /* FileSystem.cpp */; }; 3FDFE52C19A2917A009756A7 /* HostInfoMacOSX.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3FDFE52B19A2917A009756A7 /* HostInfoMacOSX.mm */; }; 3FDFE53119A292F0009756A7 /* HostInfoPosix.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3FDFE53019A292F0009756A7 /* HostInfoPosix.cpp */; }; 3FDFE53519A29327009756A7 /* HostInfoBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3FDFE53419A29327009756A7 /* HostInfoBase.cpp */; }; 3FDFE56C19AF9C44009756A7 /* HostProcessPosix.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3FDFE56A19AF9C44009756A7 /* HostProcessPosix.cpp */; }; 3FDFE56D19AF9C44009756A7 /* HostThreadPosix.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3FDFE56B19AF9C44009756A7 /* HostThreadPosix.cpp */; }; 3FDFED0B19B7C8DE009756A7 /* HostThreadMacOSX.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3FDFED0519B7C898009756A7 /* HostThreadMacOSX.mm */; }; 3FDFED2719BA6D96009756A7 /* HostNativeThreadBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3FDFED2419BA6D96009756A7 /* HostNativeThreadBase.cpp */; }; 3FDFED2819BA6D96009756A7 /* HostThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3FDFED2519BA6D96009756A7 /* HostThread.cpp */; }; 3FDFED2919BA6D96009756A7 /* ThreadLauncher.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3FDFED2619BA6D96009756A7 /* ThreadLauncher.cpp */; }; 3FDFED2D19C257A0009756A7 /* HostProcess.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3FDFED2C19C257A0009756A7 /* HostProcess.cpp */; }; 490A36C0180F0E6F00BA31F8 /* PlatformWindows.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 490A36BD180F0E6F00BA31F8 /* PlatformWindows.cpp */; }; 490A966B1628C3BF00F0002E /* SBDeclaration.h in Headers */ = {isa = PBXBuildFile; fileRef = 9452573816262CEF00325455 /* SBDeclaration.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4939EA8D1BD56B6D00084382 /* REPL.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4939EA8C1BD56B6D00084382 /* REPL.cpp */; }; 494260DA14579144003C1C78 /* VerifyDecl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 494260D914579144003C1C78 /* VerifyDecl.cpp */; }; 4959511F1A1BC4BC00F6F8FC /* ClangModulesDeclVendor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4959511E1A1BC4BC00F6F8FC /* ClangModulesDeclVendor.cpp */; }; 4966DCC4148978A10028481B /* ClangExternalASTSourceCommon.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4966DCC3148978A10028481B /* ClangExternalASTSourceCommon.cpp */; }; 4984BA131B978C55008658D4 /* ClangExpressionVariable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4984BA0E1B978C3E008658D4 /* ClangExpressionVariable.cpp */; }; 4984BA161B979973008658D4 /* ExpressionVariable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4984BA151B979973008658D4 /* ExpressionVariable.cpp */; }; 4984BA181B979C08008658D4 /* ExpressionVariable.h in Headers */ = {isa = PBXBuildFile; fileRef = 4984BA171B979C08008658D4 /* ExpressionVariable.h */; }; 49A1CAC51430E8DE00306AC9 /* ExpressionSourceCode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49A1CAC31430E8BD00306AC9 /* ExpressionSourceCode.cpp */; }; 49A71FE7141FFA5C00D59478 /* IRInterpreter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 496B01581406DE8900F830D5 /* IRInterpreter.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 */; }; 49CA97001E6AACC900C03FEE /* UUID.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49CA96EA1E6AAC6600C03FEE /* UUID.cpp */; }; 49D8FB3913B5598F00411094 /* ClangASTImporter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49D8FB3513B558DE00411094 /* ClangASTImporter.cpp */; }; 49DA65031485C92A005FF180 /* AppleObjCDeclVendor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49DA65021485C92A005FF180 /* AppleObjCDeclVendor.cpp */; }; 49DCF6FE170E6B4A0092F75E /* IRMemoryMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49DCF6FD170E6B4A0092F75E /* IRMemoryMap.cpp */; }; 49DCF702170E70120092F75E /* Materializer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49DCF700170E70120092F75E /* Materializer.cpp */; }; 49DEF1251CD7C6DF006A7C7D /* BlockPointer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49DEF11F1CD7BD90006A7C7D /* BlockPointer.cpp */; }; 49E4F66B1C9CAD16008487EA /* DiagnosticManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49E4F6681C9CAD12008487EA /* DiagnosticManager.cpp */; }; 49F811F31E931B2100F4E163 /* CPlusPlusNameParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49F811EF1E931B1500F4E163 /* CPlusPlusNameParser.cpp */; }; 4C0083401B9F9BA900D5CF24 /* UtilityFunction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C00833F1B9F9BA900D5CF24 /* UtilityFunction.cpp */; }; 4C2479BD1BA39295009C9A7B /* FunctionCaller.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C0083321B9A5DE200D5CF24 /* FunctionCaller.cpp */; }; 4C3ADCD61810D88B00357218 /* BreakpointResolverFileRegex.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CAA56141422D986001FFA01 /* BreakpointResolverFileRegex.cpp */; }; 4C4EB7811E6A4DCC002035C0 /* DumpDataExtractor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C4EB77F1E6A4DB8002035C0 /* DumpDataExtractor.cpp */; }; 4C562CC71CC07DF700C52EAC /* PDBASTParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C562CC21CC07DDD00C52EAC /* PDBASTParser.cpp */; }; 4C56543119D1EFAA002E9C44 /* ThreadPlanPython.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C56543019D1EFAA002E9C44 /* ThreadPlanPython.cpp */; }; 4C56543519D2297A002E9C44 /* SBThreadPlan.h in Headers */ = {isa = PBXBuildFile; fileRef = 4C56543419D2297A002E9C44 /* SBThreadPlan.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4C56543719D22B32002E9C44 /* SBThreadPlan.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C56543619D22B32002E9C44 /* SBThreadPlan.cpp */; }; 4C88BC2A1BA3722B00AA0964 /* Expression.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C88BC291BA3722B00AA0964 /* Expression.cpp */; }; 4C88BC2D1BA391B000AA0964 /* UserExpression.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C0083331B9A5DE200D5CF24 /* UserExpression.cpp */; }; 4CABA9E0134A8BCD00539BDD /* ValueObjectMemory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CABA9DF134A8BCD00539BDD /* ValueObjectMemory.cpp */; }; 4CC7C6501D5298F30076FF94 /* OCamlLanguage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CC7C64D1D5298E20076FF94 /* OCamlLanguage.cpp */; }; 4CC7C6571D52997A0076FF94 /* OCamlASTContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CC7C6551D52996C0076FF94 /* OCamlASTContext.cpp */; }; 4CC7C6581D529B950076FF94 /* DWARFASTParserOCaml.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CC7C6521D5299140076FF94 /* DWARFASTParserOCaml.cpp */; }; 4CCA644D13B40B82003BDF98 /* ItaniumABILanguageRuntime.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CCA643D13B40B82003BDF98 /* ItaniumABILanguageRuntime.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 */; }; 4CCA645813B40B82003BDF98 /* AppleThreadPlanStepThroughObjCTrampoline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CCA644A13B40B82003BDF98 /* AppleThreadPlanStepThroughObjCTrampoline.cpp */; }; 4CD0BD0F134BFADF00CB44D4 /* ValueObjectDynamicValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CD0BD0E134BFADF00CB44D4 /* ValueObjectDynamicValue.cpp */; }; 4CDB8D6D1DBA91B6006C5B13 /* LibStdcppUniquePointer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CDB8D671DBA91A6006C5B13 /* LibStdcppUniquePointer.cpp */; }; 4CDB8D6E1DBA91B6006C5B13 /* LibStdcppTuple.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CDB8D681DBA91A6006C5B13 /* LibStdcppTuple.cpp */; }; 4CE4EFAA1E8999B900A80C06 /* PlatformOpenBSD.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CE4EFA61E8999B000A80C06 /* PlatformOpenBSD.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 */; }; 4CE4F673162C971A00F75CB3 /* SBExpressionOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CE4F672162C971A00F75CB3 /* SBExpressionOptions.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4CE4F675162C973F00F75CB3 /* SBExpressionOptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CE4F674162C973F00F75CB3 /* SBExpressionOptions.cpp */; }; 4CF3D80C15AF4DC800845BF3 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EDB919B414F6F10D008FF64B /* Security.framework */; }; 4CF52AF51428291E0051E832 /* SBFileSpecList.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CF52AF41428291E0051E832 /* SBFileSpecList.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4CF52AF8142829390051E832 /* SBFileSpecList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CF52AF7142829390051E832 /* SBFileSpecList.cpp */; }; 6D0F61431C80AAAE00A4ECEE /* JavaASTContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D0F61411C80AAAA00A4ECEE /* JavaASTContext.cpp */; }; 6D0F61481C80AAD600A4ECEE /* DWARFASTParserJava.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D0F61441C80AACF00A4ECEE /* DWARFASTParserJava.cpp */; }; 6D0F614E1C80AB0700A4ECEE /* JavaLanguageRuntime.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D0F614A1C80AB0400A4ECEE /* JavaLanguageRuntime.cpp */; }; 6D0F614F1C80AB0C00A4ECEE /* JavaLanguageRuntime.h in Headers */ = {isa = PBXBuildFile; fileRef = 6D0F614B1C80AB0400A4ECEE /* JavaLanguageRuntime.h */; }; 6D0F61591C80AB3500A4ECEE /* JavaFormatterFunctions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D0F61511C80AB3000A4ECEE /* JavaFormatterFunctions.cpp */; }; 6D0F615A1C80AB3900A4ECEE /* JavaLanguage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D0F61531C80AB3000A4ECEE /* JavaLanguage.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 */; }; 6D55BAED1A8CD0A800A70529 /* PlatformAndroid.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D55BAE91A8CD08C00A70529 /* PlatformAndroid.cpp */; }; 6D55BAEE1A8CD0B200A70529 /* PlatformAndroidRemoteGDBServer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D55BAEB1A8CD08C00A70529 /* PlatformAndroidRemoteGDBServer.cpp */; }; 6D762BEE1B1605D2006C929D /* LLDBServerUtilities.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D762BEC1B1605CD006C929D /* LLDBServerUtilities.cpp */; }; 6D86CEA01B440F8500A7FBFA /* CommandObjectBugreport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D86CE9E1B440F6B00A7FBFA /* CommandObjectBugreport.cpp */; }; 6D95DC001B9DC057000E318A /* DIERef.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D95DBFD1B9DC057000E318A /* DIERef.cpp */; }; 6D95DC011B9DC057000E318A /* HashedNameToDIE.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D95DBFE1B9DC057000E318A /* HashedNameToDIE.cpp */; }; 6D95DC021B9DC057000E318A /* SymbolFileDWARFDwo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D95DBFF1B9DC057000E318A /* SymbolFileDWARFDwo.cpp */; }; 6D99A3631BBC2F3200979793 /* ArmUnwindInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D99A3621BBC2F3200979793 /* ArmUnwindInfo.cpp */; }; 6D9AB3DD1BB2B74E003F2289 /* TypeMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D9AB3DC1BB2B74E003F2289 /* TypeMap.cpp */; }; 6DEC6F391BD66D750091ABA6 /* TaskPool.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6DEC6F381BD66D750091ABA6 /* TaskPool.cpp */; }; 8C26C4261C3EA5F90031DF7C /* ThreadSanitizerRuntime.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8C26C4241C3EA4340031DF7C /* ThreadSanitizerRuntime.cpp */; }; 8C2D6A53197A1EAF006989C9 /* MemoryHistory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8C2D6A52197A1EAF006989C9 /* MemoryHistory.cpp */; }; 8C2D6A5E197A250F006989C9 /* MemoryHistoryASan.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8C2D6A5A197A1FDC006989C9 /* MemoryHistoryASan.cpp */; }; 8CCB017E19BA28A80009FD44 /* ThreadCollection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8CCB017A19BA283D0009FD44 /* ThreadCollection.cpp */; }; 8CCB018219BA4E270009FD44 /* SBThreadCollection.h in Headers */ = {isa = PBXBuildFile; fileRef = 8CCB018119BA4E210009FD44 /* SBThreadCollection.h */; settings = {ATTRIBUTES = (Public, ); }; }; 8CCB018319BA51BF0009FD44 /* SBThreadCollection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8CCB017F19BA4DD00009FD44 /* SBThreadCollection.cpp */; }; 8CF02AE919DCC01900B14BE0 /* InstrumentationRuntime.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8CF02ADF19DCBF3B00B14BE0 /* InstrumentationRuntime.cpp */; }; 8CF02AEA19DCC02100B14BE0 /* AddressSanitizerRuntime.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8CF02AE519DCBF8400B14BE0 /* AddressSanitizerRuntime.cpp */; }; 8CF02AEF19DD16B100B14BE0 /* InstrumentationRuntimeStopInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8CF02AED19DD15CF00B14BE0 /* InstrumentationRuntimeStopInfo.cpp */; }; 9404957A1BEC497E00926025 /* NSError.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 940495781BEC497E00926025 /* NSError.cpp */; }; 9404957B1BEC497E00926025 /* NSException.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 940495791BEC497E00926025 /* NSException.cpp */; }; 94094C6B163B6F840083A547 /* ValueObjectCast.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 94094C69163B6CD90083A547 /* ValueObjectCast.cpp */; }; 940B02F619DC96E700AD0F52 /* SBExecutionContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 940B02F519DC96E700AD0F52 /* SBExecutionContext.cpp */; }; 940B04D91A8984FF0045D5F7 /* argdumper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 940B04D81A8984FF0045D5F7 /* argdumper.cpp */; }; 940B04E41A8987680045D5F7 /* lldb-argdumper in CopyFiles */ = {isa = PBXBuildFile; fileRef = 942829C01A89835300521B30 /* lldb-argdumper */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; 94145431175E63B500284436 /* lldb-versioning.h in Headers */ = {isa = PBXBuildFile; fileRef = 94145430175D7FDE00284436 /* lldb-versioning.h */; settings = {ATTRIBUTES = (Public, ); }; }; 9418EBCD1AA910910058B02E /* VectorType.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9418EBCC1AA910910058B02E /* VectorType.cpp */; }; 941BCC7F14E48C4000BB969C /* SBTypeFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 9461568614E355F2003A195C /* SBTypeFilter.h */; settings = {ATTRIBUTES = (Public, ); }; }; 941BCC8014E48C4000BB969C /* SBTypeFormat.h in Headers */ = {isa = PBXBuildFile; fileRef = 9461568714E355F2003A195C /* SBTypeFormat.h */; settings = {ATTRIBUTES = (Public, ); }; }; 941BCC8114E48C4000BB969C /* SBTypeSummary.h in Headers */ = {isa = PBXBuildFile; fileRef = 9461568814E355F2003A195C /* SBTypeSummary.h */; settings = {ATTRIBUTES = (Public, ); }; }; 941BCC8214E48C4000BB969C /* SBTypeSynthetic.h in Headers */ = {isa = PBXBuildFile; fileRef = 9461568914E355F2003A195C /* SBTypeSynthetic.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, ); }; }; 942612F71B95000000EF842E /* LanguageCategory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 942612F61B95000000EF842E /* LanguageCategory.cpp */; }; 942612F81B952C9B00EF842E /* ObjCLanguage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 94B6385E1B8FB7A2004FE1E4 /* ObjCLanguage.cpp */; }; 942829561A89614C00521B30 /* JSON.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 942829551A89614C00521B30 /* JSON.cpp */; }; 942829CC1A89839300521B30 /* liblldb-core.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2689FFCA13353D7A00698AC0 /* liblldb-core.a */; }; 9428BC2C1C6E64E4002A24D7 /* LibCxxAtomic.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9428BC291C6E64DC002A24D7 /* LibCxxAtomic.cpp */; }; 94380B8219940B0A00BFE4A8 /* StringLexer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 94380B8119940B0A00BFE4A8 /* StringLexer.cpp */; }; 943BDEFE1AA7B2F800789CE8 /* LLDBAssert.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 943BDEFD1AA7B2F800789CE8 /* LLDBAssert.cpp */; }; 9441816E1C8F5EC900E5A8D9 /* CommandAlias.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9441816D1C8F5EC900E5A8D9 /* CommandAlias.cpp */; }; 944372DC171F6B4300E57C32 /* RegisterContextDummy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 944372DA171F6B4300E57C32 /* RegisterContextDummy.cpp */; }; 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, ); }; }; 9447DE431BD5963300E67212 /* DumpValueObjectOptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9447DE421BD5963300E67212 /* DumpValueObjectOptions.cpp */; }; 945215DF17F639EE00521C0B /* ValueObjectPrinter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 945215DE17F639EE00521C0B /* ValueObjectPrinter.cpp */; }; 9452573A16262D0200325455 /* SBDeclaration.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9452573916262D0200325455 /* SBDeclaration.cpp */; }; 945261BF1B9A11FC00BF138D /* CxxStringTypes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 945261B31B9A11E800BF138D /* CxxStringTypes.cpp */; }; 945261C01B9A11FC00BF138D /* LibCxx.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 945261B51B9A11E800BF138D /* LibCxx.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 */; }; 945261C41B9A11FC00BF138D /* LibCxxUnorderedMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 945261BA1B9A11E800BF138D /* LibCxxUnorderedMap.cpp */; }; 945261C51B9A11FC00BF138D /* LibCxxVector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 945261BB1B9A11E800BF138D /* LibCxxVector.cpp */; }; 945261C61B9A11FC00BF138D /* LibStdcpp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 945261BC1B9A11E800BF138D /* LibStdcpp.cpp */; }; 945261C81B9A14D300BF138D /* CXXFunctionPointer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 945261C71B9A14D300BF138D /* CXXFunctionPointer.cpp */; }; 9455630F1BEAD0600073F75F /* PlatformAppleSimulator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9455630A1BEAD0570073F75F /* PlatformAppleSimulator.cpp */; }; 945563101BEAD0650073F75F /* PlatformiOSSimulatorCoreSimulatorSupport.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9455630D1BEAD0570073F75F /* PlatformiOSSimulatorCoreSimulatorSupport.mm */; }; 945759671534941F005A9070 /* PlatformPOSIX.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 945759651534941F005A9070 /* PlatformPOSIX.cpp */; }; 9461569A14E358A6003A195C /* SBTypeFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9461568A14E35621003A195C /* SBTypeFilter.cpp */; }; 9461569B14E358A6003A195C /* SBTypeFormat.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9461568B14E35621003A195C /* SBTypeFormat.cpp */; }; 9461569C14E358A6003A195C /* SBTypeSummary.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9461568C14E35621003A195C /* SBTypeSummary.cpp */; }; 9461569D14E358A6003A195C /* SBTypeSynthetic.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9461568D14E35621003A195C /* SBTypeSynthetic.cpp */; }; 946216C21A97C080006E19CC /* OptionValueLanguage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 946216C11A97C080006E19CC /* OptionValueLanguage.cpp */; }; 9463D4CD13B1798800C230D4 /* CommandObjectType.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9463D4CC13B1798800C230D4 /* CommandObjectType.cpp */; }; 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, ); }; }; 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, ); }; }; 947A1D641616476B0017C8D1 /* CommandObjectPlugin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 947A1D621616476A0017C8D1 /* CommandObjectPlugin.cpp */; }; 947CF7711DC7B1EE00EF980B /* ProcessMinidump.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 947CF7701DC7B1EE00EF980B /* ProcessMinidump.cpp */; }; 947CF7761DC7B20D00EF980B /* RegisterContextMinidump_x86_32.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 947CF7741DC7B20D00EF980B /* RegisterContextMinidump_x86_32.cpp */; }; 947CF7771DC7B20D00EF980B /* ThreadMinidump.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 947CF7751DC7B20D00EF980B /* ThreadMinidump.cpp */; }; 9485545A1DCBAE3B00345FF5 /* RenderScriptScriptGroup.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 948554591DCBAE3B00345FF5 /* RenderScriptScriptGroup.cpp */; }; 949ADF031406F648004833E1 /* ValueObjectConstResultImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 949ADF021406F648004833E1 /* ValueObjectConstResultImpl.cpp */; }; 949EEDA01BA74B6D008C63CF /* CoreMedia.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 949EED9E1BA74B64008C63CF /* CoreMedia.cpp */; }; 949EEDA31BA76577008C63CF /* Cocoa.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 949EEDA11BA76571008C63CF /* Cocoa.cpp */; }; 949EEDAE1BA7671C008C63CF /* CF.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 949EEDAC1BA76719008C63CF /* CF.cpp */; }; 949EEDAF1BA76729008C63CF /* NSArray.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 949EEDA41BA765B5008C63CF /* NSArray.cpp */; }; 949EEDB11BA7672D008C63CF /* NSDictionary.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 949EEDA51BA765B5008C63CF /* NSDictionary.cpp */; }; 949EEDB21BA76731008C63CF /* NSIndexPath.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 949EEDA61BA765B5008C63CF /* NSIndexPath.cpp */; }; 949EEDB31BA76736008C63CF /* NSSet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 949EEDA71BA765B5008C63CF /* NSSet.cpp */; }; 94A5B3971AB9FE8D00A5EE7F /* EmulateInstructionMIPS64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 94A5B3951AB9FE8300A5EE7F /* EmulateInstructionMIPS64.cpp */; }; 94B638531B8F8E6C004FE1E4 /* Language.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 94B638521B8F8E6C004FE1E4 /* Language.cpp */; }; 94B6385D1B8FB178004FE1E4 /* CPlusPlusLanguage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 94B6385B1B8FB174004FE1E4 /* CPlusPlusLanguage.cpp */; }; 94B638631B8FB7F1004FE1E4 /* ObjCPlusPlusLanguage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 94B638621B8FB7F1004FE1E4 /* ObjCPlusPlusLanguage.cpp */; }; 94B6E76213D88365005F417F /* ValueObjectSyntheticFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 94B6E76113D88362005F417F /* ValueObjectSyntheticFilter.cpp */; }; 94B9E5121BBF20F4000A48DC /* NSString.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 94B9E5111BBF20F4000A48DC /* NSString.cpp */; }; 94BA8B6D176F8C9B005A91B5 /* Range.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 94BA8B6C176F8C9B005A91B5 /* Range.cpp */; }; 94BA8B70176F97CE005A91B5 /* CommandHistory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 94BA8B6F176F97CE005A91B5 /* CommandHistory.cpp */; }; 94CB255C16B069770059775D /* DataVisualization.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 94CB255816B069770059775D /* DataVisualization.cpp */; }; 94CB255D16B069770059775D /* FormatClasses.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 94CB255916B069770059775D /* FormatClasses.cpp */; }; 94CB255E16B069770059775D /* FormatManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 94CB255A16B069770059775D /* FormatManager.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 */; }; 94CB257116B0A4270059775D /* TypeSummary.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 94CB256E16B0A4260059775D /* TypeSummary.cpp */; }; 94CB257216B0A4270059775D /* TypeSynthetic.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 94CB256F16B0A4270059775D /* TypeSynthetic.cpp */; }; 94CB257416B1D3880059775D /* FormatCache.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 94CB257316B1D3870059775D /* FormatCache.cpp */; }; 94CD131A19BA33B400DB7BED /* TypeValidator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 94CD131919BA33B400DB7BED /* TypeValidator.cpp */; }; 94CD7D0919A3FBA300908B7C /* AppleObjCClassDescriptorV2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 94CD7D0819A3FBA300908B7C /* AppleObjCClassDescriptorV2.cpp */; }; 94CD7D0C19A3FBCE00908B7C /* AppleObjCTypeEncodingParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 94CD7D0B19A3FBCE00908B7C /* AppleObjCTypeEncodingParser.cpp */; }; 94D0858C1B9675B8000D24BD /* FormattersHelpers.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 94D0858B1B9675B8000D24BD /* FormattersHelpers.cpp */; }; 94E829CA152D33C1006F96A3 /* lldb-server in Resources */ = {isa = PBXBuildFile; fileRef = 26DC6A101337FE6900FF7998 /* lldb-server */; }; 94F48F251A01C687005C0EC6 /* StringPrinter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 94F48F241A01C687005C0EC6 /* StringPrinter.cpp */; }; 94FA3DE01405D50400833217 /* ValueObjectConstResultChild.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 94FA3DDF1405D50300833217 /* ValueObjectConstResultChild.cpp */; }; 964381701C8D6B8200023D59 /* SBLanguageRuntime.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF20F76C1AF18FC700751A6E /* SBLanguageRuntime.cpp */; }; 964463EC1A330C0500154ED8 /* CompactUnwindInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 964463EB1A330C0500154ED8 /* CompactUnwindInfo.cpp */; }; 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 */; }; 9694FA711B32AA64005EBB16 /* ABISysV_mips.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9694FA6F1B32AA64005EBB16 /* ABISysV_mips.cpp */; }; 9A0FDEA71E8EF5110086B2F5 /* RegisterContextLinux_mips.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A0FDE971E8EF5010086B2F5 /* RegisterContextLinux_mips.cpp */; }; 9A19A6AF1163BBB200E0D453 /* SBValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A19A6A51163BB7E00E0D453 /* SBValue.h */; settings = {ATTRIBUTES = (Public, ); }; }; 9A19A6B01163BBB300E0D453 /* SBValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A19A6AD1163BB9800E0D453 /* SBValue.cpp */; }; + 9A1E595C1EB2B141002206A5 /* SBTrace.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A1E59521EB2B0B9002206A5 /* SBTrace.cpp */; }; + 9A1E595D1EB2B141002206A5 /* SBTraceOptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A1E59531EB2B0B9002206A5 /* SBTraceOptions.cpp */; }; 9A22A161135E30370024DDC3 /* EmulateInstructionARM.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A22A15D135E30370024DDC3 /* EmulateInstructionARM.cpp */; }; 9A22A163135E30370024DDC3 /* EmulationStateARM.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A22A15F135E30370024DDC3 /* EmulationStateARM.cpp */; }; 9A357583116CFDEE00E8ED2F /* SBValueList.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A357582116CFDEE00E8ED2F /* SBValueList.h */; settings = {ATTRIBUTES = (Public, ); }; }; 9A35758E116CFE0F00E8ED2F /* SBValueList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A35758D116CFE0F00E8ED2F /* SBValueList.cpp */; }; 9A357671116E7B5200E8ED2F /* SBStringList.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A357670116E7B5200E8ED2F /* SBStringList.h */; settings = {ATTRIBUTES = (Public, ); }; }; 9A357673116E7B6400E8ED2F /* SBStringList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A357672116E7B6400E8ED2F /* SBStringList.cpp */; }; 9A3576A8116E9AB700E8ED2F /* SBHostOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A3576A7116E9AB700E8ED2F /* SBHostOS.h */; settings = {ATTRIBUTES = (Public, ); }; }; 9A3576AA116E9AC700E8ED2F /* SBHostOS.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A3576A9116E9AC700E8ED2F /* SBHostOS.cpp */; }; + 9A36D24D1EB3BE7F00AAD9EA /* SBTrace.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A1E59581EB2B10D002206A5 /* SBTrace.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 9A36D24E1EB3BE7F00AAD9EA /* SBTraceOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A1E59591EB2B10D002206A5 /* SBTraceOptions.h */; settings = {ATTRIBUTES = (Public, ); }; }; 9A4F35101368A51A00823F52 /* StreamAsynchronousIO.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A4F350F1368A51A00823F52 /* StreamAsynchronousIO.cpp */; }; 9A77AD541E64E2760025CE04 /* RegisterInfoPOSIX_arm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A77AD501E64E24E0025CE04 /* RegisterInfoPOSIX_arm.cpp */; }; 9AC7038E117674FB0086C050 /* SBInstruction.h in Headers */ = {isa = PBXBuildFile; fileRef = 9AC7038D117674EB0086C050 /* SBInstruction.h */; settings = {ATTRIBUTES = (Public, ); }; }; 9AC70390117675270086C050 /* SBInstructionList.h in Headers */ = {isa = PBXBuildFile; fileRef = 9AC7038F117675270086C050 /* SBInstructionList.h */; settings = {ATTRIBUTES = (Public, ); }; }; 9AC703AF117675410086C050 /* SBInstruction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9AC703AE117675410086C050 /* SBInstruction.cpp */; }; 9AC703B1117675490086C050 /* SBInstructionList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9AC703B0117675490086C050 /* SBInstructionList.cpp */; }; 9AD9449F1E8DB26C004796ED /* RegisterContextNetBSD_x86_64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9AD9449B1E8DB267004796ED /* RegisterContextNetBSD_x86_64.cpp */; }; A36FF33C17D8E94600244D40 /* OptionParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A36FF33B17D8E94600244D40 /* OptionParser.cpp */; }; AE44FB301BB07EB20033EB62 /* GoUserExpression.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AE44FB2C1BB07DD80033EB62 /* GoUserExpression.cpp */; }; AE44FB311BB07EB80033EB62 /* GoLexer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AE44FB2A1BB07DD80033EB62 /* GoLexer.cpp */; }; AE44FB321BB07EBC0033EB62 /* GoParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AE44FB2B1BB07DD80033EB62 /* GoParser.cpp */; }; AE44FB3E1BB485960033EB62 /* GoLanguageRuntime.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AE44FB3D1BB485960033EB62 /* GoLanguageRuntime.cpp */; }; AE44FB471BB4BB090033EB62 /* GoLanguage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AE44FB451BB4BB090033EB62 /* GoLanguage.cpp */; }; AE44FB4C1BB4BB540033EB62 /* GoFormatterFunctions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AE44FB4A1BB4BB540033EB62 /* GoFormatterFunctions.cpp */; }; AE6897281B94F6DE0018845D /* DWARFASTParserGo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AE6897261B94F6DE0018845D /* DWARFASTParserGo.cpp */; }; AE7F56291B8FE418001377A8 /* GoASTContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AEFFBA7C1AC4835D0087B932 /* GoASTContext.cpp */; }; AE8F624919EF3E1E00326B21 /* OperatingSystemGo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AE8F624719EF3E1E00326B21 /* OperatingSystemGo.cpp */; }; AEB0E4591BD6E9F800B24093 /* LLVMUserExpression.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AEB0E4581BD6E9F800B24093 /* LLVMUserExpression.cpp */; }; AEEA34051AC88A7400AB639D /* TypeSystem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AEEA34041AC88A7400AB639D /* TypeSystem.cpp */; }; AF061F87182C97ED00B6A19C /* RegisterContextHistory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF061F85182C97ED00B6A19C /* RegisterContextHistory.cpp */; }; AF0C112818580CD800C4C45B /* QueueItem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF0C112718580CD800C4C45B /* QueueItem.cpp */; }; AF0E22F018A09FB20009B7D1 /* AppleGetItemInfoHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF0E22EE18A09FB20009B7D1 /* AppleGetItemInfoHandler.cpp */; }; AF0EBBE8185940FB0059E52F /* SBQueue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF0EBBE6185940FB0059E52F /* SBQueue.cpp */; }; AF0EBBE9185940FB0059E52F /* SBQueueItem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF0EBBE7185940FB0059E52F /* SBQueueItem.cpp */; }; AF0EBBEC185941360059E52F /* SBQueue.h in Headers */ = {isa = PBXBuildFile; fileRef = AF0EBBEA185941360059E52F /* SBQueue.h */; settings = {ATTRIBUTES = (Public, ); }; }; AF0EBBED185941360059E52F /* SBQueueItem.h in Headers */ = {isa = PBXBuildFile; fileRef = AF0EBBEB185941360059E52F /* SBQueueItem.h */; settings = {ATTRIBUTES = (Public, ); }; }; AF0F6E501739A76D009180FE /* RegisterContextKDP_arm64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF0F6E4E1739A76D009180FE /* RegisterContextKDP_arm64.cpp */; }; AF1729D6182C907200E0AB97 /* HistoryThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF1729D4182C907200E0AB97 /* HistoryThread.cpp */; }; AF1729D7182C907200E0AB97 /* HistoryUnwind.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF1729D5182C907200E0AB97 /* HistoryUnwind.cpp */; }; AF1D88691B575E8D003CB899 /* ValueObjectConstResultCast.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF94726E1B575E430063D65C /* ValueObjectConstResultCast.cpp */; }; AF1F7B07189C904B0087DB9C /* AppleGetPendingItemsHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF1F7B05189C904B0087DB9C /* AppleGetPendingItemsHandler.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 */; }; AF23B4DB19009C66003E2A58 /* FreeBSDSignals.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF23B4D919009C66003E2A58 /* FreeBSDSignals.cpp */; }; AF248A4D1DA71C77000B814D /* TestArm64InstEmulation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF248A4C1DA71C77000B814D /* TestArm64InstEmulation.cpp */; }; AF254E31170CCC33007AE5C9 /* PlatformDarwinKernel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF254E2F170CCC33007AE5C9 /* PlatformDarwinKernel.cpp */; }; AF25AB26188F685C0030DEC3 /* AppleGetQueuesHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF25AB24188F685C0030DEC3 /* AppleGetQueuesHandler.cpp */; }; AF26703A1852D01E00B6CC36 /* Queue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF2670381852D01E00B6CC36 /* Queue.cpp */; }; AF26703B1852D01E00B6CC36 /* QueueList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF2670391852D01E00B6CC36 /* QueueList.cpp */; }; AF27AD551D3603EA00CF2833 /* DynamicLoaderDarwin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF27AD531D3603EA00CF2833 /* DynamicLoaderDarwin.cpp */; }; AF27AD561D3603EA00CF2833 /* DynamicLoaderDarwin.h in Headers */ = {isa = PBXBuildFile; fileRef = AF27AD541D3603EA00CF2833 /* DynamicLoaderDarwin.h */; }; AF2907BF1D3F082400E10654 /* DynamicLoaderMacOS.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF2907BD1D3F082400E10654 /* DynamicLoaderMacOS.cpp */; }; AF2BA6EC1A707E3400C5248A /* UriParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 33064C991A5C7A330033D415 /* UriParser.cpp */; }; AF2BCA6C18C7EFDE005B4526 /* JITLoaderGDB.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF2BCA6918C7EFDE005B4526 /* JITLoaderGDB.cpp */; }; AF33B4BE1C1FA441001B28D9 /* NetBSDSignals.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF33B4BC1C1FA441001B28D9 /* NetBSDSignals.cpp */; }; AF33B4BF1C1FA441001B28D9 /* NetBSDSignals.h in Headers */ = {isa = PBXBuildFile; fileRef = AF33B4BD1C1FA441001B28D9 /* NetBSDSignals.h */; }; AF37E10A17C861F20061E18E /* ProcessRunLock.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF37E10917C861F20061E18E /* ProcessRunLock.cpp */; }; AF3A4AD21EA05C4700B5DEB4 /* PlatformRemoteDarwinDevice.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF3A4AD01EA05C4700B5DEB4 /* PlatformRemoteDarwinDevice.cpp */; }; AF3A4AD31EA05C4700B5DEB4 /* PlatformRemoteDarwinDevice.h in Headers */ = {isa = PBXBuildFile; fileRef = AF3A4AD11EA05C4700B5DEB4 /* PlatformRemoteDarwinDevice.h */; }; AF415AE71D949E4400FCE0D4 /* x86AssemblyInspectionEngine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF415AE51D949E4400FCE0D4 /* x86AssemblyInspectionEngine.cpp */; }; AF415AE81D949E4400FCE0D4 /* x86AssemblyInspectionEngine.h in Headers */ = {isa = PBXBuildFile; fileRef = AF415AE61D949E4400FCE0D4 /* x86AssemblyInspectionEngine.h */; }; AF45FDE518A1F3AC0007051C /* AppleGetThreadItemInfoHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF45FDE318A1F3AC0007051C /* AppleGetThreadItemInfoHandler.cpp */; }; AF6335E21C87B21E00F7D554 /* SymbolFilePDB.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF6335E01C87B21E00F7D554 /* SymbolFilePDB.cpp */; }; AF6335E31C87B21E00F7D554 /* SymbolFilePDB.h in Headers */ = {isa = PBXBuildFile; fileRef = AF6335E11C87B21E00F7D554 /* SymbolFilePDB.h */; }; 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 */; }; AF77E0A11A033D360096C0EA /* RegisterContextFreeBSD_powerpc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF77E09A1A033D360096C0EA /* RegisterContextFreeBSD_powerpc.cpp */; }; AF77E0A41A033D360096C0EA /* RegisterContextPOSIX_powerpc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF77E09D1A033D360096C0EA /* RegisterContextPOSIX_powerpc.cpp */; }; AF77E0A91A033D740096C0EA /* RegisterContextPOSIXCore_powerpc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF77E0A71A033D740096C0EA /* RegisterContextPOSIXCore_powerpc.cpp */; }; AF81DEFA1828A23F0042CF19 /* SystemRuntime.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF81DEF91828A23F0042CF19 /* SystemRuntime.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 */; }; 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 */; }; AF90106515AB7D3600FF120D /* lldb.1 in CopyFiles */ = {isa = PBXBuildFile; fileRef = AF90106315AB7C5700FF120D /* lldb.1 */; }; 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 */; }; AF9B8F33182DB52900DA866F /* SystemRuntimeMacOSX.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF9B8F31182DB52900DA866F /* SystemRuntimeMacOSX.cpp */; }; AFAFD80A1E57E1B90017A14F /* ModuleCacheTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AFAFD8091E57E1B90017A14F /* ModuleCacheTest.cpp */; }; AFB3D2801AC262AB003B4B30 /* MICmdCmdGdbShow.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AFB3D27E1AC262AB003B4B30 /* MICmdCmdGdbShow.cpp */; }; AFC234091AF85CE100CDE8B6 /* CommandObjectLanguage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AFC234061AF85CE000CDE8B6 /* CommandObjectLanguage.cpp */; }; AFC2DCE71E6E2ED000283714 /* FastDemangle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AFC2DCE61E6E2ED000283714 /* FastDemangle.cpp */; }; AFC2DCE91E6E2F2C00283714 /* Baton.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AFC2DCE81E6E2F2C00283714 /* Baton.cpp */; }; AFC2DCEB1E6E2F7D00283714 /* UserID.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AFC2DCEA1E6E2F7D00283714 /* UserID.cpp */; }; AFC2DCF01E6E2FD200283714 /* VMRange.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AFC2DCEF1E6E2FD200283714 /* VMRange.cpp */; }; AFC2DCF31E6E30CF00283714 /* History.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AFC2DCF21E6E30CF00283714 /* History.cpp */; }; AFC2DCF61E6E316A00283714 /* StreamCallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AFC2DCF51E6E316A00283714 /* StreamCallback.cpp */; }; AFC2DCF91E6E318000283714 /* StreamGDBRemote.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AFC2DCF81E6E318000283714 /* StreamGDBRemote.cpp */; }; AFCB2BBD1BF577F40018B553 /* PythonExceptionState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AFCB2BBB1BF577F40018B553 /* PythonExceptionState.cpp */; }; AFCB2BBE1BF577F40018B553 /* PythonExceptionState.h in Headers */ = {isa = PBXBuildFile; fileRef = AFCB2BBC1BF577F40018B553 /* PythonExceptionState.h */; }; 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 */; }; AFDCDBCB19DD0F42005EA55E /* SBExecutionContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 940B02F419DC96CB00AD0F52 /* SBExecutionContext.h */; settings = {ATTRIBUTES = (Public, ); }; }; AFDFDFD119E34D3400EAE509 /* ConnectionFileDescriptorPosix.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AFDFDFD019E34D3400EAE509 /* ConnectionFileDescriptorPosix.cpp */; }; AFEC3362194A8ABA00FF05C6 /* StructuredData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AFEC3361194A8ABA00FF05C6 /* StructuredData.cpp */; }; AFEC5FD81D94F9380076A480 /* Testx86AssemblyInspectionEngine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AFEC5FD51D94F9380076A480 /* Testx86AssemblyInspectionEngine.cpp */; }; AFF87C87150FF669000E1742 /* com.apple.debugserver.plist in CopyFiles */ = {isa = PBXBuildFile; fileRef = AFF87C86150FF669000E1742 /* com.apple.debugserver.plist */; }; AFF87C8F150FF688000E1742 /* com.apple.debugserver.applist.plist in CopyFiles */ = {isa = PBXBuildFile; fileRef = AFF87C8E150FF688000E1742 /* com.apple.debugserver.applist.plist */; }; AFF8FF0C1E779D4B003830EF /* TildeExpressionResolver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AFF8FF0B1E779D4B003830EF /* TildeExpressionResolver.cpp */; }; B207C4931429607D00F36E4E /* CommandObjectWatchpoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B207C4921429607D00F36E4E /* CommandObjectWatchpoint.cpp */; }; B2462247141AD37D00F3D409 /* OptionGroupWatchpoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B2462246141AD37D00F3D409 /* OptionGroupWatchpoint.cpp */; }; B27318421416AC12006039C8 /* WatchpointList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B27318411416AC12006039C8 /* WatchpointList.cpp */; }; B28058A1139988B0002D96D0 /* InferiorCallPOSIX.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B28058A0139988B0002D96D0 /* InferiorCallPOSIX.cpp */; }; B299580B14F2FA1400050A04 /* DisassemblerLLVMC.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B299580A14F2FA1400050A04 /* DisassemblerLLVMC.cpp */; }; B2A58722143119810092BFBA /* SBWatchpoint.h in Headers */ = {isa = PBXBuildFile; fileRef = B2A58721143119810092BFBA /* SBWatchpoint.h */; settings = {ATTRIBUTES = (Public, ); }; }; B2A58724143119D50092BFBA /* SBWatchpoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B2A58723143119D50092BFBA /* SBWatchpoint.cpp */; }; B2B7CCEB15D1BD6700EEFB57 /* CommandObjectWatchpointCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B2B7CCEA15D1BD6600EEFB57 /* CommandObjectWatchpointCommand.cpp */; }; B2B7CCF015D1C20F00EEFB57 /* WatchpointOptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B2B7CCEF15D1C20F00EEFB57 /* WatchpointOptions.cpp */; }; + D67521381EA17C4200439694 /* MainLoop.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D67521351EA17C3900439694 /* MainLoop.cpp */; }; E769331C1A94D15400C73337 /* lldb-gdbserver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26D6F3F4183E7F9300194858 /* lldb-gdbserver.cpp */; }; E769331E1A94D18100C73337 /* lldb-server.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E769331D1A94D18100C73337 /* lldb-server.cpp */; }; E7723D441AC4A7FB002BA082 /* RegisterContextPOSIXCore_arm64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E7723D421AC4A7FB002BA082 /* RegisterContextPOSIXCore_arm64.cpp */; }; E7723D4C1AC4A944002BA082 /* RegisterContextPOSIX_arm64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E7723D4A1AC4A944002BA082 /* RegisterContextPOSIX_arm64.cpp */; }; E778E9A21B062D1700247609 /* EmulateInstructionMIPS.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E778E99F1B062D1700247609 /* EmulateInstructionMIPS.cpp */; }; E7E94ABC1B54961F00D0AE30 /* GDBRemoteSignals.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E73A15A41B548EC500786197 /* GDBRemoteSignals.cpp */; }; EB8375E71B553DE800BA907D /* ThreadPlanCallFunctionUsingABI.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EB8375E61B553DE800BA907D /* ThreadPlanCallFunctionUsingABI.cpp */; }; /* 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; }; 2687EACA1508115000DD8C2E /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; proxyType = 1; remoteGlobalIDString = 2687EAC51508110B00DD8C2E; remoteInfo = "install-headers"; }; 2687EACC1508115900DD8C2E /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; proxyType = 1; remoteGlobalIDString = 2687EAC51508110B00DD8C2E; remoteInfo = "install-headers"; }; 2687EACE1508116300DD8C2E /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; proxyType = 1; remoteGlobalIDString = 2687EAC51508110B00DD8C2E; remoteInfo = "install-headers"; }; 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"; }; 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; }; 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; }; 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 */ 23042D101976CA0A00621B2C /* PlatformKalimba.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = PlatformKalimba.cpp; sourceTree = ""; }; 23042D111976CA0A00621B2C /* PlatformKalimba.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PlatformKalimba.h; sourceTree = ""; }; 23059A0519532B96007B8189 /* LinuxSignals.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LinuxSignals.cpp; path = Utility/LinuxSignals.cpp; sourceTree = ""; }; 23059A0619532B96007B8189 /* LinuxSignals.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LinuxSignals.h; path = Utility/LinuxSignals.h; sourceTree = ""; }; 23059A0F1958B319007B8189 /* SBUnixSignals.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBUnixSignals.cpp; path = source/API/SBUnixSignals.cpp; sourceTree = ""; }; 23059A111958B37B007B8189 /* SBUnixSignals.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SBUnixSignals.h; path = include/lldb/API/SBUnixSignals.h; sourceTree = ""; }; 230EC4571D63C3A7008DF59F /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = CMakeLists.txt; path = source/Target/CMakeLists.txt; sourceTree = ""; }; 230EC4581D63C3A7008DF59F /* ThreadPlanCallOnFunctionExit.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ThreadPlanCallOnFunctionExit.cpp; path = source/Target/ThreadPlanCallOnFunctionExit.cpp; sourceTree = ""; }; 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 = ""; }; 2321F9381BDD332400BA9A93 /* CMakeLists.txt */ = {isa = PBXFileReference; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = ""; }; 2321F9391BDD332400BA9A93 /* SocketAddressTest.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = SocketAddressTest.cpp; sourceTree = ""; }; 2321F93A1BDD332400BA9A93 /* SocketTest.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = SocketTest.cpp; sourceTree = ""; }; 2321F93B1BDD332400BA9A93 /* SymbolsTest.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = SymbolsTest.cpp; sourceTree = ""; }; 2321F93D1BDD33CE00BA9A93 /* CMakeLists.txt */ = {isa = PBXFileReference; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = ""; }; 2321F93E1BDD33CE00BA9A93 /* TestArgs.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TestArgs.cpp; sourceTree = ""; }; 2321F9401BDD340D00BA9A93 /* CMakeLists.txt */ = {isa = PBXFileReference; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = ""; }; 2321F9431BDD346100BA9A93 /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = ""; }; 2321F9441BDD346100BA9A93 /* StringExtractorTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StringExtractorTest.cpp; sourceTree = ""; }; 2321F9451BDD346100BA9A93 /* TaskPoolTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TaskPoolTest.cpp; sourceTree = ""; }; 2321F9461BDD346100BA9A93 /* UriParserTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UriParserTest.cpp; sourceTree = ""; }; 2321F94C1BDD360F00BA9A93 /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = ""; }; 2321F94D1BDD360F00BA9A93 /* PythonDataObjectsTests.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PythonDataObjectsTests.cpp; sourceTree = ""; }; 2326CF3F1BDD613E00A5CEAC /* Python.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Python.framework; path = System/Library/Frameworks/Python.framework; sourceTree = SDKROOT; }; 2326CF451BDD647400A5CEAC /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 2326CF471BDD67C100A5CEAC /* libncurses.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libncurses.dylib; path = ../../../../../../usr/lib/libncurses.dylib; sourceTree = ""; }; 2326CF4A1BDD681800A5CEAC /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = ../../../../../../usr/lib/libz.dylib; sourceTree = ""; }; 2326CF4C1BDD684B00A5CEAC /* libedit.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libedit.dylib; path = ../../../../../../usr/lib/libedit.dylib; sourceTree = ""; }; 2326CF4E1BDD687800A5CEAC /* libpanel.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libpanel.dylib; path = ../../../../../../usr/lib/libpanel.dylib; sourceTree = ""; }; 2326CF511BDD693B00A5CEAC /* EditlineTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EditlineTest.cpp; sourceTree = ""; }; 232CB60B191E00CC00EF39FC /* NativeBreakpoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = NativeBreakpoint.cpp; path = source/Host/common/NativeBreakpoint.cpp; sourceTree = ""; }; 232CB60D191E00CC00EF39FC /* NativeBreakpointList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = NativeBreakpointList.cpp; path = source/Host/common/NativeBreakpointList.cpp; sourceTree = ""; }; 232CB60F191E00CC00EF39FC /* NativeProcessProtocol.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; name = NativeProcessProtocol.cpp; path = source/Host/common/NativeProcessProtocol.cpp; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.cpp; }; 232CB611191E00CC00EF39FC /* NativeThreadProtocol.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = NativeThreadProtocol.cpp; path = source/Host/common/NativeThreadProtocol.cpp; sourceTree = ""; }; 232CB613191E00CC00EF39FC /* SoftwareBreakpoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SoftwareBreakpoint.cpp; path = source/Host/common/SoftwareBreakpoint.cpp; sourceTree = ""; }; 233B007919609DB40090E598 /* ProcessLaunchInfo.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ProcessLaunchInfo.h; path = include/lldb/Target/ProcessLaunchInfo.h; sourceTree = ""; }; 233B007A1960A0440090E598 /* ProcessInfo.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ProcessInfo.h; path = include/lldb/Target/ProcessInfo.h; sourceTree = ""; }; 233B007B1960C9E60090E598 /* ProcessInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ProcessInfo.cpp; path = source/Target/ProcessInfo.cpp; sourceTree = ""; }; 233B007E1960CB280090E598 /* ProcessLaunchInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ProcessLaunchInfo.cpp; path = source/Target/ProcessLaunchInfo.cpp; sourceTree = ""; }; 233B009D19610D6B0090E598 /* Host.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = Host.cpp; sourceTree = ""; }; 2360092C193FB21500189DB1 /* MemoryRegionInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MemoryRegionInfo.h; path = include/lldb/Target/MemoryRegionInfo.h; sourceTree = ""; }; 236102981CF38A2B00B8E0B9 /* AddLLDB.cmake */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = AddLLDB.cmake; sourceTree = ""; }; 236102991CF38A2B00B8E0B9 /* LLDBConfig.cmake */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LLDBConfig.cmake; sourceTree = ""; }; 2361029A1CF38A2B00B8E0B9 /* LLDBStandalone.cmake */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LLDBStandalone.cmake; sourceTree = ""; }; 2361029E1CF38A3500B8E0B9 /* Android.cmake */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Android.cmake; sourceTree = ""; }; 236124A21986B4E2004EFC37 /* IOObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IOObject.cpp; sourceTree = ""; }; 236124A31986B4E2004EFC37 /* Socket.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Socket.cpp; sourceTree = ""; }; 236124A61986B50E004EFC37 /* IOObject.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = IOObject.h; path = include/lldb/Host/IOObject.h; sourceTree = ""; }; 236124A71986B50E004EFC37 /* Socket.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = Socket.h; path = include/lldb/Host/Socket.h; sourceTree = ""; }; 2370A37A1D66C57B000E7BE6 /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = ""; }; 2370A37C1D66C587000E7BE6 /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = ""; }; 2370A37D1D66C587000E7BE6 /* GDBRemoteClientBaseTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GDBRemoteClientBaseTest.cpp; sourceTree = ""; }; 2370A37E1D66C587000E7BE6 /* GDBRemoteCommunicationClientTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GDBRemoteCommunicationClientTest.cpp; sourceTree = ""; }; 2370A37F1D66C587000E7BE6 /* GDBRemoteTestUtils.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GDBRemoteTestUtils.cpp; sourceTree = ""; }; 2370A3801D66C587000E7BE6 /* GDBRemoteTestUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GDBRemoteTestUtils.h; sourceTree = ""; }; 2374D7431D4BAA1D005C9575 /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = ""; }; 2374D74E1D4BB299005C9575 /* GDBRemoteClientBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GDBRemoteClientBase.cpp; sourceTree = ""; }; 2374D74F1D4BB299005C9575 /* GDBRemoteClientBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GDBRemoteClientBase.h; sourceTree = ""; }; 2377C2F719E613C100737875 /* PipePosix.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PipePosix.cpp; sourceTree = ""; }; 237A8BAB1DEC9BBC00CEBAFF /* RegisterInfoPOSIX_arm64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegisterInfoPOSIX_arm64.cpp; path = Utility/RegisterInfoPOSIX_arm64.cpp; sourceTree = ""; }; 237A8BAC1DEC9BBC00CEBAFF /* RegisterInfoPOSIX_arm64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterInfoPOSIX_arm64.h; path = Utility/RegisterInfoPOSIX_arm64.h; sourceTree = ""; }; 237C577A19AF9D9F00213D59 /* HostInfoLinux.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = HostInfoLinux.h; path = include/lldb/Host/linux/HostInfoLinux.h; sourceTree = SOURCE_ROOT; }; 238F2B9D1D2C82D0001FF92A /* StructuredDataPlugin.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StructuredDataPlugin.cpp; path = source/Target/StructuredDataPlugin.cpp; sourceTree = ""; }; 238F2B9F1D2C835A001FF92A /* StructuredDataPlugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StructuredDataPlugin.h; path = include/lldb/Target/StructuredDataPlugin.h; sourceTree = ""; }; 238F2BA01D2C835A001FF92A /* SystemRuntime.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SystemRuntime.h; path = include/lldb/Target/SystemRuntime.h; sourceTree = ""; }; 238F2BA61D2C85FA001FF92A /* StructuredDataDarwinLog.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StructuredDataDarwinLog.cpp; sourceTree = ""; }; 238F2BA71D2C85FA001FF92A /* StructuredDataDarwinLog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StructuredDataDarwinLog.h; sourceTree = ""; }; 239481851C59EBDD00DF7168 /* libncurses.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libncurses.dylib; path = ../../../../../usr/lib/libncurses.dylib; sourceTree = ""; }; 239504C21BDD3FD600963CEA /* gtest_common.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = gtest_common.h; sourceTree = ""; }; 239504C61BDD3FF300963CEA /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = ""; }; 239504D41BDD451400963CEA /* lldb-gtest */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "lldb-gtest"; sourceTree = BUILT_PRODUCTS_DIR; }; 23AB052D199FF639003B8084 /* FreeBSDThread.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = FreeBSDThread.cpp; sourceTree = ""; }; 23AB052E199FF639003B8084 /* FreeBSDThread.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FreeBSDThread.h; sourceTree = ""; }; 23AB052F199FF639003B8084 /* ProcessFreeBSD.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = ProcessFreeBSD.cpp; sourceTree = ""; }; 23AB0530199FF639003B8084 /* ProcessFreeBSD.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ProcessFreeBSD.h; sourceTree = ""; }; 23AB0531199FF639003B8084 /* ProcessMonitor.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = ProcessMonitor.cpp; sourceTree = ""; }; 23AB0532199FF639003B8084 /* ProcessMonitor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ProcessMonitor.h; sourceTree = ""; }; 23CB14E31D66CA2200EDDDE1 /* libxml2.2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libxml2.2.dylib; path = usr/lib/libxml2.2.dylib; sourceTree = SDKROOT; }; 23CB14E61D66CC0E00EDDDE1 /* BroadcasterTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BroadcasterTest.cpp; sourceTree = ""; }; 23CB14E71D66CC0E00EDDDE1 /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = ""; }; 23CB14E81D66CC0E00EDDDE1 /* DataExtractorTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DataExtractorTest.cpp; sourceTree = ""; }; 23CB14E91D66CC0E00EDDDE1 /* ScalarTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScalarTest.cpp; sourceTree = ""; }; 23CB14F11D66CC9000EDDDE1 /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = ""; }; 23CB14F31D66CC9B00EDDDE1 /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = ""; }; 23CB14F61D66CCD600EDDDE1 /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = ""; }; 23CB14F91D66CCF100EDDDE1 /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = ""; }; 23CB14FA1D66CCF100EDDDE1 /* CPlusPlusLanguageTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CPlusPlusLanguageTest.cpp; sourceTree = ""; }; 23CB14FD1D66CD2400EDDDE1 /* FileSpecTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FileSpecTest.cpp; sourceTree = ""; }; 23CB15051D66CDB400EDDDE1 /* TestModule.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = TestModule.c; sourceTree = ""; }; 23CB15061D66CDB400EDDDE1 /* TestModule.so */ = {isa = PBXFileReference; lastKnownFileType = file; path = TestModule.so; sourceTree = ""; }; 23CB150B1D66CF5600EDDDE1 /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = ""; }; 23CB150C1D66CF5600EDDDE1 /* TestClangASTContext.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TestClangASTContext.cpp; sourceTree = ""; }; 23CB15101D66CF6900EDDDE1 /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = ""; }; 23CB15131D66CF8700EDDDE1 /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = ""; }; 23CB15141D66CF8700EDDDE1 /* SymbolFilePDBTests.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SymbolFilePDBTests.cpp; sourceTree = ""; }; 23CB15191D66CFAC00EDDDE1 /* test-dwarf.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "test-dwarf.cpp"; sourceTree = ""; }; 23CB151A1D66CFAC00EDDDE1 /* test-dwarf.exe */ = {isa = PBXFileReference; lastKnownFileType = file; path = "test-dwarf.exe"; sourceTree = ""; }; 23CB151B1D66CFAC00EDDDE1 /* test-pdb-alt.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "test-pdb-alt.cpp"; sourceTree = ""; }; 23CB151C1D66CFAC00EDDDE1 /* test-pdb-nested.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "test-pdb-nested.h"; sourceTree = ""; }; 23CB151D1D66CFAC00EDDDE1 /* test-pdb-types.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "test-pdb-types.cpp"; sourceTree = ""; }; 23CB151E1D66CFAC00EDDDE1 /* test-pdb-types.exe */ = {isa = PBXFileReference; lastKnownFileType = file; path = "test-pdb-types.exe"; sourceTree = ""; }; 23CB151F1D66CFAC00EDDDE1 /* test-pdb-types.pdb */ = {isa = PBXFileReference; lastKnownFileType = file; path = "test-pdb-types.pdb"; sourceTree = ""; }; 23CB15201D66CFAC00EDDDE1 /* test-pdb.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "test-pdb.cpp"; sourceTree = ""; }; 23CB15211D66CFAC00EDDDE1 /* test-pdb.exe */ = {isa = PBXFileReference; lastKnownFileType = file; path = "test-pdb.exe"; sourceTree = ""; }; 23CB15221D66CFAC00EDDDE1 /* test-pdb.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "test-pdb.h"; sourceTree = ""; }; 23CB15231D66CFAC00EDDDE1 /* test-pdb.pdb */ = {isa = PBXFileReference; lastKnownFileType = file; path = "test-pdb.pdb"; sourceTree = ""; }; 23CB15561D66DA9300EDDDE1 /* lldb-gtest */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "lldb-gtest"; sourceTree = BUILT_PRODUCTS_DIR; }; 23D065811D4A7BDA0008EDE6 /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = ""; }; 23D065821D4A7BDA0008EDE6 /* RenderScriptExpressionOpts.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderScriptExpressionOpts.cpp; sourceTree = ""; }; 23D065831D4A7BDA0008EDE6 /* RenderScriptExpressionOpts.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderScriptExpressionOpts.h; sourceTree = ""; }; 23D065841D4A7BDA0008EDE6 /* RenderScriptRuntime.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderScriptRuntime.cpp; sourceTree = ""; }; 23D065851D4A7BDA0008EDE6 /* RenderScriptRuntime.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderScriptRuntime.h; sourceTree = ""; }; 23D065861D4A7BDA0008EDE6 /* RenderScriptx86ABIFixups.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderScriptx86ABIFixups.cpp; sourceTree = ""; }; 23D065871D4A7BDA0008EDE6 /* RenderScriptx86ABIFixups.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderScriptx86ABIFixups.h; sourceTree = ""; }; 23DCBE971D63E14B0084C36B /* SBLanguageRuntime.i */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBLanguageRuntime.i; sourceTree = ""; }; 23DCBE981D63E14B0084C36B /* SBStructuredData.i */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBStructuredData.i; sourceTree = ""; }; 23DCBE991D63E14B0084C36B /* SBTypeEnumMember.i */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBTypeEnumMember.i; sourceTree = ""; }; 23DCBE9A1D63E14B0084C36B /* SBUnixSignals.i */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBUnixSignals.i; sourceTree = ""; }; 23DCBE9F1D63E3800084C36B /* SBStructuredData.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SBStructuredData.h; path = include/lldb/API/SBStructuredData.h; sourceTree = ""; }; 23DCBEA01D63E6440084C36B /* SBStructuredData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBStructuredData.cpp; path = source/API/SBStructuredData.cpp; sourceTree = ""; }; 23DCEA421D1C4C6900A602B4 /* SBMemoryRegionInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBMemoryRegionInfo.cpp; path = source/API/SBMemoryRegionInfo.cpp; sourceTree = ""; }; 23DCEA431D1C4C6900A602B4 /* SBMemoryRegionInfoList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBMemoryRegionInfoList.cpp; path = source/API/SBMemoryRegionInfoList.cpp; sourceTree = ""; }; 23DDF224196C3EE600BB8417 /* CommandOptionValidators.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandOptionValidators.cpp; path = source/Interpreter/CommandOptionValidators.cpp; sourceTree = ""; }; 23E2E5161D903689006F38BB /* ArchSpecTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ArchSpecTest.cpp; sourceTree = ""; }; 23E2E5191D9036F2006F38BB /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = ""; }; 23E2E51A1D9036F2006F38BB /* MinidumpParserTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MinidumpParserTest.cpp; sourceTree = ""; }; 23E2E51E1D903726006F38BB /* fizzbuzz_no_heap.dmp */ = {isa = PBXFileReference; lastKnownFileType = file; path = fizzbuzz_no_heap.dmp; sourceTree = ""; }; 23E2E51F1D903726006F38BB /* linux-x86_64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "linux-x86_64.cpp"; sourceTree = ""; }; 23E2E5201D903726006F38BB /* linux-x86_64.dmp */ = {isa = PBXFileReference; lastKnownFileType = file; path = "linux-x86_64.dmp"; sourceTree = ""; }; 23E2E52D1D90382B006F38BB /* BreakpointIDTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BreakpointIDTest.cpp; sourceTree = ""; }; 23E2E52E1D90382B006F38BB /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = ""; }; 23E2E5361D9048FB006F38BB /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = ""; }; 23E2E5371D9048FB006F38BB /* MinidumpParser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MinidumpParser.cpp; sourceTree = ""; }; 23E2E5381D9048FB006F38BB /* MinidumpParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MinidumpParser.h; sourceTree = ""; }; 23E2E5391D9048FB006F38BB /* MinidumpTypes.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MinidumpTypes.cpp; sourceTree = ""; }; 23E2E53A1D9048FB006F38BB /* MinidumpTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MinidumpTypes.h; sourceTree = ""; }; 23E77CD61C20F29F007192AD /* DWARFDebugMacro.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DWARFDebugMacro.cpp; sourceTree = ""; }; 23E77CD71C20F29F007192AD /* DWARFDebugMacro.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DWARFDebugMacro.h; sourceTree = ""; }; 23E77CDB1C20F2F2007192AD /* DebugMacros.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DebugMacros.cpp; path = source/Symbol/DebugMacros.cpp; sourceTree = ""; }; 23EDE3301926839700F6A132 /* NativeRegisterContext.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = NativeRegisterContext.cpp; path = source/Host/common/NativeRegisterContext.cpp; sourceTree = ""; }; 23EDE3311926843600F6A132 /* NativeRegisterContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NativeRegisterContext.h; path = include/lldb/Host/common/NativeRegisterContext.h; sourceTree = ""; }; 23EDE3371926AAD500F6A132 /* RegisterInfoInterface.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = RegisterInfoInterface.h; path = Utility/RegisterInfoInterface.h; sourceTree = ""; }; 23EFE388193D1ABC00E54E54 /* SBTypeEnumMember.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SBTypeEnumMember.h; path = include/lldb/API/SBTypeEnumMember.h; sourceTree = ""; }; 23EFE38A193D1AEC00E54E54 /* SBTypeEnumMember.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = SBTypeEnumMember.cpp; path = source/API/SBTypeEnumMember.cpp; sourceTree = ""; }; 23F403471926C8D50046DC9B /* NativeRegisterContextRegisterInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NativeRegisterContextRegisterInfo.h; path = Utility/NativeRegisterContextRegisterInfo.h; sourceTree = ""; }; 23F403481926CC250046DC9B /* NativeRegisterContextRegisterInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = NativeRegisterContextRegisterInfo.cpp; path = Utility/NativeRegisterContextRegisterInfo.cpp; sourceTree = ""; }; 250D6AE11A9679270049CC70 /* FileSystem.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FileSystem.cpp; sourceTree = ""; }; 25420ECC1A6490B8009ADBCB /* OptionValueChar.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OptionValueChar.cpp; path = source/Interpreter/OptionValueChar.cpp; sourceTree = ""; }; 25420ECE1A64911B009ADBCB /* OptionValueChar.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = OptionValueChar.h; path = include/lldb/Interpreter/OptionValueChar.h; sourceTree = ""; }; 25420ED11A649D88009ADBCB /* PipeBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PipeBase.cpp; sourceTree = ""; }; 254FBB921A81AA5200BD6378 /* SBLaunchInfo.i */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBLaunchInfo.i; sourceTree = ""; }; 254FBB941A81AA7F00BD6378 /* SBLaunchInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBLaunchInfo.cpp; path = source/API/SBLaunchInfo.cpp; sourceTree = ""; }; 254FBB961A81B03100BD6378 /* SBLaunchInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBLaunchInfo.h; path = include/lldb/API/SBLaunchInfo.h; sourceTree = ""; }; 254FBBA21A9166F100BD6378 /* SBAttachInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBAttachInfo.h; path = include/lldb/API/SBAttachInfo.h; sourceTree = ""; }; 254FBBA41A91670E00BD6378 /* SBAttachInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBAttachInfo.cpp; path = source/API/SBAttachInfo.cpp; sourceTree = ""; }; 254FBBA61A91672800BD6378 /* SBAttachInfo.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBAttachInfo.i; sourceTree = ""; }; 255EFF6F1AFABA320069F277 /* LockFileWindows.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = LockFileWindows.h; path = include/lldb/Host/windows/LockFileWindows.h; sourceTree = ""; }; 255EFF701AFABA320069F277 /* PipeWindows.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = PipeWindows.h; path = include/lldb/Host/windows/PipeWindows.h; sourceTree = ""; }; 255EFF711AFABA4D0069F277 /* LockFileWindows.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LockFileWindows.cpp; path = source/Host/windows/LockFileWindows.cpp; sourceTree = ""; }; 255EFF731AFABA720069F277 /* LockFileBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LockFileBase.cpp; sourceTree = ""; }; 255EFF751AFABA950069F277 /* LockFilePosix.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LockFilePosix.cpp; sourceTree = ""; }; 256CBDB21ADD0EFD00BC6CDC /* RegisterContextPOSIXCore_arm.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RegisterContextPOSIXCore_arm.cpp; sourceTree = ""; }; 256CBDB31ADD0EFD00BC6CDC /* RegisterContextPOSIXCore_arm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegisterContextPOSIXCore_arm.h; sourceTree = ""; }; 256CBDB81ADD107200BC6CDC /* RegisterContextLinux_mips64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegisterContextLinux_mips64.cpp; path = Utility/RegisterContextLinux_mips64.cpp; sourceTree = ""; }; 256CBDB91ADD107200BC6CDC /* RegisterContextLinux_mips64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterContextLinux_mips64.h; path = Utility/RegisterContextLinux_mips64.h; sourceTree = ""; }; 256CBDBE1ADD11C000BC6CDC /* RegisterContextPOSIX_arm.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegisterContextPOSIX_arm.cpp; path = Utility/RegisterContextPOSIX_arm.cpp; sourceTree = ""; }; 256CBDBF1ADD11C000BC6CDC /* RegisterContextPOSIX_arm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterContextPOSIX_arm.h; path = Utility/RegisterContextPOSIX_arm.h; sourceTree = ""; }; 2579065A1BD0488100178368 /* TCPSocket.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TCPSocket.cpp; sourceTree = ""; }; 2579065B1BD0488100178368 /* UDPSocket.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UDPSocket.cpp; sourceTree = ""; }; 2579065E1BD0488D00178368 /* DomainSocket.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DomainSocket.cpp; sourceTree = ""; }; 257906621BD5AFD000178368 /* Acceptor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Acceptor.cpp; path = "tools/lldb-server/Acceptor.cpp"; sourceTree = ""; }; 257906631BD5AFD000178368 /* Acceptor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Acceptor.h; path = "tools/lldb-server/Acceptor.h"; sourceTree = ""; }; 25EF23751AC09AD800908DF0 /* AdbClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AdbClient.cpp; sourceTree = ""; }; 25EF23761AC09AD800908DF0 /* AdbClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdbClient.h; sourceTree = ""; }; 260157C41885F4FF00F875CF /* libpanel.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libpanel.dylib; path = /usr/lib/libpanel.dylib; sourceTree = ""; }; 260223E7115F06D500A601A2 /* SBCommunication.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBCommunication.h; path = include/lldb/API/SBCommunication.h; sourceTree = ""; }; 260223E8115F06E500A601A2 /* SBCommunication.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBCommunication.cpp; path = source/API/SBCommunication.cpp; sourceTree = ""; }; 26022531115F27FA00A601A2 /* SBFileSpec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBFileSpec.h; path = include/lldb/API/SBFileSpec.h; sourceTree = ""; }; 26022532115F281400A601A2 /* SBFileSpec.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBFileSpec.cpp; path = source/API/SBFileSpec.cpp; sourceTree = ""; }; 260A248D15D06C4F009981B0 /* OptionValues.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OptionValues.h; path = include/lldb/Interpreter/OptionValues.h; sourceTree = ""; }; 260A39A519647A3A004B4130 /* Pipe.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Pipe.h; path = include/lldb/Host/Pipe.h; sourceTree = ""; }; 260A63111860FDB600FECF8E /* Queue.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = Queue.h; path = include/lldb/Target/Queue.h; sourceTree = ""; }; 260A63121860FDBD00FECF8E /* QueueItem.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = QueueItem.h; path = include/lldb/Target/QueueItem.h; sourceTree = ""; }; 260A63131860FDC700FECF8E /* QueueList.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = QueueList.h; path = include/lldb/Target/QueueList.h; sourceTree = ""; }; 260A63161861008E00FECF8E /* IOHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IOHandler.h; path = include/lldb/Core/IOHandler.h; sourceTree = ""; }; 260A63181861009E00FECF8E /* IOHandler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = IOHandler.cpp; path = source/Core/IOHandler.cpp; sourceTree = ""; }; 260C6EA013011578005E16B0 /* File.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = File.h; path = include/lldb/Host/File.h; sourceTree = ""; }; 260C6EA213011581005E16B0 /* File.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = File.cpp; sourceTree = ""; }; 260C847110F50EFC00BB2B04 /* ThreadPlanBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ThreadPlanBase.cpp; path = source/Target/ThreadPlanBase.cpp; sourceTree = ""; }; 260C847210F50EFC00BB2B04 /* ThreadPlanStepInstruction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ThreadPlanStepInstruction.cpp; path = source/Target/ThreadPlanStepInstruction.cpp; sourceTree = ""; }; 260C847310F50EFC00BB2B04 /* ThreadPlanStepOut.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ThreadPlanStepOut.cpp; path = source/Target/ThreadPlanStepOut.cpp; sourceTree = ""; }; 260C847410F50EFC00BB2B04 /* ThreadPlanStepOverBreakpoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ThreadPlanStepOverBreakpoint.cpp; path = source/Target/ThreadPlanStepOverBreakpoint.cpp; sourceTree = ""; }; 260C847510F50EFC00BB2B04 /* ThreadPlanStepThrough.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ThreadPlanStepThrough.cpp; path = source/Target/ThreadPlanStepThrough.cpp; sourceTree = ""; }; 260C847610F50EFC00BB2B04 /* ThreadPlanStepRange.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ThreadPlanStepRange.cpp; path = source/Target/ThreadPlanStepRange.cpp; sourceTree = ""; }; 260C847F10F50F0A00BB2B04 /* ThreadPlanBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ThreadPlanBase.h; path = include/lldb/Target/ThreadPlanBase.h; sourceTree = ""; }; 260C848010F50F0A00BB2B04 /* ThreadPlanStepInstruction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ThreadPlanStepInstruction.h; path = include/lldb/Target/ThreadPlanStepInstruction.h; sourceTree = ""; }; 260C848110F50F0A00BB2B04 /* ThreadPlanStepOut.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ThreadPlanStepOut.h; path = include/lldb/Target/ThreadPlanStepOut.h; sourceTree = ""; }; 260C848210F50F0A00BB2B04 /* ThreadPlanStepOverBreakpoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ThreadPlanStepOverBreakpoint.h; path = include/lldb/Target/ThreadPlanStepOverBreakpoint.h; sourceTree = ""; }; 260C848310F50F0A00BB2B04 /* ThreadPlanStepThrough.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ThreadPlanStepThrough.h; path = include/lldb/Target/ThreadPlanStepThrough.h; sourceTree = ""; }; 260C848410F50F0A00BB2B04 /* ThreadPlanStepRange.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ThreadPlanStepRange.h; path = include/lldb/Target/ThreadPlanStepRange.h; sourceTree = ""; }; 260C876910F538E700BB2B04 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; 260C897A10F57C5600BB2B04 /* DynamicLoaderMacOSXDYLD.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DynamicLoaderMacOSXDYLD.cpp; sourceTree = ""; }; 260C897B10F57C5600BB2B04 /* DynamicLoaderMacOSXDYLD.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DynamicLoaderMacOSXDYLD.h; sourceTree = ""; }; 260C898010F57C5600BB2B04 /* ObjectContainerUniversalMachO.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ObjectContainerUniversalMachO.cpp; sourceTree = ""; }; 260C898110F57C5600BB2B04 /* ObjectContainerUniversalMachO.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ObjectContainerUniversalMachO.h; sourceTree = ""; }; 260C898510F57C5600BB2B04 /* ObjectFileELF.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ObjectFileELF.cpp; sourceTree = ""; }; 260C898610F57C5600BB2B04 /* ObjectFileELF.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ObjectFileELF.h; sourceTree = ""; }; 260C898810F57C5600BB2B04 /* ObjectFileMachO.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ObjectFileMachO.cpp; sourceTree = ""; }; 260C898910F57C5600BB2B04 /* ObjectFileMachO.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ObjectFileMachO.h; sourceTree = ""; }; 260C89B310F57C5600BB2B04 /* DWARFAbbreviationDeclaration.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DWARFAbbreviationDeclaration.cpp; sourceTree = ""; }; 260C89B410F57C5600BB2B04 /* DWARFAbbreviationDeclaration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DWARFAbbreviationDeclaration.h; sourceTree = ""; }; 260C89B610F57C5600BB2B04 /* DWARFAttribute.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DWARFAttribute.h; sourceTree = ""; }; 260C89B710F57C5600BB2B04 /* DWARFCompileUnit.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DWARFCompileUnit.cpp; sourceTree = ""; }; 260C89B810F57C5600BB2B04 /* DWARFCompileUnit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DWARFCompileUnit.h; sourceTree = ""; }; 260C89B910F57C5600BB2B04 /* DWARFDebugAbbrev.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DWARFDebugAbbrev.cpp; sourceTree = ""; }; 260C89BA10F57C5600BB2B04 /* DWARFDebugAbbrev.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DWARFDebugAbbrev.h; sourceTree = ""; }; 260C89BB10F57C5600BB2B04 /* DWARFDebugAranges.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DWARFDebugAranges.cpp; sourceTree = ""; }; 260C89BC10F57C5600BB2B04 /* DWARFDebugAranges.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DWARFDebugAranges.h; sourceTree = ""; }; 260C89BD10F57C5600BB2B04 /* DWARFDebugArangeSet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DWARFDebugArangeSet.cpp; sourceTree = ""; }; 260C89BE10F57C5600BB2B04 /* DWARFDebugArangeSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DWARFDebugArangeSet.h; sourceTree = ""; }; 260C89BF10F57C5600BB2B04 /* DWARFDebugInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DWARFDebugInfo.cpp; sourceTree = ""; }; 260C89C010F57C5600BB2B04 /* DWARFDebugInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DWARFDebugInfo.h; sourceTree = ""; }; 260C89C110F57C5600BB2B04 /* DWARFDebugInfoEntry.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DWARFDebugInfoEntry.cpp; sourceTree = ""; }; 260C89C210F57C5600BB2B04 /* DWARFDebugInfoEntry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DWARFDebugInfoEntry.h; sourceTree = ""; }; 260C89C310F57C5600BB2B04 /* DWARFDebugLine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DWARFDebugLine.cpp; sourceTree = ""; }; 260C89C410F57C5600BB2B04 /* DWARFDebugLine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DWARFDebugLine.h; sourceTree = ""; }; 260C89C510F57C5600BB2B04 /* DWARFDebugMacinfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DWARFDebugMacinfo.cpp; sourceTree = ""; }; 260C89C610F57C5600BB2B04 /* DWARFDebugMacinfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DWARFDebugMacinfo.h; sourceTree = ""; }; 260C89C710F57C5600BB2B04 /* DWARFDebugMacinfoEntry.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DWARFDebugMacinfoEntry.cpp; sourceTree = ""; }; 260C89C810F57C5600BB2B04 /* DWARFDebugMacinfoEntry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DWARFDebugMacinfoEntry.h; sourceTree = ""; }; 260C89C910F57C5600BB2B04 /* DWARFDebugPubnames.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DWARFDebugPubnames.cpp; sourceTree = ""; }; 260C89CA10F57C5600BB2B04 /* DWARFDebugPubnames.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DWARFDebugPubnames.h; sourceTree = ""; }; 260C89CB10F57C5600BB2B04 /* DWARFDebugPubnamesSet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DWARFDebugPubnamesSet.cpp; sourceTree = ""; }; 260C89CC10F57C5600BB2B04 /* DWARFDebugPubnamesSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DWARFDebugPubnamesSet.h; sourceTree = ""; }; 260C89CD10F57C5600BB2B04 /* DWARFDebugRanges.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DWARFDebugRanges.cpp; sourceTree = ""; }; 260C89CE10F57C5600BB2B04 /* DWARFDebugRanges.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DWARFDebugRanges.h; sourceTree = ""; }; 260C89CF10F57C5600BB2B04 /* DWARFDefines.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; fileEncoding = 4; path = DWARFDefines.cpp; sourceTree = ""; }; 260C89D010F57C5600BB2B04 /* DWARFDefines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DWARFDefines.h; sourceTree = ""; }; 260C89D110F57C5600BB2B04 /* DWARFDIECollection.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DWARFDIECollection.cpp; sourceTree = ""; }; 260C89D210F57C5600BB2B04 /* DWARFDIECollection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DWARFDIECollection.h; sourceTree = ""; }; 260C89D310F57C5600BB2B04 /* DWARFFormValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DWARFFormValue.cpp; sourceTree = ""; }; 260C89D410F57C5600BB2B04 /* DWARFFormValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DWARFFormValue.h; sourceTree = ""; }; 260C89D910F57C5600BB2B04 /* SymbolFileDWARF.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SymbolFileDWARF.cpp; sourceTree = ""; }; 260C89DA10F57C5600BB2B04 /* SymbolFileDWARF.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SymbolFileDWARF.h; sourceTree = ""; }; 260C89DB10F57C5600BB2B04 /* SymbolFileDWARFDebugMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SymbolFileDWARFDebugMap.cpp; sourceTree = ""; }; 260C89DC10F57C5600BB2B04 /* SymbolFileDWARFDebugMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SymbolFileDWARFDebugMap.h; sourceTree = ""; }; 260C89DE10F57C5600BB2B04 /* SymbolFileSymtab.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SymbolFileSymtab.cpp; sourceTree = ""; }; 260C89DF10F57C5600BB2B04 /* SymbolFileSymtab.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SymbolFileSymtab.h; sourceTree = ""; }; 260C89E210F57C5600BB2B04 /* SymbolVendorMacOSX.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SymbolVendorMacOSX.cpp; sourceTree = ""; }; 260C89E310F57C5600BB2B04 /* SymbolVendorMacOSX.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SymbolVendorMacOSX.h; sourceTree = ""; }; 260CC62115D04377002BF2E0 /* OptionValueArgs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OptionValueArgs.h; path = include/lldb/Interpreter/OptionValueArgs.h; sourceTree = ""; }; 260CC62215D04377002BF2E0 /* OptionValueArray.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OptionValueArray.h; path = include/lldb/Interpreter/OptionValueArray.h; sourceTree = ""; }; 260CC62315D04377002BF2E0 /* OptionValueBoolean.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OptionValueBoolean.h; path = include/lldb/Interpreter/OptionValueBoolean.h; sourceTree = ""; }; 260CC62415D04377002BF2E0 /* OptionValueProperties.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OptionValueProperties.h; path = include/lldb/Interpreter/OptionValueProperties.h; sourceTree = ""; }; 260CC62515D04377002BF2E0 /* OptionValueDictionary.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OptionValueDictionary.h; path = include/lldb/Interpreter/OptionValueDictionary.h; sourceTree = ""; }; 260CC62615D04377002BF2E0 /* OptionValueEnumeration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OptionValueEnumeration.h; path = include/lldb/Interpreter/OptionValueEnumeration.h; sourceTree = ""; }; 260CC62715D04377002BF2E0 /* OptionValueFileSpec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OptionValueFileSpec.h; path = include/lldb/Interpreter/OptionValueFileSpec.h; sourceTree = ""; }; 260CC62815D04377002BF2E0 /* OptionValueFileSpecList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OptionValueFileSpecList.h; path = include/lldb/Interpreter/OptionValueFileSpecList.h; sourceTree = ""; }; 260CC62915D04377002BF2E0 /* OptionValueFormat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OptionValueFormat.h; path = include/lldb/Interpreter/OptionValueFormat.h; sourceTree = ""; }; 260CC62A15D04377002BF2E0 /* OptionValueSInt64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OptionValueSInt64.h; path = include/lldb/Interpreter/OptionValueSInt64.h; sourceTree = ""; }; 260CC62B15D04377002BF2E0 /* OptionValueString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OptionValueString.h; path = include/lldb/Interpreter/OptionValueString.h; sourceTree = ""; }; 260CC62C15D04377002BF2E0 /* OptionValueUInt64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OptionValueUInt64.h; path = include/lldb/Interpreter/OptionValueUInt64.h; sourceTree = ""; }; 260CC62D15D04377002BF2E0 /* OptionValueUUID.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OptionValueUUID.h; path = include/lldb/Interpreter/OptionValueUUID.h; sourceTree = ""; }; 260CC63B15D0440D002BF2E0 /* OptionValueArgs.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OptionValueArgs.cpp; path = source/Interpreter/OptionValueArgs.cpp; sourceTree = ""; }; 260CC63C15D0440D002BF2E0 /* OptionValueArray.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OptionValueArray.cpp; path = source/Interpreter/OptionValueArray.cpp; sourceTree = ""; }; 260CC63D15D0440D002BF2E0 /* OptionValueBoolean.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OptionValueBoolean.cpp; path = source/Interpreter/OptionValueBoolean.cpp; sourceTree = ""; }; 260CC63E15D0440D002BF2E0 /* OptionValueProperties.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OptionValueProperties.cpp; path = source/Interpreter/OptionValueProperties.cpp; sourceTree = ""; }; 260CC63F15D0440D002BF2E0 /* OptionValueDictionary.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OptionValueDictionary.cpp; path = source/Interpreter/OptionValueDictionary.cpp; sourceTree = ""; }; 260CC64015D0440D002BF2E0 /* OptionValueEnumeration.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OptionValueEnumeration.cpp; path = source/Interpreter/OptionValueEnumeration.cpp; sourceTree = ""; }; 260CC64115D0440D002BF2E0 /* OptionValueFileSpec.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OptionValueFileSpec.cpp; path = source/Interpreter/OptionValueFileSpec.cpp; sourceTree = ""; }; 260CC64215D0440D002BF2E0 /* OptionValueFileSpecLIst.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OptionValueFileSpecLIst.cpp; path = source/Interpreter/OptionValueFileSpecLIst.cpp; sourceTree = ""; }; 260CC64315D0440D002BF2E0 /* OptionValueFormat.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OptionValueFormat.cpp; path = source/Interpreter/OptionValueFormat.cpp; sourceTree = ""; }; 260CC64415D0440D002BF2E0 /* OptionValueSInt64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OptionValueSInt64.cpp; path = source/Interpreter/OptionValueSInt64.cpp; sourceTree = ""; }; 260CC64515D0440D002BF2E0 /* OptionValueString.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OptionValueString.cpp; path = source/Interpreter/OptionValueString.cpp; sourceTree = ""; }; 260CC64615D0440D002BF2E0 /* OptionValueUInt64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OptionValueUInt64.cpp; path = source/Interpreter/OptionValueUInt64.cpp; sourceTree = ""; }; 260CC64715D0440D002BF2E0 /* OptionValueUUID.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OptionValueUUID.cpp; path = source/Interpreter/OptionValueUUID.cpp; sourceTree = ""; }; 260D9B2615EC369500960137 /* ModuleSpec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ModuleSpec.h; path = include/lldb/Core/ModuleSpec.h; sourceTree = ""; }; 260E07C3136FA68900CF21D3 /* OptionGroupUUID.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = OptionGroupUUID.h; path = include/lldb/Interpreter/OptionGroupUUID.h; sourceTree = ""; }; 260E07C5136FA69E00CF21D3 /* OptionGroupUUID.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OptionGroupUUID.cpp; path = source/Interpreter/OptionGroupUUID.cpp; sourceTree = ""; }; 260E07C7136FAB9200CF21D3 /* OptionGroupFile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OptionGroupFile.cpp; path = source/Interpreter/OptionGroupFile.cpp; sourceTree = ""; }; 260E07C9136FABAC00CF21D3 /* OptionGroupFile.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = OptionGroupFile.h; path = include/lldb/Interpreter/OptionGroupFile.h; sourceTree = ""; }; 26109B3B1155D70100CC3529 /* LogChannelDWARF.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LogChannelDWARF.cpp; sourceTree = ""; }; 26109B3C1155D70100CC3529 /* LogChannelDWARF.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LogChannelDWARF.h; sourceTree = ""; }; 2611FEEF142D83060017FEA3 /* SBAddress.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBAddress.i; sourceTree = ""; }; 2611FEF0142D83060017FEA3 /* SBBlock.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBBlock.i; sourceTree = ""; }; 2611FEF1142D83060017FEA3 /* SBBreakpoint.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBBreakpoint.i; sourceTree = ""; }; 2611FEF2142D83060017FEA3 /* SBBreakpointLocation.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBBreakpointLocation.i; sourceTree = ""; }; 2611FEF3142D83060017FEA3 /* SBBroadcaster.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBBroadcaster.i; sourceTree = ""; }; 2611FEF4142D83060017FEA3 /* SBCommandInterpreter.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBCommandInterpreter.i; sourceTree = ""; }; 2611FEF5142D83060017FEA3 /* SBCommandReturnObject.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBCommandReturnObject.i; sourceTree = ""; }; 2611FEF6142D83060017FEA3 /* SBCommunication.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBCommunication.i; sourceTree = ""; }; 2611FEF7142D83060017FEA3 /* SBCompileUnit.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBCompileUnit.i; sourceTree = ""; }; 2611FEF8142D83060017FEA3 /* SBData.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBData.i; sourceTree = ""; }; 2611FEF9142D83060017FEA3 /* SBDebugger.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBDebugger.i; sourceTree = ""; }; 2611FEFA142D83060017FEA3 /* SBError.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBError.i; sourceTree = ""; }; 2611FEFB142D83060017FEA3 /* SBEvent.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBEvent.i; sourceTree = ""; }; 2611FEFC142D83060017FEA3 /* SBFileSpec.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBFileSpec.i; sourceTree = ""; }; 2611FEFD142D83060017FEA3 /* SBFileSpecList.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBFileSpecList.i; sourceTree = ""; }; 2611FEFE142D83060017FEA3 /* SBFrame.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBFrame.i; sourceTree = ""; }; 2611FEFF142D83060017FEA3 /* SBFunction.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBFunction.i; sourceTree = ""; }; 2611FF00142D83060017FEA3 /* SBHostOS.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBHostOS.i; sourceTree = ""; }; 2611FF02142D83060017FEA3 /* SBInstruction.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBInstruction.i; sourceTree = ""; }; 2611FF03142D83060017FEA3 /* SBInstructionList.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBInstructionList.i; sourceTree = ""; }; 2611FF04142D83060017FEA3 /* SBLineEntry.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBLineEntry.i; sourceTree = ""; }; 2611FF05142D83060017FEA3 /* SBListener.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBListener.i; sourceTree = ""; }; 2611FF06142D83060017FEA3 /* SBModule.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBModule.i; sourceTree = ""; }; 2611FF07142D83060017FEA3 /* SBProcess.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBProcess.i; sourceTree = ""; }; 2611FF08142D83060017FEA3 /* SBSection.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBSection.i; sourceTree = ""; }; 2611FF09142D83060017FEA3 /* SBSourceManager.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBSourceManager.i; sourceTree = ""; }; 2611FF0A142D83060017FEA3 /* SBStream.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBStream.i; sourceTree = ""; }; 2611FF0B142D83060017FEA3 /* SBStringList.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBStringList.i; sourceTree = ""; }; 2611FF0C142D83060017FEA3 /* SBSymbol.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBSymbol.i; sourceTree = ""; }; 2611FF0D142D83060017FEA3 /* SBSymbolContext.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBSymbolContext.i; sourceTree = ""; }; 2611FF0E142D83060017FEA3 /* SBSymbolContextList.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBSymbolContextList.i; sourceTree = ""; }; 2611FF0F142D83060017FEA3 /* SBTarget.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBTarget.i; sourceTree = ""; }; 2611FF10142D83060017FEA3 /* SBThread.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBThread.i; sourceTree = ""; }; 2611FF11142D83060017FEA3 /* SBType.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBType.i; sourceTree = ""; }; 2611FF12142D83060017FEA3 /* SBValue.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBValue.i; sourceTree = ""; }; 2611FF13142D83060017FEA3 /* SBValueList.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBValueList.i; sourceTree = ""; }; 2615DB841208A9C90021781D /* StopInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StopInfo.h; path = include/lldb/Target/StopInfo.h; sourceTree = ""; }; 2615DB861208A9E40021781D /* StopInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StopInfo.cpp; path = source/Target/StopInfo.cpp; sourceTree = ""; }; 2615DBC81208B5FC0021781D /* StopInfoMachException.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StopInfoMachException.cpp; path = Utility/StopInfoMachException.cpp; sourceTree = ""; }; 2615DBC91208B5FC0021781D /* StopInfoMachException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StopInfoMachException.h; path = Utility/StopInfoMachException.h; sourceTree = ""; }; 261744771168585B005ADD65 /* SBType.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBType.cpp; path = source/API/SBType.cpp; sourceTree = ""; }; 2617447911685869005ADD65 /* SBType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBType.h; path = include/lldb/API/SBType.h; sourceTree = ""; }; 2618D78F1240115500F2B8FE /* SectionLoadList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SectionLoadList.h; path = include/lldb/Target/SectionLoadList.h; sourceTree = ""; }; 2618D7911240116900F2B8FE /* SectionLoadList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SectionLoadList.cpp; path = source/Target/SectionLoadList.cpp; sourceTree = ""; }; 2618D957124056C700F2B8FE /* NameToDIE.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NameToDIE.h; sourceTree = ""; }; 2618D9EA12406FE600F2B8FE /* NameToDIE.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NameToDIE.cpp; sourceTree = ""; }; 2618EE5B1315B29C001D6D71 /* GDBRemoteCommunication.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GDBRemoteCommunication.cpp; sourceTree = ""; }; 2618EE5C1315B29C001D6D71 /* GDBRemoteCommunication.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GDBRemoteCommunication.h; sourceTree = ""; }; 2618EE5D1315B29C001D6D71 /* GDBRemoteRegisterContext.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GDBRemoteRegisterContext.cpp; sourceTree = ""; }; 2618EE5E1315B29C001D6D71 /* GDBRemoteRegisterContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GDBRemoteRegisterContext.h; sourceTree = ""; }; 2618EE5F1315B29C001D6D71 /* ProcessGDBRemote.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ProcessGDBRemote.cpp; sourceTree = ""; }; 2618EE601315B29C001D6D71 /* ProcessGDBRemote.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProcessGDBRemote.h; sourceTree = ""; }; 2618EE611315B29C001D6D71 /* ProcessGDBRemoteLog.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ProcessGDBRemoteLog.cpp; sourceTree = ""; }; 2618EE621315B29C001D6D71 /* ProcessGDBRemoteLog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProcessGDBRemoteLog.h; sourceTree = ""; }; 2618EE631315B29C001D6D71 /* ThreadGDBRemote.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ThreadGDBRemote.cpp; sourceTree = ""; }; 2618EE641315B29C001D6D71 /* ThreadGDBRemote.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ThreadGDBRemote.h; sourceTree = ""; }; 261B5A5211C3F2AD00AABD0A /* SharingPtr.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SharingPtr.cpp; path = source/Utility/SharingPtr.cpp; sourceTree = ""; }; 261B5A5311C3F2AD00AABD0A /* SharingPtr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SharingPtr.h; path = include/lldb/Utility/SharingPtr.h; sourceTree = ""; }; 262173A018395D3800C52091 /* SectionLoadHistory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SectionLoadHistory.h; path = include/lldb/Target/SectionLoadHistory.h; sourceTree = ""; }; 262173A218395D4600C52091 /* SectionLoadHistory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SectionLoadHistory.cpp; path = source/Target/SectionLoadHistory.cpp; sourceTree = ""; }; 26217930133BC8640083B112 /* lldb-private-types.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "lldb-private-types.h"; path = "include/lldb/lldb-private-types.h"; sourceTree = ""; }; 26217932133BCB850083B112 /* lldb-private-enumerations.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "lldb-private-enumerations.h"; path = "include/lldb/lldb-private-enumerations.h"; sourceTree = ""; }; 2623096E13D0EFFB006381D9 /* StreamBuffer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = StreamBuffer.h; path = include/lldb/Core/StreamBuffer.h; sourceTree = ""; }; 2626B6AD143E1BEA00EF935C /* RangeMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RangeMap.h; path = include/lldb/Core/RangeMap.h; sourceTree = ""; }; 26274FA514030F79006BA130 /* DynamicLoaderDarwinKernel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DynamicLoaderDarwinKernel.cpp; sourceTree = ""; }; 26274FA614030F79006BA130 /* DynamicLoaderDarwinKernel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DynamicLoaderDarwinKernel.h; sourceTree = ""; }; 2628A4D313D4977900F5487A /* ThreadKDP.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ThreadKDP.cpp; sourceTree = ""; }; 2628A4D413D4977900F5487A /* ThreadKDP.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ThreadKDP.h; sourceTree = ""; }; 262D24E413FB8710002D1960 /* RegisterContextMemory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegisterContextMemory.cpp; path = Utility/RegisterContextMemory.cpp; sourceTree = ""; }; 262D24E513FB8710002D1960 /* RegisterContextMemory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterContextMemory.h; path = Utility/RegisterContextMemory.h; sourceTree = ""; }; 262ED0041631FA2800879631 /* OptionGroupString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OptionGroupString.h; path = include/lldb/Interpreter/OptionGroupString.h; sourceTree = ""; }; 262ED0071631FA3A00879631 /* OptionGroupString.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OptionGroupString.cpp; path = source/Interpreter/OptionGroupString.cpp; sourceTree = ""; }; 262F12B41835468600AEB384 /* SBPlatform.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBPlatform.cpp; path = source/API/SBPlatform.cpp; sourceTree = ""; }; 262F12B61835469C00AEB384 /* SBPlatform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBPlatform.h; path = include/lldb/API/SBPlatform.h; sourceTree = ""; }; 262F12B8183546C900AEB384 /* SBPlatform.i */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBPlatform.i; sourceTree = ""; }; 2635879017822E56004C30BA /* SymbolVendorELF.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SymbolVendorELF.cpp; sourceTree = ""; }; 2635879117822E56004C30BA /* SymbolVendorELF.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SymbolVendorELF.h; sourceTree = ""; }; 263641151B34AEE200145B2F /* ABISysV_mips64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ABISysV_mips64.cpp; sourceTree = ""; }; 263641161B34AEE200145B2F /* ABISysV_mips64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ABISysV_mips64.h; sourceTree = ""; }; 263664921140A4930075843B /* Debugger.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; name = Debugger.cpp; path = source/Core/Debugger.cpp; sourceTree = ""; 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 = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; 26368A3B126B697600E8659F /* darwin-debug.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = "darwin-debug.cpp"; path = "tools/darwin-debug/darwin-debug.cpp"; sourceTree = ""; }; 263C4937178B50C40070F12D /* SBModuleSpec.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBModuleSpec.cpp; path = source/API/SBModuleSpec.cpp; sourceTree = ""; }; 263C4939178B50CF0070F12D /* SBModuleSpec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBModuleSpec.h; path = include/lldb/API/SBModuleSpec.h; sourceTree = ""; }; 263C493B178B61CC0070F12D /* SBModuleSpec.i */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBModuleSpec.i; sourceTree = ""; }; 263E949D13661AE400E7D1CE /* UnwindAssembly-x86.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = "UnwindAssembly-x86.cpp"; sourceTree = ""; }; 263E949E13661AE400E7D1CE /* UnwindAssembly-x86.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UnwindAssembly-x86.h"; sourceTree = ""; }; 263FDE5D1A799F2D00E68013 /* FormatEntity.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FormatEntity.h; path = include/lldb/Core/FormatEntity.h; sourceTree = ""; }; 263FDE5F1A79A01500E68013 /* FormatEntity.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FormatEntity.cpp; path = source/Core/FormatEntity.cpp; sourceTree = ""; }; 263FEDA5112CC1DA00E4C208 /* ThreadSafeSTLMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ThreadSafeSTLMap.h; path = include/lldb/Core/ThreadSafeSTLMap.h; sourceTree = ""; }; 2640E19E15DC78FD00F23B50 /* Property.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Property.cpp; path = source/Interpreter/Property.cpp; sourceTree = ""; }; 26424E3C125986CB0016D82C /* ValueObjectConstResult.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ValueObjectConstResult.cpp; path = source/Core/ValueObjectConstResult.cpp; sourceTree = ""; }; 26424E3E125986D30016D82C /* ValueObjectConstResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ValueObjectConstResult.h; path = include/lldb/Core/ValueObjectConstResult.h; sourceTree = ""; }; 264297531D1DF209003F2BF4 /* SBMemoryRegionInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBMemoryRegionInfo.h; path = include/lldb/API/SBMemoryRegionInfo.h; sourceTree = ""; }; 264297541D1DF209003F2BF4 /* SBMemoryRegionInfoList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBMemoryRegionInfoList.h; path = include/lldb/API/SBMemoryRegionInfoList.h; sourceTree = ""; }; 264297591D1DF2AA003F2BF4 /* SBMemoryRegionInfo.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBMemoryRegionInfo.i; sourceTree = ""; }; 2642975A1D1DF2AA003F2BF4 /* SBMemoryRegionInfoList.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBMemoryRegionInfoList.i; sourceTree = ""; }; 2642FBA813D003B400ED6808 /* CommunicationKDP.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CommunicationKDP.cpp; sourceTree = ""; }; 2642FBA913D003B400ED6808 /* CommunicationKDP.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CommunicationKDP.h; sourceTree = ""; }; 2642FBAA13D003B400ED6808 /* ProcessKDP.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ProcessKDP.cpp; sourceTree = ""; }; 2642FBAB13D003B400ED6808 /* ProcessKDP.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProcessKDP.h; sourceTree = ""; }; 2642FBAC13D003B400ED6808 /* ProcessKDPLog.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ProcessKDPLog.cpp; sourceTree = ""; }; 2642FBAD13D003B400ED6808 /* ProcessKDPLog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProcessKDPLog.h; sourceTree = ""; }; 264334381110F63100CDB6C6 /* ValueObjectRegister.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ValueObjectRegister.cpp; path = source/Core/ValueObjectRegister.cpp; sourceTree = ""; }; 2643343A1110F63C00CDB6C6 /* ValueObjectRegister.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ValueObjectRegister.h; path = include/lldb/Core/ValueObjectRegister.h; sourceTree = ""; }; 264723A511FA076E00DE380C /* CleanUp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CleanUp.h; path = include/lldb/Utility/CleanUp.h; sourceTree = ""; }; 26474C9E18D0CAEC0073DEBA /* RegisterContext_mips64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterContext_mips64.h; path = Utility/RegisterContext_mips64.h; sourceTree = ""; }; 26474C9F18D0CAEC0073DEBA /* RegisterContext_x86.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterContext_x86.h; path = Utility/RegisterContext_x86.h; sourceTree = ""; }; 26474CA218D0CB070073DEBA /* RegisterContextFreeBSD_i386.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegisterContextFreeBSD_i386.cpp; path = Utility/RegisterContextFreeBSD_i386.cpp; sourceTree = ""; }; 26474CA318D0CB070073DEBA /* RegisterContextFreeBSD_i386.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterContextFreeBSD_i386.h; path = Utility/RegisterContextFreeBSD_i386.h; sourceTree = ""; }; 26474CA418D0CB070073DEBA /* RegisterContextFreeBSD_mips64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegisterContextFreeBSD_mips64.cpp; path = Utility/RegisterContextFreeBSD_mips64.cpp; sourceTree = ""; }; 26474CA518D0CB070073DEBA /* RegisterContextFreeBSD_mips64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterContextFreeBSD_mips64.h; path = Utility/RegisterContextFreeBSD_mips64.h; sourceTree = ""; }; 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 = ""; }; 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 = ""; }; 26474CAE18D0CB180073DEBA /* RegisterContextLinux_i386.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegisterContextLinux_i386.cpp; path = Utility/RegisterContextLinux_i386.cpp; sourceTree = ""; }; 26474CAF18D0CB180073DEBA /* RegisterContextLinux_i386.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterContextLinux_i386.h; path = Utility/RegisterContextLinux_i386.h; sourceTree = ""; }; 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 = ""; }; 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 = ""; }; 26474CB618D0CB2D0073DEBA /* RegisterContextMach_arm.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegisterContextMach_arm.cpp; path = Utility/RegisterContextMach_arm.cpp; sourceTree = ""; }; 26474CB718D0CB2D0073DEBA /* RegisterContextMach_arm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterContextMach_arm.h; path = Utility/RegisterContextMach_arm.h; sourceTree = ""; }; 26474CB818D0CB2D0073DEBA /* RegisterContextMach_i386.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegisterContextMach_i386.cpp; path = Utility/RegisterContextMach_i386.cpp; sourceTree = ""; }; 26474CB918D0CB2D0073DEBA /* RegisterContextMach_i386.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterContextMach_i386.h; path = Utility/RegisterContextMach_i386.h; sourceTree = ""; }; 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 = ""; }; 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 = ""; }; 26474CC218D0CB5B0073DEBA /* RegisterContextMemory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegisterContextMemory.cpp; path = Utility/RegisterContextMemory.cpp; sourceTree = ""; }; 26474CC318D0CB5B0073DEBA /* RegisterContextMemory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterContextMemory.h; path = Utility/RegisterContextMemory.h; sourceTree = ""; }; 26474CC418D0CB5B0073DEBA /* RegisterContextPOSIX_mips64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegisterContextPOSIX_mips64.cpp; path = Utility/RegisterContextPOSIX_mips64.cpp; sourceTree = ""; }; 26474CC518D0CB5B0073DEBA /* RegisterContextPOSIX_mips64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterContextPOSIX_mips64.h; path = Utility/RegisterContextPOSIX_mips64.h; sourceTree = ""; }; 26474CC618D0CB5B0073DEBA /* RegisterContextPOSIX_x86.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegisterContextPOSIX_x86.cpp; path = Utility/RegisterContextPOSIX_x86.cpp; sourceTree = ""; }; 26474CC718D0CB5B0073DEBA /* RegisterContextPOSIX_x86.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterContextPOSIX_x86.h; path = Utility/RegisterContextPOSIX_x86.h; sourceTree = ""; }; 26474CC818D0CB5B0073DEBA /* RegisterContextPOSIX.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterContextPOSIX.h; path = Utility/RegisterContextPOSIX.h; sourceTree = ""; }; 26474CD018D0CB700073DEBA /* RegisterInfos_i386.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterInfos_i386.h; path = Utility/RegisterInfos_i386.h; sourceTree = ""; }; 26474CD118D0CB710073DEBA /* RegisterInfos_mips64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterInfos_mips64.h; path = Utility/RegisterInfos_mips64.h; sourceTree = ""; }; 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 = ""; }; 26491E3A15E1DB8600CBFFC2 /* OptionValueRegex.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OptionValueRegex.h; path = include/lldb/Interpreter/OptionValueRegex.h; sourceTree = ""; }; 26491E3D15E1DB9F00CBFFC2 /* OptionValueRegex.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OptionValueRegex.cpp; path = source/Interpreter/OptionValueRegex.cpp; sourceTree = ""; }; 264A12FA1372522000875C42 /* EmulateInstructionARM64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EmulateInstructionARM64.cpp; sourceTree = ""; }; 264A12FB1372522000875C42 /* EmulateInstructionARM64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EmulateInstructionARM64.h; sourceTree = ""; }; 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 = ""; }; 264A43BB1320B3B4005B4096 /* Platform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Platform.h; path = include/lldb/Target/Platform.h; sourceTree = ""; }; 264A43BD1320BCEB005B4096 /* Platform.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Platform.cpp; path = source/Target/Platform.cpp; sourceTree = ""; }; 264A58EB1A7DBC8C00A6B1B0 /* OptionValueFormatEntity.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OptionValueFormatEntity.h; path = include/lldb/Interpreter/OptionValueFormatEntity.h; sourceTree = ""; }; 264A58ED1A7DBCAD00A6B1B0 /* OptionValueFormatEntity.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OptionValueFormatEntity.cpp; path = source/Interpreter/OptionValueFormatEntity.cpp; sourceTree = ""; }; 264A97BD133918BC0017F0BE /* PlatformRemoteGDBServer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PlatformRemoteGDBServer.cpp; path = "gdb-server/PlatformRemoteGDBServer.cpp"; sourceTree = ""; }; 264A97BE133918BC0017F0BE /* PlatformRemoteGDBServer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PlatformRemoteGDBServer.h; path = "gdb-server/PlatformRemoteGDBServer.h"; sourceTree = ""; }; 264AD83711095BA600E0B039 /* CommandObjectLog.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandObjectLog.cpp; path = source/Commands/CommandObjectLog.cpp; sourceTree = ""; }; 264AD83911095BBD00E0B039 /* CommandObjectLog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CommandObjectLog.h; path = source/Commands/CommandObjectLog.h; sourceTree = ""; }; 264D8D4E13661BCC003A368F /* UnwindAssembly.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = UnwindAssembly.h; path = include/lldb/Target/UnwindAssembly.h; sourceTree = ""; }; 264D8D4F13661BD7003A368F /* UnwindAssembly.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UnwindAssembly.cpp; path = source/Target/UnwindAssembly.cpp; sourceTree = ""; }; 265192C41BA8E8F8002F08F6 /* CompilerDecl.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CompilerDecl.h; path = include/lldb/Symbol/CompilerDecl.h; sourceTree = ""; }; 265192C51BA8E905002F08F6 /* CompilerDecl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CompilerDecl.cpp; path = source/Symbol/CompilerDecl.cpp; sourceTree = ""; }; 265205A213D3E3F700132FE2 /* RegisterContextKDP_arm.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RegisterContextKDP_arm.cpp; sourceTree = ""; }; 265205A313D3E3F700132FE2 /* RegisterContextKDP_arm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegisterContextKDP_arm.h; sourceTree = ""; }; 265205A413D3E3F700132FE2 /* RegisterContextKDP_i386.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RegisterContextKDP_i386.cpp; sourceTree = ""; }; 265205A513D3E3F700132FE2 /* RegisterContextKDP_i386.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegisterContextKDP_i386.h; sourceTree = ""; }; 265205A613D3E3F700132FE2 /* RegisterContextKDP_x86_64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RegisterContextKDP_x86_64.cpp; sourceTree = ""; }; 265205A713D3E3F700132FE2 /* RegisterContextKDP_x86_64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegisterContextKDP_x86_64.h; sourceTree = ""; }; 2654A67F1E54D59400DA1013 /* ModuleCache.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ModuleCache.cpp; path = source/Target/ModuleCache.cpp; sourceTree = ""; }; 2654A6811E54D5A200DA1013 /* ModuleCache.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ModuleCache.h; path = include/lldb/Target/ModuleCache.h; sourceTree = ""; }; 2654A6821E54D5E200DA1013 /* RegisterNumber.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegisterNumber.cpp; path = source/Target/RegisterNumber.cpp; sourceTree = ""; }; 2654A6841E54D5EE00DA1013 /* RegisterNumber.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = RegisterNumber.h; path = include/lldb/Target/RegisterNumber.h; sourceTree = ""; }; 2654A68C1E552D1500DA1013 /* PseudoTerminal.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PseudoTerminal.cpp; path = source/Host/common/PseudoTerminal.cpp; sourceTree = ""; }; 2654A68E1E552D2400DA1013 /* PseudoTerminal.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = PseudoTerminal.h; path = include/lldb/Host/PseudoTerminal.h; sourceTree = ""; }; 2654A68F1E552ED500DA1013 /* VASprintf.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = VASprintf.cpp; path = source/Utility/VASprintf.cpp; sourceTree = ""; }; 2654A6911E552F3C00DA1013 /* UriParser.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = UriParser.h; path = include/lldb/Utility/UriParser.h; sourceTree = ""; }; 2654A6921E552F4600DA1013 /* VASPrintf.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = VASPrintf.h; path = include/lldb/Utility/VASPrintf.h; sourceTree = ""; }; 26579F68126A25920007C5CB /* darwin-debug */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "darwin-debug"; sourceTree = BUILT_PRODUCTS_DIR; }; 2657AFB51B8690EC00958979 /* CompilerDeclContext.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CompilerDeclContext.h; path = include/lldb/Symbol/CompilerDeclContext.h; sourceTree = ""; }; 2657AFB61B86910100958979 /* CompilerDeclContext.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CompilerDeclContext.cpp; path = source/Symbol/CompilerDeclContext.cpp; sourceTree = ""; }; 265ABF6210F42EE900531910 /* DebugSymbols.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = DebugSymbols.framework; path = /System/Library/PrivateFrameworks/DebugSymbols.framework; sourceTree = ""; }; 265E9BE1115C2BAA00D0DCCB /* debugserver.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = debugserver.xcodeproj; path = tools/debugserver/debugserver.xcodeproj; sourceTree = ""; }; 2660D9F611922A1300958FBD /* StringExtractor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StringExtractor.cpp; path = source/Utility/StringExtractor.cpp; sourceTree = ""; }; 2660D9FE11922A7F00958FBD /* ThreadPlanStepUntil.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ThreadPlanStepUntil.cpp; path = source/Target/ThreadPlanStepUntil.cpp; sourceTree = ""; }; 26651A14133BEC76005B64B7 /* lldb-public.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "lldb-public.h"; path = "include/lldb/lldb-public.h"; sourceTree = ""; }; 26651A15133BF9CC005B64B7 /* Opcode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Opcode.h; path = include/lldb/Core/Opcode.h; sourceTree = ""; }; 26651A17133BF9DF005B64B7 /* Opcode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Opcode.cpp; path = source/Core/Opcode.cpp; sourceTree = ""; }; 2665CD0D15080846002C8FAE /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = ""; }; 2666ADC11B3CB675001FAFD3 /* DynamicLoaderHexagonDYLD.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DynamicLoaderHexagonDYLD.cpp; sourceTree = ""; }; 2666ADC21B3CB675001FAFD3 /* DynamicLoaderHexagonDYLD.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DynamicLoaderHexagonDYLD.h; sourceTree = ""; }; 2666ADC31B3CB675001FAFD3 /* HexagonDYLDRendezvous.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HexagonDYLDRendezvous.cpp; sourceTree = ""; }; 2666ADC41B3CB675001FAFD3 /* HexagonDYLDRendezvous.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HexagonDYLDRendezvous.h; sourceTree = ""; }; 26680207115FD0ED008E1FE4 /* LLDB.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = LLDB.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 2669415B1A6DC2AB0063BE93 /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = CMakeLists.txt; path = "tools/lldb-mi/CMakeLists.txt"; sourceTree = SOURCE_ROOT; }; 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; }; 2669415F1A6DC2AB0063BE93 /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; name = Makefile; path = "tools/lldb-mi/Makefile"; sourceTree = SOURCE_ROOT; }; 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; }; 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; }; 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; }; 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; }; 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; }; 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; }; 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; }; 266941FD1A6DC2AC0063BE93 /* Platform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Platform.h; path = "tools/lldb-mi/Platform.h"; sourceTree = SOURCE_ROOT; }; 266960591199F4230075C61A /* build-llvm.pl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.perl; path = "build-llvm.pl"; sourceTree = ""; }; 2669605A1199F4230075C61A /* build-swig-wrapper-classes.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = "build-swig-wrapper-classes.sh"; sourceTree = ""; }; 2669605B1199F4230075C61A /* checkpoint-llvm.pl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.perl; path = "checkpoint-llvm.pl"; sourceTree = ""; }; 2669605C1199F4230075C61A /* finish-swig-wrapper-classes.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = "finish-swig-wrapper-classes.sh"; sourceTree = ""; }; 2669605D1199F4230075C61A /* install-lldb.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = "install-lldb.sh"; sourceTree = ""; }; 2669605E1199F4230075C61A /* lldb.swig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = lldb.swig; sourceTree = ""; }; 266960601199F4230075C61A /* build-swig-Python.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = "build-swig-Python.sh"; sourceTree = ""; }; 266960611199F4230075C61A /* edit-swig-python-wrapper-file.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = "edit-swig-python-wrapper-file.py"; sourceTree = ""; }; 266960631199F4230075C61A /* sed-sources */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.perl; path = "sed-sources"; sourceTree = ""; }; 266DFE9613FD656E00D0C574 /* OperatingSystem.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OperatingSystem.cpp; path = source/Target/OperatingSystem.cpp; sourceTree = ""; }; 266DFE9813FD658300D0C574 /* OperatingSystem.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = OperatingSystem.h; path = include/lldb/Target/OperatingSystem.h; sourceTree = ""; }; 266E82951B8CE346008FCA06 /* DWARFDIE.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DWARFDIE.h; sourceTree = ""; }; 266E82961B8CE3AC008FCA06 /* DWARFDIE.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DWARFDIE.cpp; sourceTree = ""; }; 266E829C1B8E542C008FCA06 /* DWARFAttribute.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DWARFAttribute.cpp; sourceTree = ""; }; 266F5CBB12FC846200DFCE33 /* Config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Config.h; path = include/lldb/Host/Config.h; sourceTree = ""; }; 26709E311964A34000B94724 /* LaunchServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = LaunchServices.framework; path = /System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework; sourceTree = ""; }; 2670F8111862B44A006B332C /* libncurses.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libncurses.dylib; path = /usr/lib/libncurses.dylib; sourceTree = ""; }; 2672D8461189055500FF4019 /* CommandObjectFrame.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandObjectFrame.cpp; path = source/Commands/CommandObjectFrame.cpp; sourceTree = ""; }; 2672D8471189055500FF4019 /* CommandObjectFrame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CommandObjectFrame.h; path = source/Commands/CommandObjectFrame.h; sourceTree = ""; }; 26744EED1338317700EF765A /* GDBRemoteCommunicationClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GDBRemoteCommunicationClient.cpp; sourceTree = ""; }; 26744EEE1338317700EF765A /* GDBRemoteCommunicationClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GDBRemoteCommunicationClient.h; sourceTree = ""; }; 26744EEF1338317700EF765A /* GDBRemoteCommunicationServer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GDBRemoteCommunicationServer.cpp; sourceTree = ""; }; 26744EF01338317700EF765A /* GDBRemoteCommunicationServer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GDBRemoteCommunicationServer.h; sourceTree = ""; }; 2675F6FE1332BE690067997B /* PlatformRemoteiOS.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PlatformRemoteiOS.cpp; sourceTree = ""; }; 2675F6FF1332BE690067997B /* PlatformRemoteiOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformRemoteiOS.h; sourceTree = ""; }; 26764C951E48F46F008D3573 /* ConstString.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ConstString.h; path = include/lldb/Utility/ConstString.h; sourceTree = ""; }; 26764C961E48F482008D3573 /* ConstString.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ConstString.cpp; path = source/Utility/ConstString.cpp; sourceTree = ""; }; 26764C981E48F4D2008D3573 /* Error.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Error.cpp; path = source/Utility/Error.cpp; sourceTree = ""; }; 26764C9A1E48F4DD008D3573 /* Error.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = Error.h; path = include/lldb/Utility/Error.h; sourceTree = ""; }; 26764C9B1E48F50C008D3573 /* Stream.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = Stream.h; path = include/lldb/Utility/Stream.h; sourceTree = ""; }; 26764C9C1E48F516008D3573 /* RegularExpression.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = RegularExpression.h; path = include/lldb/Utility/RegularExpression.h; sourceTree = ""; }; 26764C9D1E48F51E008D3573 /* Stream.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Stream.cpp; path = source/Utility/Stream.cpp; sourceTree = ""; }; 26764C9F1E48F528008D3573 /* RegularExpression.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegularExpression.cpp; path = source/Utility/RegularExpression.cpp; sourceTree = ""; }; 26764CA11E48F547008D3573 /* StreamString.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StreamString.cpp; path = source/Utility/StreamString.cpp; sourceTree = ""; }; 26764CA31E48F550008D3573 /* StreamString.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = StreamString.h; path = include/lldb/Utility/StreamString.h; sourceTree = ""; }; 26764CA41E48F566008D3573 /* StreamTee.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = StreamTee.h; path = include/lldb/Utility/StreamTee.h; sourceTree = ""; }; 2676A093119C93C8008A98EF /* StringExtractorGDBRemote.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StringExtractorGDBRemote.cpp; path = source/Utility/StringExtractorGDBRemote.cpp; sourceTree = ""; }; 2676A094119C93C8008A98EF /* StringExtractorGDBRemote.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StringExtractorGDBRemote.h; path = source/Utility/StringExtractorGDBRemote.h; sourceTree = ""; }; 267A47F21B14115A0021A5BC /* SoftwareBreakpoint.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SoftwareBreakpoint.h; path = include/lldb/Host/common/SoftwareBreakpoint.h; sourceTree = ""; }; 267A47F31B14116E0021A5BC /* NativeBreakpoint.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = NativeBreakpoint.h; path = include/lldb/Host/common/NativeBreakpoint.h; sourceTree = ""; }; 267A47F41B1411750021A5BC /* NativeBreakpointList.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = NativeBreakpointList.h; path = include/lldb/Host/common/NativeBreakpointList.h; sourceTree = ""; }; 267A47F51B14117F0021A5BC /* NativeProcessProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = NativeProcessProtocol.h; path = include/lldb/Host/common/NativeProcessProtocol.h; sourceTree = ""; }; 267A47F61B14118F0021A5BC /* NativeRegisterContext.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = NativeRegisterContext.h; path = include/lldb/Host/common/NativeRegisterContext.h; sourceTree = ""; }; 267A47F71B14119A0021A5BC /* NativeRegisterContextRegisterInfo.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = NativeRegisterContextRegisterInfo.h; path = include/lldb/Host/common/NativeRegisterContextRegisterInfo.h; sourceTree = ""; }; 267A47F81B1411A40021A5BC /* NativeThreadProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = NativeThreadProtocol.h; path = include/lldb/Host/common/NativeThreadProtocol.h; sourceTree = ""; }; 267A47F91B1411AC0021A5BC /* NativeWatchpointList.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = NativeWatchpointList.h; path = include/lldb/Host/common/NativeWatchpointList.h; sourceTree = ""; }; 267A47FA1B1411C40021A5BC /* NativeRegisterContext.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = NativeRegisterContext.cpp; path = source/Host/common/NativeRegisterContext.cpp; sourceTree = ""; }; 267A47FC1B1411CC0021A5BC /* NativeRegisterContextRegisterInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = NativeRegisterContextRegisterInfo.cpp; path = source/Host/common/NativeRegisterContextRegisterInfo.cpp; sourceTree = ""; }; 267A47FE1B1411D90021A5BC /* NativeWatchpointList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = NativeWatchpointList.cpp; path = source/Host/common/NativeWatchpointList.cpp; sourceTree = ""; }; 267A48001B1411E40021A5BC /* XML.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = XML.cpp; path = source/Host/common/XML.cpp; sourceTree = ""; }; 267A48031B1416080021A5BC /* XML.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = XML.h; path = include/lldb/Host/XML.h; sourceTree = ""; }; 267C0128136880C7006E963E /* OptionGroupValueObjectDisplay.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = OptionGroupValueObjectDisplay.h; path = include/lldb/Interpreter/OptionGroupValueObjectDisplay.h; sourceTree = ""; }; 267C012A136880DF006E963E /* OptionGroupValueObjectDisplay.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OptionGroupValueObjectDisplay.cpp; path = source/Interpreter/OptionGroupValueObjectDisplay.cpp; sourceTree = ""; }; 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; }; 267F68471CC02DED0086832B /* ABISysV_s390x.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ABISysV_s390x.cpp; sourceTree = ""; }; 267F68481CC02DED0086832B /* ABISysV_s390x.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ABISysV_s390x.h; sourceTree = ""; }; 267F684D1CC02E270086832B /* RegisterContextPOSIXCore_s390x.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RegisterContextPOSIXCore_s390x.cpp; sourceTree = ""; }; 267F684E1CC02E270086832B /* RegisterContextPOSIXCore_s390x.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegisterContextPOSIXCore_s390x.h; sourceTree = ""; }; 267F68511CC02E920086832B /* RegisterContextLinux_s390x.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegisterContextLinux_s390x.cpp; path = Utility/RegisterContextLinux_s390x.cpp; sourceTree = ""; }; 267F68521CC02E920086832B /* RegisterContextLinux_s390x.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterContextLinux_s390x.h; path = Utility/RegisterContextLinux_s390x.h; sourceTree = ""; }; 267F68551CC02EAE0086832B /* RegisterContextPOSIX_s390x.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegisterContextPOSIX_s390x.cpp; path = Utility/RegisterContextPOSIX_s390x.cpp; sourceTree = ""; }; 267F68561CC02EAE0086832B /* RegisterContextPOSIX_s390x.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterContextPOSIX_s390x.h; path = Utility/RegisterContextPOSIX_s390x.h; sourceTree = ""; }; 267F68591CC02EBE0086832B /* RegisterInfos_s390x.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterInfos_s390x.h; path = Utility/RegisterInfos_s390x.h; sourceTree = ""; }; 2682100C143A59AE004BCF2D /* MappedHash.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MappedHash.h; path = include/lldb/Core/MappedHash.h; sourceTree = ""; }; 2682F284115EF3A700CCFF99 /* SBError.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBError.cpp; path = source/API/SBError.cpp; sourceTree = ""; }; 2682F286115EF3BD00CCFF99 /* SBError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBError.h; path = include/lldb/API/SBError.h; sourceTree = ""; }; 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 = ""; }; 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 = ""; }; 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 = ""; }; 2686536B1370ACB200D186A3 /* OptionGroupBoolean.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OptionGroupBoolean.cpp; path = source/Interpreter/OptionGroupBoolean.cpp; sourceTree = ""; }; 2686536D1370ACC600D186A3 /* OptionGroupBoolean.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = OptionGroupBoolean.h; path = include/lldb/Interpreter/OptionGroupBoolean.h; sourceTree = ""; }; 2686536E1370AE5A00D186A3 /* OptionGroupUInt64.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = OptionGroupUInt64.h; path = include/lldb/Interpreter/OptionGroupUInt64.h; sourceTree = ""; }; 2686536F1370AE7200D186A3 /* OptionGroupUInt64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OptionGroupUInt64.cpp; path = source/Interpreter/OptionGroupUInt64.cpp; sourceTree = ""; }; 26879CE51333F5750012C1F8 /* CommandObjectPlatform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CommandObjectPlatform.h; path = source/Commands/CommandObjectPlatform.h; sourceTree = ""; }; 26879CE71333F58B0012C1F8 /* CommandObjectPlatform.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandObjectPlatform.cpp; path = source/Commands/CommandObjectPlatform.cpp; sourceTree = ""; }; 2689B0A4113EE3CD00A4AEDB /* Symbols.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Symbols.h; path = include/lldb/Host/Symbols.h; sourceTree = ""; }; 2689B0B5113EE47E00A4AEDB /* Symbols.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Symbols.cpp; path = source/Host/macosx/Symbols.cpp; sourceTree = ""; }; 2689FFCA13353D7A00698AC0 /* liblldb-core.a */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = "liblldb-core.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 268A683D1321B53B000E3FB8 /* DynamicLoaderStatic.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DynamicLoaderStatic.cpp; sourceTree = ""; }; 268A683E1321B53B000E3FB8 /* DynamicLoaderStatic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DynamicLoaderStatic.h; sourceTree = ""; }; 268A813F115B19D000F645B0 /* UniqueCStringMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UniqueCStringMap.h; path = include/lldb/Core/UniqueCStringMap.h; sourceTree = ""; }; 268DA871130095D000C9483A /* Terminal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Terminal.h; path = include/lldb/Host/Terminal.h; sourceTree = ""; }; 268DA873130095ED00C9483A /* Terminal.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Terminal.cpp; sourceTree = ""; }; 268F9D52123AA15200B91E9B /* SBSymbolContextList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBSymbolContextList.h; path = include/lldb/API/SBSymbolContextList.h; sourceTree = ""; }; 268F9D54123AA16600B91E9B /* SBSymbolContextList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBSymbolContextList.cpp; path = source/API/SBSymbolContextList.cpp; sourceTree = ""; }; 2690B36F1381D5B600ECFBAE /* Memory.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = Memory.h; path = include/lldb/Target/Memory.h; sourceTree = ""; }; 2690B3701381D5C300ECFBAE /* Memory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Memory.cpp; path = source/Target/Memory.cpp; sourceTree = ""; }; 2690CD171A6DC0D000E717C8 /* lldb-mi */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "lldb-mi"; sourceTree = BUILT_PRODUCTS_DIR; }; 2692BA13136610C100F9E14D /* UnwindAssemblyInstEmulation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UnwindAssemblyInstEmulation.cpp; sourceTree = ""; }; 2692BA14136610C100F9E14D /* UnwindAssemblyInstEmulation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UnwindAssemblyInstEmulation.h; sourceTree = ""; }; 269416AD119A024800FF2715 /* CommandObjectTarget.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandObjectTarget.cpp; path = source/Commands/CommandObjectTarget.cpp; sourceTree = ""; }; 269416AE119A024800FF2715 /* CommandObjectTarget.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CommandObjectTarget.h; path = source/Commands/CommandObjectTarget.h; sourceTree = ""; }; 2694E99A14FC0BB30076DE67 /* PlatformFreeBSD.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PlatformFreeBSD.cpp; sourceTree = ""; }; 2694E99B14FC0BB30076DE67 /* PlatformFreeBSD.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformFreeBSD.h; sourceTree = ""; }; 2694E9A114FC0BBD0076DE67 /* PlatformLinux.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PlatformLinux.cpp; sourceTree = ""; }; 2694E9A214FC0BBD0076DE67 /* PlatformLinux.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformLinux.h; sourceTree = ""; }; 26954EBC1401EE8B00294D09 /* DynamicRegisterInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DynamicRegisterInfo.cpp; path = Utility/DynamicRegisterInfo.cpp; sourceTree = ""; }; 26954EBD1401EE8B00294D09 /* DynamicRegisterInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DynamicRegisterInfo.h; path = Utility/DynamicRegisterInfo.h; sourceTree = ""; }; 26957D9213D381C900670048 /* RegisterContextDarwin_arm.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegisterContextDarwin_arm.cpp; path = Utility/RegisterContextDarwin_arm.cpp; sourceTree = ""; }; 26957D9313D381C900670048 /* RegisterContextDarwin_arm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterContextDarwin_arm.h; path = Utility/RegisterContextDarwin_arm.h; sourceTree = ""; }; 26957D9413D381C900670048 /* RegisterContextDarwin_i386.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegisterContextDarwin_i386.cpp; path = Utility/RegisterContextDarwin_i386.cpp; sourceTree = ""; }; 26957D9513D381C900670048 /* RegisterContextDarwin_i386.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterContextDarwin_i386.h; path = Utility/RegisterContextDarwin_i386.h; sourceTree = ""; }; 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 = ""; }; 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 = ""; }; 2697A39215E404B1003E682C /* OptionValueArch.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OptionValueArch.cpp; path = source/Interpreter/OptionValueArch.cpp; sourceTree = ""; }; 2697A39415E404BA003E682C /* OptionValueArch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OptionValueArch.h; path = include/lldb/Interpreter/OptionValueArch.h; sourceTree = ""; }; 2697A54B133A6305004E4240 /* PlatformDarwin.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PlatformDarwin.cpp; sourceTree = ""; }; 2697A54C133A6305004E4240 /* PlatformDarwin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformDarwin.h; sourceTree = ""; }; 2698699815E6CBD0002415FF /* OperatingSystemPython.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = OperatingSystemPython.cpp; sourceTree = ""; }; 2698699915E6CBD0002415FF /* OperatingSystemPython.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OperatingSystemPython.h; sourceTree = ""; }; 269DDD451B8FD01A00D0DBD8 /* DWARFASTParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DWARFASTParser.h; sourceTree = ""; }; 269DDD481B8FD1C300D0DBD8 /* DWARFASTParserClang.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DWARFASTParserClang.cpp; sourceTree = ""; }; 269DDD491B8FD1C300D0DBD8 /* DWARFASTParserClang.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DWARFASTParserClang.h; sourceTree = ""; }; 269FF07D12494F7D00225026 /* FuncUnwinders.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FuncUnwinders.h; path = include/lldb/Symbol/FuncUnwinders.h; sourceTree = ""; }; 269FF07F12494F8E00225026 /* UnwindPlan.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UnwindPlan.h; path = include/lldb/Symbol/UnwindPlan.h; sourceTree = ""; }; 269FF08112494FC200225026 /* UnwindTable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UnwindTable.h; path = include/lldb/Symbol/UnwindTable.h; sourceTree = ""; }; 26A0DA4D140F721D006DA411 /* HashedNameToDIE.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HashedNameToDIE.h; sourceTree = ""; }; 26A3757F1D59462700D6CBDB /* SelectHelper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SelectHelper.cpp; path = source/Utility/SelectHelper.cpp; sourceTree = ""; }; 26A375831D59486000D6CBDB /* StringExtractor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = StringExtractor.h; path = include/lldb/Utility/StringExtractor.h; sourceTree = ""; }; 26A375841D59487700D6CBDB /* SelectHelper.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SelectHelper.h; path = include/lldb/Utility/SelectHelper.h; sourceTree = ""; }; 26A3B4AC1181454800381BC2 /* ObjectContainerBSDArchive.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ObjectContainerBSDArchive.cpp; sourceTree = ""; }; 26A3B4AD1181454800381BC2 /* ObjectContainerBSDArchive.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ObjectContainerBSDArchive.h; sourceTree = ""; }; 26A4EEB511682AAC007A372A /* LLDBWrapPython.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = LLDBWrapPython.cpp; sourceTree = BUILT_PRODUCTS_DIR; xcLanguageSpecificationIdentifier = xcode.lang.cpp; }; 26A527BD14E24F5F00F3A14A /* ProcessMachCore.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ProcessMachCore.cpp; sourceTree = ""; }; 26A527BE14E24F5F00F3A14A /* ProcessMachCore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProcessMachCore.h; sourceTree = ""; }; 26A527BF14E24F5F00F3A14A /* ThreadMachCore.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ThreadMachCore.cpp; sourceTree = ""; }; 26A527C014E24F5F00F3A14A /* ThreadMachCore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ThreadMachCore.h; sourceTree = ""; }; 26A7A034135E6E4200FB369E /* OptionValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OptionValue.cpp; path = source/Interpreter/OptionValue.cpp; sourceTree = ""; }; 26A7A036135E6E5300FB369E /* OptionValue.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = OptionValue.h; path = include/lldb/Interpreter/OptionValue.h; sourceTree = ""; }; 26AB54111832DC3400EADFF3 /* RegisterCheckpoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterCheckpoint.h; path = include/lldb/Target/RegisterCheckpoint.h; sourceTree = ""; }; 26AB92101819D74600E63F3E /* DWARFDataExtractor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DWARFDataExtractor.cpp; sourceTree = ""; }; 26AB92111819D74600E63F3E /* DWARFDataExtractor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DWARFDataExtractor.h; sourceTree = ""; }; 26ACEC2715E077AE00E94760 /* Property.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Property.h; path = include/lldb/Interpreter/Property.h; sourceTree = ""; }; 26B167A41123BF5500DC7B4F /* ThreadSafeValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ThreadSafeValue.h; path = include/lldb/Core/ThreadSafeValue.h; sourceTree = ""; }; 26B1EFAC154638AF00E2DAC7 /* DWARFDeclContext.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DWARFDeclContext.cpp; sourceTree = ""; }; 26B1EFAD154638AF00E2DAC7 /* DWARFDeclContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DWARFDeclContext.h; sourceTree = ""; }; 26B42C4C1187ABA50079C8C8 /* LLDB.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LLDB.h; path = include/lldb/API/LLDB.h; sourceTree = ""; }; 26B7564C14F89356008D9CB3 /* PlatformiOSSimulator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PlatformiOSSimulator.cpp; sourceTree = ""; }; 26B7564D14F89356008D9CB3 /* PlatformiOSSimulator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformiOSSimulator.h; sourceTree = ""; }; 26B75B421AD6E29A001F7A57 /* MipsLinuxSignals.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MipsLinuxSignals.cpp; path = Utility/MipsLinuxSignals.cpp; sourceTree = ""; }; 26B75B431AD6E29A001F7A57 /* MipsLinuxSignals.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MipsLinuxSignals.h; path = Utility/MipsLinuxSignals.h; sourceTree = ""; }; 26B8283C142D01E9002DBC64 /* SBSection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBSection.h; path = include/lldb/API/SBSection.h; sourceTree = ""; }; 26B8283F142D020F002DBC64 /* SBSection.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBSection.cpp; path = source/API/SBSection.cpp; sourceTree = ""; }; 26B8B42212EEC52A00A831B2 /* UniqueDWARFASTType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UniqueDWARFASTType.h; sourceTree = ""; }; 26B8B42312EEC52A00A831B2 /* UniqueDWARFASTType.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UniqueDWARFASTType.cpp; sourceTree = ""; }; 26BC179718C7F2B300D2196D /* JITLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JITLoader.cpp; path = source/Target/JITLoader.cpp; sourceTree = ""; }; 26BC179818C7F2B300D2196D /* JITLoaderList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JITLoaderList.cpp; path = source/Target/JITLoaderList.cpp; sourceTree = ""; }; 26BC179B18C7F2CB00D2196D /* JITLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JITLoader.h; path = include/lldb/Target/JITLoader.h; sourceTree = ""; }; 26BC179C18C7F2CB00D2196D /* JITLoaderList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JITLoaderList.h; path = include/lldb/Target/JITLoaderList.h; sourceTree = ""; }; 26BC17A218C7F4CB00D2196D /* ProcessElfCore.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ProcessElfCore.cpp; sourceTree = ""; }; 26BC17A318C7F4CB00D2196D /* ProcessElfCore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProcessElfCore.h; sourceTree = ""; }; 26BC17A418C7F4CB00D2196D /* RegisterContextPOSIXCore_mips64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RegisterContextPOSIXCore_mips64.cpp; sourceTree = ""; }; 26BC17A518C7F4CB00D2196D /* RegisterContextPOSIXCore_mips64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegisterContextPOSIXCore_mips64.h; sourceTree = ""; }; 26BC17A618C7F4CB00D2196D /* RegisterContextPOSIXCore_x86_64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RegisterContextPOSIXCore_x86_64.cpp; sourceTree = ""; }; 26BC17A718C7F4CB00D2196D /* RegisterContextPOSIXCore_x86_64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegisterContextPOSIXCore_x86_64.h; sourceTree = ""; }; 26BC17A818C7F4CB00D2196D /* ThreadElfCore.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ThreadElfCore.cpp; sourceTree = ""; }; 26BC17A918C7F4CB00D2196D /* ThreadElfCore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ThreadElfCore.h; sourceTree = ""; }; 26BC17BA18C7F4FA00D2196D /* ProcessMessage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ProcessMessage.cpp; sourceTree = ""; }; 26BC17BB18C7F4FA00D2196D /* ProcessMessage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProcessMessage.h; sourceTree = ""; }; 26BC17BE18C7F4FA00D2196D /* ProcessPOSIXLog.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ProcessPOSIXLog.cpp; sourceTree = ""; }; 26BC17BF18C7F4FA00D2196D /* ProcessPOSIXLog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProcessPOSIXLog.h; sourceTree = ""; }; 26BC7C2510F1B3BC00F91463 /* lldb-defines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "lldb-defines.h"; path = "include/lldb/lldb-defines.h"; sourceTree = ""; }; 26BC7C2610F1B3BC00F91463 /* lldb-enumerations.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "lldb-enumerations.h"; path = "include/lldb/lldb-enumerations.h"; sourceTree = ""; }; 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 = ""; }; 26BC7C2910F1B3BC00F91463 /* lldb-types.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "lldb-types.h"; path = "include/lldb/lldb-types.h"; sourceTree = ""; }; 26BC7C2A10F1B3BC00F91463 /* lldb-private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "lldb-private.h"; path = "include/lldb/lldb-private.h"; sourceTree = ""; }; 26BC7C5510F1B6E900F91463 /* Block.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Block.h; path = include/lldb/Symbol/Block.h; sourceTree = ""; }; 26BC7C5610F1B6E900F91463 /* ClangASTContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ClangASTContext.h; path = include/lldb/Symbol/ClangASTContext.h; sourceTree = ""; }; 26BC7C5710F1B6E900F91463 /* CompileUnit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CompileUnit.h; path = include/lldb/Symbol/CompileUnit.h; sourceTree = ""; }; 26BC7C5810F1B6E900F91463 /* Declaration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Declaration.h; path = include/lldb/Symbol/Declaration.h; sourceTree = ""; }; 26BC7C5910F1B6E900F91463 /* DWARFCallFrameInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DWARFCallFrameInfo.h; path = include/lldb/Symbol/DWARFCallFrameInfo.h; sourceTree = ""; }; 26BC7C5A10F1B6E900F91463 /* Function.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Function.h; path = include/lldb/Symbol/Function.h; sourceTree = ""; }; 26BC7C5B10F1B6E900F91463 /* LineEntry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LineEntry.h; path = include/lldb/Symbol/LineEntry.h; sourceTree = ""; }; 26BC7C5C10F1B6E900F91463 /* LineTable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LineTable.h; path = include/lldb/Symbol/LineTable.h; sourceTree = ""; }; 26BC7C5D10F1B6E900F91463 /* ObjectContainer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ObjectContainer.h; path = include/lldb/Symbol/ObjectContainer.h; sourceTree = ""; }; 26BC7C5E10F1B6E900F91463 /* ObjectFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ObjectFile.h; path = include/lldb/Symbol/ObjectFile.h; sourceTree = ""; }; 26BC7C5F10F1B6E900F91463 /* Symbol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Symbol.h; path = include/lldb/Symbol/Symbol.h; sourceTree = ""; }; 26BC7C6010F1B6E900F91463 /* SymbolContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SymbolContext.h; path = include/lldb/Symbol/SymbolContext.h; sourceTree = ""; }; 26BC7C6110F1B6E900F91463 /* SymbolContextScope.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SymbolContextScope.h; path = include/lldb/Symbol/SymbolContextScope.h; sourceTree = ""; }; 26BC7C6210F1B6E900F91463 /* SymbolFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SymbolFile.h; path = include/lldb/Symbol/SymbolFile.h; sourceTree = ""; }; 26BC7C6310F1B6E900F91463 /* SymbolVendor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SymbolVendor.h; path = include/lldb/Symbol/SymbolVendor.h; sourceTree = ""; }; 26BC7C6410F1B6E900F91463 /* Symtab.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Symtab.h; path = include/lldb/Symbol/Symtab.h; sourceTree = ""; }; 26BC7C6510F1B6E900F91463 /* Type.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Type.h; path = include/lldb/Symbol/Type.h; sourceTree = ""; }; 26BC7C6610F1B6E900F91463 /* TypeList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TypeList.h; path = include/lldb/Symbol/TypeList.h; sourceTree = ""; }; 26BC7C6710F1B6E900F91463 /* Variable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Variable.h; path = include/lldb/Symbol/Variable.h; sourceTree = ""; }; 26BC7C6810F1B6E900F91463 /* VariableList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VariableList.h; path = include/lldb/Symbol/VariableList.h; sourceTree = ""; }; 26BC7CED10F1B71400F91463 /* StoppointCallbackContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StoppointCallbackContext.h; path = include/lldb/Breakpoint/StoppointCallbackContext.h; sourceTree = ""; }; 26BC7CEE10F1B71400F91463 /* Breakpoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Breakpoint.h; path = include/lldb/Breakpoint/Breakpoint.h; sourceTree = ""; }; 26BC7CEF10F1B71400F91463 /* BreakpointID.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BreakpointID.h; path = include/lldb/Breakpoint/BreakpointID.h; sourceTree = ""; }; 26BC7CF010F1B71400F91463 /* BreakpointIDList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BreakpointIDList.h; path = include/lldb/Breakpoint/BreakpointIDList.h; sourceTree = ""; }; 26BC7CF110F1B71400F91463 /* BreakpointList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BreakpointList.h; path = include/lldb/Breakpoint/BreakpointList.h; sourceTree = ""; }; 26BC7CF210F1B71400F91463 /* BreakpointLocation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BreakpointLocation.h; path = include/lldb/Breakpoint/BreakpointLocation.h; sourceTree = ""; }; 26BC7CF310F1B71400F91463 /* BreakpointLocationCollection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BreakpointLocationCollection.h; path = include/lldb/Breakpoint/BreakpointLocationCollection.h; sourceTree = ""; }; 26BC7CF410F1B71400F91463 /* BreakpointLocationList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BreakpointLocationList.h; path = include/lldb/Breakpoint/BreakpointLocationList.h; sourceTree = ""; }; 26BC7CF510F1B71400F91463 /* BreakpointOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BreakpointOptions.h; path = include/lldb/Breakpoint/BreakpointOptions.h; sourceTree = ""; }; 26BC7CF610F1B71400F91463 /* BreakpointResolver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BreakpointResolver.h; path = include/lldb/Breakpoint/BreakpointResolver.h; sourceTree = ""; }; 26BC7CF710F1B71400F91463 /* BreakpointSite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BreakpointSite.h; path = include/lldb/Breakpoint/BreakpointSite.h; sourceTree = ""; }; 26BC7CF810F1B71400F91463 /* BreakpointSiteList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BreakpointSiteList.h; path = include/lldb/Breakpoint/BreakpointSiteList.h; sourceTree = ""; }; 26BC7CF910F1B71400F91463 /* SearchFilter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SearchFilter.h; path = include/lldb/Core/SearchFilter.h; sourceTree = ""; }; 26BC7CFA10F1B71400F91463 /* Stoppoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Stoppoint.h; path = include/lldb/Breakpoint/Stoppoint.h; sourceTree = ""; }; 26BC7CFB10F1B71400F91463 /* StoppointLocation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StoppointLocation.h; path = include/lldb/Breakpoint/StoppointLocation.h; sourceTree = ""; }; 26BC7CFC10F1B71400F91463 /* Watchpoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Watchpoint.h; path = include/lldb/Breakpoint/Watchpoint.h; sourceTree = ""; }; 26BC7D1410F1B76300F91463 /* CommandObjectBreakpoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CommandObjectBreakpoint.h; path = source/Commands/CommandObjectBreakpoint.h; sourceTree = ""; }; 26BC7D1710F1B76300F91463 /* CommandObjectDisassemble.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CommandObjectDisassemble.h; path = source/Commands/CommandObjectDisassemble.h; sourceTree = ""; }; 26BC7D1810F1B76300F91463 /* CommandObjectExpression.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CommandObjectExpression.h; path = source/Commands/CommandObjectExpression.h; sourceTree = ""; }; 26BC7D1A10F1B76300F91463 /* CommandObjectHelp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CommandObjectHelp.h; path = source/Commands/CommandObjectHelp.h; sourceTree = ""; }; 26BC7D1D10F1B76300F91463 /* CommandObjectMemory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CommandObjectMemory.h; path = source/Commands/CommandObjectMemory.h; sourceTree = ""; }; 26BC7D1F10F1B76300F91463 /* CommandObjectProcess.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CommandObjectProcess.h; path = source/Commands/CommandObjectProcess.h; sourceTree = ""; }; 26BC7D2010F1B76300F91463 /* CommandObjectQuit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CommandObjectQuit.h; path = source/Commands/CommandObjectQuit.h; sourceTree = ""; }; 26BC7D2210F1B76300F91463 /* CommandObjectRegister.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CommandObjectRegister.h; path = source/Commands/CommandObjectRegister.h; sourceTree = ""; }; 26BC7D2410F1B76300F91463 /* CommandObjectScript.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CommandObjectScript.h; path = source/Interpreter/CommandObjectScript.h; sourceTree = ""; }; 26BC7D2710F1B76300F91463 /* CommandObjectSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CommandObjectSettings.h; path = source/Commands/CommandObjectSettings.h; sourceTree = ""; }; 26BC7D2910F1B76300F91463 /* CommandObjectSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CommandObjectSource.h; path = source/Commands/CommandObjectSource.h; sourceTree = ""; }; 26BC7D2C10F1B76300F91463 /* CommandObjectSyntax.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CommandObjectSyntax.h; path = source/Commands/CommandObjectSyntax.h; sourceTree = ""; }; 26BC7D2D10F1B76300F91463 /* CommandObjectThread.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CommandObjectThread.h; path = source/Commands/CommandObjectThread.h; sourceTree = ""; }; 26BC7D5010F1B77400F91463 /* Address.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Address.h; path = include/lldb/Core/Address.h; sourceTree = ""; }; 26BC7D5110F1B77400F91463 /* AddressRange.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AddressRange.h; path = include/lldb/Core/AddressRange.h; sourceTree = ""; }; 26BC7D5210F1B77400F91463 /* ArchSpec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ArchSpec.h; path = include/lldb/Core/ArchSpec.h; sourceTree = ""; }; 26BC7D5310F1B77400F91463 /* Args.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Args.h; path = include/lldb/Interpreter/Args.h; sourceTree = ""; }; 26BC7D5410F1B77400F91463 /* Broadcaster.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Broadcaster.h; path = include/lldb/Core/Broadcaster.h; sourceTree = ""; }; 26BC7D5510F1B77400F91463 /* ClangForward.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ClangForward.h; path = include/lldb/Core/ClangForward.h; sourceTree = ""; }; 26BC7D5610F1B77400F91463 /* Communication.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Communication.h; path = include/lldb/Core/Communication.h; sourceTree = ""; }; 26BC7D5710F1B77400F91463 /* Connection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Connection.h; path = include/lldb/Core/Connection.h; sourceTree = ""; }; 26BC7D5E10F1B77400F91463 /* Disassembler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Disassembler.h; path = include/lldb/Core/Disassembler.h; sourceTree = ""; }; 26BC7D5F10F1B77400F91463 /* dwarf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = dwarf.h; path = include/lldb/Core/dwarf.h; sourceTree = ""; }; 26BC7D6110F1B77400F91463 /* Event.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Event.h; path = include/lldb/Core/Event.h; sourceTree = ""; }; 26BC7D6310F1B77400F91463 /* FileSpecList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FileSpecList.h; path = include/lldb/Core/FileSpecList.h; sourceTree = ""; }; 26BC7D6510F1B77400F91463 /* IOStreamMacros.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IOStreamMacros.h; path = include/lldb/Core/IOStreamMacros.h; sourceTree = ""; }; 26BC7D6710F1B77400F91463 /* Listener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Listener.h; path = include/lldb/Core/Listener.h; sourceTree = ""; }; 26BC7D6810F1B77400F91463 /* Log.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Log.h; path = include/lldb/Utility/Log.h; sourceTree = ""; }; 26BC7D6910F1B77400F91463 /* Mangled.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Mangled.h; path = include/lldb/Core/Mangled.h; sourceTree = ""; }; 26BC7D6A10F1B77400F91463 /* Module.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Module.h; path = include/lldb/Core/Module.h; sourceTree = ""; }; 26BC7D6B10F1B77400F91463 /* ModuleChild.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ModuleChild.h; path = include/lldb/Core/ModuleChild.h; sourceTree = ""; }; 26BC7D6C10F1B77400F91463 /* ModuleList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ModuleList.h; path = include/lldb/Core/ModuleList.h; sourceTree = ""; }; 26BC7D6D10F1B77400F91463 /* Options.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Options.h; path = include/lldb/Interpreter/Options.h; sourceTree = ""; }; 26BC7D7010F1B77400F91463 /* PluginInterface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PluginInterface.h; path = include/lldb/Core/PluginInterface.h; sourceTree = ""; }; 26BC7D7110F1B77400F91463 /* PluginManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PluginManager.h; path = include/lldb/Core/PluginManager.h; sourceTree = ""; }; 26BC7D7410F1B77400F91463 /* Scalar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Scalar.h; path = include/lldb/Core/Scalar.h; sourceTree = ""; }; 26BC7D7510F1B77400F91463 /* Section.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Section.h; path = include/lldb/Core/Section.h; sourceTree = ""; }; 26BC7D7610F1B77400F91463 /* SourceManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SourceManager.h; path = include/lldb/Core/SourceManager.h; sourceTree = ""; }; 26BC7D7710F1B77400F91463 /* State.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = State.h; path = include/lldb/Core/State.h; sourceTree = ""; }; 26BC7D7810F1B77400F91463 /* STLUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = STLUtils.h; path = include/lldb/Core/STLUtils.h; sourceTree = ""; }; 26BC7D7A10F1B77400F91463 /* StreamFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StreamFile.h; path = include/lldb/Core/StreamFile.h; sourceTree = ""; }; 26BC7D7E10F1B77400F91463 /* Timer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Timer.h; path = include/lldb/Core/Timer.h; sourceTree = ""; }; 26BC7D8110F1B77400F91463 /* Value.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Value.h; path = include/lldb/Core/Value.h; sourceTree = ""; }; 26BC7D8210F1B77400F91463 /* ValueObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ValueObject.h; path = include/lldb/Core/ValueObject.h; sourceTree = ""; }; 26BC7D8310F1B77400F91463 /* ValueObjectChild.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ValueObjectChild.h; path = include/lldb/Core/ValueObjectChild.h; sourceTree = ""; }; 26BC7D8410F1B77400F91463 /* ValueObjectList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ValueObjectList.h; path = include/lldb/Core/ValueObjectList.h; sourceTree = ""; }; 26BC7D8510F1B77400F91463 /* ValueObjectVariable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ValueObjectVariable.h; path = include/lldb/Core/ValueObjectVariable.h; sourceTree = ""; }; 26BC7DC010F1B79500F91463 /* ClangExpressionHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ClangExpressionHelper.h; path = ExpressionParser/Clang/ClangExpressionHelper.h; sourceTree = ""; }; 26BC7DC310F1B79500F91463 /* DWARFExpression.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DWARFExpression.h; path = include/lldb/Expression/DWARFExpression.h; sourceTree = ""; }; 26BC7DD310F1B7D500F91463 /* Endian.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Endian.h; path = include/lldb/Host/Endian.h; sourceTree = ""; }; 26BC7DD410F1B7D500F91463 /* Host.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Host.h; path = include/lldb/Host/Host.h; sourceTree = ""; }; 26BC7DD610F1B7D500F91463 /* Predicate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Predicate.h; path = include/lldb/Host/Predicate.h; sourceTree = ""; }; 26BC7DE210F1B7F900F91463 /* CommandInterpreter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CommandInterpreter.h; path = include/lldb/Interpreter/CommandInterpreter.h; sourceTree = ""; }; 26BC7DE310F1B7F900F91463 /* CommandObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CommandObject.h; path = include/lldb/Interpreter/CommandObject.h; sourceTree = ""; }; 26BC7DE410F1B7F900F91463 /* CommandReturnObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CommandReturnObject.h; path = include/lldb/Interpreter/CommandReturnObject.h; sourceTree = ""; }; 26BC7DE510F1B7F900F91463 /* ScriptInterpreter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ScriptInterpreter.h; path = include/lldb/Interpreter/ScriptInterpreter.h; sourceTree = ""; }; 26BC7DF110F1B81A00F91463 /* DynamicLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DynamicLoader.h; path = include/lldb/Target/DynamicLoader.h; sourceTree = ""; }; 26BC7DF210F1B81A00F91463 /* ExecutionContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ExecutionContext.h; path = include/lldb/Target/ExecutionContext.h; sourceTree = ""; }; 26BC7DF310F1B81A00F91463 /* Process.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Process.h; path = include/lldb/Target/Process.h; sourceTree = ""; }; 26BC7DF410F1B81A00F91463 /* RegisterContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterContext.h; path = include/lldb/Target/RegisterContext.h; sourceTree = ""; }; 26BC7DF510F1B81A00F91463 /* StackFrame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StackFrame.h; path = include/lldb/Target/StackFrame.h; sourceTree = ""; }; 26BC7DF610F1B81A00F91463 /* StackFrameList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StackFrameList.h; path = include/lldb/Target/StackFrameList.h; sourceTree = ""; }; 26BC7DF710F1B81A00F91463 /* StackID.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StackID.h; path = include/lldb/Target/StackID.h; sourceTree = ""; }; 26BC7DF810F1B81A00F91463 /* Target.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Target.h; path = include/lldb/Target/Target.h; sourceTree = ""; }; 26BC7DF910F1B81A00F91463 /* TargetList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TargetList.h; path = include/lldb/Target/TargetList.h; sourceTree = ""; }; 26BC7DFA10F1B81A00F91463 /* Thread.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Thread.h; path = include/lldb/Target/Thread.h; sourceTree = ""; }; 26BC7DFB10F1B81A00F91463 /* ThreadList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ThreadList.h; path = include/lldb/Target/ThreadList.h; sourceTree = ""; }; 26BC7DFC10F1B81A00F91463 /* ThreadPlan.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ThreadPlan.h; path = include/lldb/Target/ThreadPlan.h; sourceTree = ""; }; 26BC7E0910F1B83100F91463 /* StoppointCallbackContext.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StoppointCallbackContext.cpp; path = source/Breakpoint/StoppointCallbackContext.cpp; sourceTree = ""; }; 26BC7E0A10F1B83100F91463 /* Breakpoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Breakpoint.cpp; path = source/Breakpoint/Breakpoint.cpp; sourceTree = ""; }; 26BC7E0B10F1B83100F91463 /* BreakpointID.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BreakpointID.cpp; path = source/Breakpoint/BreakpointID.cpp; sourceTree = ""; }; 26BC7E0C10F1B83100F91463 /* BreakpointIDList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BreakpointIDList.cpp; path = source/Breakpoint/BreakpointIDList.cpp; sourceTree = ""; }; 26BC7E0D10F1B83100F91463 /* BreakpointList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BreakpointList.cpp; path = source/Breakpoint/BreakpointList.cpp; sourceTree = ""; }; 26BC7E0E10F1B83100F91463 /* BreakpointLocation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BreakpointLocation.cpp; path = source/Breakpoint/BreakpointLocation.cpp; sourceTree = ""; }; 26BC7E0F10F1B83100F91463 /* BreakpointLocationCollection.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BreakpointLocationCollection.cpp; path = source/Breakpoint/BreakpointLocationCollection.cpp; sourceTree = ""; }; 26BC7E1010F1B83100F91463 /* BreakpointLocationList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BreakpointLocationList.cpp; path = source/Breakpoint/BreakpointLocationList.cpp; sourceTree = ""; }; 26BC7E1110F1B83100F91463 /* BreakpointOptions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BreakpointOptions.cpp; path = source/Breakpoint/BreakpointOptions.cpp; sourceTree = ""; }; 26BC7E1210F1B83100F91463 /* BreakpointResolver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BreakpointResolver.cpp; path = source/Breakpoint/BreakpointResolver.cpp; sourceTree = ""; }; 26BC7E1310F1B83100F91463 /* BreakpointSite.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BreakpointSite.cpp; path = source/Breakpoint/BreakpointSite.cpp; sourceTree = ""; }; 26BC7E1410F1B83100F91463 /* BreakpointSiteList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BreakpointSiteList.cpp; path = source/Breakpoint/BreakpointSiteList.cpp; sourceTree = ""; }; 26BC7E1510F1B83100F91463 /* SearchFilter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SearchFilter.cpp; path = source/Core/SearchFilter.cpp; sourceTree = ""; }; 26BC7E1610F1B83100F91463 /* Stoppoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Stoppoint.cpp; path = source/Breakpoint/Stoppoint.cpp; sourceTree = ""; }; 26BC7E1710F1B83100F91463 /* StoppointLocation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StoppointLocation.cpp; path = source/Breakpoint/StoppointLocation.cpp; sourceTree = ""; }; 26BC7E1810F1B83100F91463 /* Watchpoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Watchpoint.cpp; path = source/Breakpoint/Watchpoint.cpp; sourceTree = ""; }; 26BC7E2D10F1B84700F91463 /* CommandObjectBreakpoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandObjectBreakpoint.cpp; path = source/Commands/CommandObjectBreakpoint.cpp; sourceTree = ""; }; 26BC7E3010F1B84700F91463 /* CommandObjectDisassemble.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandObjectDisassemble.cpp; path = source/Commands/CommandObjectDisassemble.cpp; sourceTree = ""; }; 26BC7E3110F1B84700F91463 /* CommandObjectExpression.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandObjectExpression.cpp; path = source/Commands/CommandObjectExpression.cpp; sourceTree = ""; }; 26BC7E3310F1B84700F91463 /* CommandObjectHelp.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandObjectHelp.cpp; path = source/Commands/CommandObjectHelp.cpp; sourceTree = ""; }; 26BC7E3610F1B84700F91463 /* CommandObjectMemory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandObjectMemory.cpp; path = source/Commands/CommandObjectMemory.cpp; sourceTree = ""; }; 26BC7E3810F1B84700F91463 /* CommandObjectProcess.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandObjectProcess.cpp; path = source/Commands/CommandObjectProcess.cpp; sourceTree = ""; }; 26BC7E3910F1B84700F91463 /* CommandObjectQuit.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandObjectQuit.cpp; path = source/Commands/CommandObjectQuit.cpp; sourceTree = ""; }; 26BC7E3B10F1B84700F91463 /* CommandObjectRegister.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandObjectRegister.cpp; path = source/Commands/CommandObjectRegister.cpp; sourceTree = ""; }; 26BC7E3D10F1B84700F91463 /* CommandObjectScript.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandObjectScript.cpp; path = source/Interpreter/CommandObjectScript.cpp; sourceTree = ""; }; 26BC7E4010F1B84700F91463 /* CommandObjectSettings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandObjectSettings.cpp; path = source/Commands/CommandObjectSettings.cpp; sourceTree = ""; }; 26BC7E4210F1B84700F91463 /* CommandObjectSource.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandObjectSource.cpp; path = source/Commands/CommandObjectSource.cpp; sourceTree = ""; }; 26BC7E4510F1B84700F91463 /* CommandObjectSyntax.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandObjectSyntax.cpp; path = source/Commands/CommandObjectSyntax.cpp; sourceTree = ""; }; 26BC7E4610F1B84700F91463 /* CommandObjectThread.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandObjectThread.cpp; path = source/Commands/CommandObjectThread.cpp; sourceTree = ""; }; 26BC7E6910F1B85900F91463 /* Address.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Address.cpp; path = source/Core/Address.cpp; sourceTree = ""; }; 26BC7E6A10F1B85900F91463 /* AddressRange.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AddressRange.cpp; path = source/Core/AddressRange.cpp; sourceTree = ""; }; 26BC7E6B10F1B85900F91463 /* ArchSpec.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ArchSpec.cpp; path = source/Core/ArchSpec.cpp; sourceTree = ""; }; 26BC7E6C10F1B85900F91463 /* Args.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Args.cpp; path = source/Interpreter/Args.cpp; sourceTree = ""; }; 26BC7E6D10F1B85900F91463 /* Broadcaster.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Broadcaster.cpp; path = source/Core/Broadcaster.cpp; sourceTree = ""; }; 26BC7E6E10F1B85900F91463 /* Communication.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Communication.cpp; path = source/Core/Communication.cpp; sourceTree = ""; }; 26BC7E6F10F1B85900F91463 /* Connection.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Connection.cpp; path = source/Core/Connection.cpp; sourceTree = ""; }; 26BC7E7410F1B85900F91463 /* lldb.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = lldb.cpp; path = source/lldb.cpp; sourceTree = ""; }; 26BC7E7610F1B85900F91463 /* Disassembler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Disassembler.cpp; path = source/Core/Disassembler.cpp; sourceTree = ""; }; 26BC7E7710F1B85900F91463 /* DynamicLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DynamicLoader.cpp; path = source/Core/DynamicLoader.cpp; sourceTree = ""; }; 26BC7E7910F1B85900F91463 /* Event.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Event.cpp; path = source/Core/Event.cpp; sourceTree = ""; }; 26BC7E7B10F1B85900F91463 /* FileSpecList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FileSpecList.cpp; path = source/Core/FileSpecList.cpp; sourceTree = ""; }; 26BC7E7E10F1B85900F91463 /* Listener.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Listener.cpp; path = source/Core/Listener.cpp; sourceTree = ""; }; 26BC7E7F10F1B85900F91463 /* Log.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Log.cpp; path = source/Utility/Log.cpp; sourceTree = ""; }; 26BC7E8010F1B85900F91463 /* Mangled.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Mangled.cpp; path = source/Core/Mangled.cpp; sourceTree = ""; }; 26BC7E8110F1B85900F91463 /* Module.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Module.cpp; path = source/Core/Module.cpp; sourceTree = ""; }; 26BC7E8210F1B85900F91463 /* ModuleChild.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ModuleChild.cpp; path = source/Core/ModuleChild.cpp; sourceTree = ""; }; 26BC7E8310F1B85900F91463 /* ModuleList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ModuleList.cpp; path = source/Core/ModuleList.cpp; sourceTree = ""; }; 26BC7E8610F1B85900F91463 /* Options.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Options.cpp; path = source/Interpreter/Options.cpp; sourceTree = ""; }; 26BC7E8A10F1B85900F91463 /* PluginManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PluginManager.cpp; path = source/Core/PluginManager.cpp; sourceTree = ""; }; 26BC7E8D10F1B85900F91463 /* Scalar.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Scalar.cpp; path = source/Core/Scalar.cpp; sourceTree = ""; }; 26BC7E8E10F1B85900F91463 /* Section.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Section.cpp; path = source/Core/Section.cpp; sourceTree = ""; }; 26BC7E8F10F1B85900F91463 /* SourceManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SourceManager.cpp; path = source/Core/SourceManager.cpp; sourceTree = ""; }; 26BC7E9010F1B85900F91463 /* State.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = State.cpp; path = source/Core/State.cpp; sourceTree = ""; }; 26BC7E9210F1B85900F91463 /* StreamFile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StreamFile.cpp; path = source/Core/StreamFile.cpp; sourceTree = ""; }; 26BC7E9610F1B85900F91463 /* Timer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Timer.cpp; path = source/Core/Timer.cpp; sourceTree = ""; }; 26BC7E9910F1B85900F91463 /* Value.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Value.cpp; path = source/Core/Value.cpp; sourceTree = ""; }; 26BC7E9A10F1B85900F91463 /* ValueObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ValueObject.cpp; path = source/Core/ValueObject.cpp; sourceTree = ""; }; 26BC7E9B10F1B85900F91463 /* ValueObjectChild.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ValueObjectChild.cpp; path = source/Core/ValueObjectChild.cpp; sourceTree = ""; }; 26BC7E9C10F1B85900F91463 /* ValueObjectList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ValueObjectList.cpp; path = source/Core/ValueObjectList.cpp; sourceTree = ""; }; 26BC7E9D10F1B85900F91463 /* ValueObjectVariable.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ValueObjectVariable.cpp; path = source/Core/ValueObjectVariable.cpp; sourceTree = ""; }; 26BC7ED510F1B86700F91463 /* ClangUserExpression.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ClangUserExpression.cpp; path = ExpressionParser/Clang/ClangUserExpression.cpp; sourceTree = ""; }; 26BC7ED810F1B86700F91463 /* DWARFExpression.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DWARFExpression.cpp; path = source/Expression/DWARFExpression.cpp; sourceTree = ""; }; 26BC7EE810F1B88F00F91463 /* Host.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = Host.mm; path = source/Host/macosx/Host.mm; sourceTree = ""; }; 26BC7EED10F1B8AD00F91463 /* CFCBundle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CFCBundle.cpp; path = source/Host/macosx/cfcpp/CFCBundle.cpp; sourceTree = ""; }; 26BC7EEE10F1B8AD00F91463 /* CFCBundle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CFCBundle.h; path = source/Host/macosx/cfcpp/CFCBundle.h; sourceTree = ""; }; 26BC7EEF10F1B8AD00F91463 /* CFCData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CFCData.cpp; path = source/Host/macosx/cfcpp/CFCData.cpp; sourceTree = ""; }; 26BC7EF010F1B8AD00F91463 /* CFCData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CFCData.h; path = source/Host/macosx/cfcpp/CFCData.h; sourceTree = ""; }; 26BC7EF110F1B8AD00F91463 /* CFCMutableArray.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CFCMutableArray.cpp; path = source/Host/macosx/cfcpp/CFCMutableArray.cpp; sourceTree = ""; }; 26BC7EF210F1B8AD00F91463 /* CFCMutableArray.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CFCMutableArray.h; path = source/Host/macosx/cfcpp/CFCMutableArray.h; sourceTree = ""; }; 26BC7EF310F1B8AD00F91463 /* CFCMutableDictionary.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CFCMutableDictionary.cpp; path = source/Host/macosx/cfcpp/CFCMutableDictionary.cpp; sourceTree = ""; }; 26BC7EF410F1B8AD00F91463 /* CFCMutableDictionary.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CFCMutableDictionary.h; path = source/Host/macosx/cfcpp/CFCMutableDictionary.h; sourceTree = ""; }; 26BC7EF510F1B8AD00F91463 /* CFCMutableSet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CFCMutableSet.cpp; path = source/Host/macosx/cfcpp/CFCMutableSet.cpp; sourceTree = ""; }; 26BC7EF610F1B8AD00F91463 /* CFCMutableSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CFCMutableSet.h; path = source/Host/macosx/cfcpp/CFCMutableSet.h; sourceTree = ""; }; 26BC7EF710F1B8AD00F91463 /* CFCReleaser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CFCReleaser.h; path = source/Host/macosx/cfcpp/CFCReleaser.h; sourceTree = ""; }; 26BC7EF810F1B8AD00F91463 /* CFCString.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CFCString.cpp; path = source/Host/macosx/cfcpp/CFCString.cpp; sourceTree = ""; }; 26BC7EF910F1B8AD00F91463 /* CFCString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CFCString.h; path = source/Host/macosx/cfcpp/CFCString.h; sourceTree = ""; }; 26BC7F0810F1B8DD00F91463 /* CommandInterpreter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandInterpreter.cpp; path = source/Interpreter/CommandInterpreter.cpp; sourceTree = ""; }; 26BC7F0910F1B8DD00F91463 /* CommandObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandObject.cpp; path = source/Interpreter/CommandObject.cpp; sourceTree = ""; }; 26BC7F0A10F1B8DD00F91463 /* CommandReturnObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandReturnObject.cpp; path = source/Interpreter/CommandReturnObject.cpp; sourceTree = ""; }; 26BC7F1310F1B8EC00F91463 /* Block.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Block.cpp; path = source/Symbol/Block.cpp; sourceTree = ""; }; 26BC7F1410F1B8EC00F91463 /* ClangASTContext.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ClangASTContext.cpp; path = source/Symbol/ClangASTContext.cpp; sourceTree = ""; }; 26BC7F1510F1B8EC00F91463 /* CompileUnit.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CompileUnit.cpp; path = source/Symbol/CompileUnit.cpp; sourceTree = ""; }; 26BC7F1610F1B8EC00F91463 /* Declaration.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Declaration.cpp; path = source/Symbol/Declaration.cpp; sourceTree = ""; }; 26BC7F1710F1B8EC00F91463 /* DWARFCallFrameInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DWARFCallFrameInfo.cpp; path = source/Symbol/DWARFCallFrameInfo.cpp; sourceTree = ""; }; 26BC7F1810F1B8EC00F91463 /* Function.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Function.cpp; path = source/Symbol/Function.cpp; sourceTree = ""; }; 26BC7F1910F1B8EC00F91463 /* LineEntry.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LineEntry.cpp; path = source/Symbol/LineEntry.cpp; sourceTree = ""; }; 26BC7F1A10F1B8EC00F91463 /* LineTable.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LineTable.cpp; path = source/Symbol/LineTable.cpp; sourceTree = ""; }; 26BC7F1B10F1B8EC00F91463 /* Symbol.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Symbol.cpp; path = source/Symbol/Symbol.cpp; sourceTree = ""; }; 26BC7F1C10F1B8EC00F91463 /* SymbolContext.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SymbolContext.cpp; path = source/Symbol/SymbolContext.cpp; sourceTree = ""; }; 26BC7F1D10F1B8EC00F91463 /* SymbolFile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SymbolFile.cpp; path = source/Symbol/SymbolFile.cpp; sourceTree = ""; }; 26BC7F1F10F1B8EC00F91463 /* Symtab.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Symtab.cpp; path = source/Symbol/Symtab.cpp; sourceTree = ""; }; 26BC7F2010F1B8EC00F91463 /* Type.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Type.cpp; path = source/Symbol/Type.cpp; sourceTree = ""; }; 26BC7F2110F1B8EC00F91463 /* TypeList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TypeList.cpp; path = source/Symbol/TypeList.cpp; sourceTree = ""; }; 26BC7F2210F1B8EC00F91463 /* Variable.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Variable.cpp; path = source/Symbol/Variable.cpp; sourceTree = ""; }; 26BC7F2310F1B8EC00F91463 /* VariableList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = VariableList.cpp; path = source/Symbol/VariableList.cpp; sourceTree = ""; }; 26BC7F3510F1B90C00F91463 /* ExecutionContext.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ExecutionContext.cpp; path = source/Target/ExecutionContext.cpp; sourceTree = ""; }; 26BC7F3610F1B90C00F91463 /* Process.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Process.cpp; path = source/Target/Process.cpp; sourceTree = ""; }; 26BC7F3710F1B90C00F91463 /* RegisterContext.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegisterContext.cpp; path = source/Target/RegisterContext.cpp; sourceTree = ""; }; 26BC7F3810F1B90C00F91463 /* StackFrame.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StackFrame.cpp; path = source/Target/StackFrame.cpp; sourceTree = ""; }; 26BC7F3910F1B90C00F91463 /* StackFrameList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StackFrameList.cpp; path = source/Target/StackFrameList.cpp; sourceTree = ""; }; 26BC7F3A10F1B90C00F91463 /* StackID.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StackID.cpp; path = source/Target/StackID.cpp; sourceTree = ""; }; 26BC7F3B10F1B90C00F91463 /* Target.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Target.cpp; path = source/Target/Target.cpp; sourceTree = ""; }; 26BC7F3C10F1B90C00F91463 /* TargetList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TargetList.cpp; path = source/Target/TargetList.cpp; sourceTree = ""; }; 26BC7F3D10F1B90C00F91463 /* Thread.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Thread.cpp; path = source/Target/Thread.cpp; sourceTree = ""; }; 26BC7F3E10F1B90C00F91463 /* ThreadList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ThreadList.cpp; path = source/Target/ThreadList.cpp; sourceTree = ""; }; 26BC7F3F10F1B90C00F91463 /* ThreadPlan.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ThreadPlan.cpp; path = source/Target/ThreadPlan.cpp; sourceTree = ""; }; 26BC7F4C10F1BC1A00F91463 /* ObjectFile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ObjectFile.cpp; path = source/Symbol/ObjectFile.cpp; sourceTree = ""; }; 26BCFC4F1368ADF7006DC050 /* OptionGroupFormat.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = OptionGroupFormat.h; path = include/lldb/Interpreter/OptionGroupFormat.h; sourceTree = ""; }; 26BCFC511368AE38006DC050 /* OptionGroupFormat.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OptionGroupFormat.cpp; path = source/Interpreter/OptionGroupFormat.cpp; sourceTree = ""; }; 26BCFC531368B3E4006DC050 /* OptionGroupOutputFile.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = OptionGroupOutputFile.cpp; path = source/Interpreter/OptionGroupOutputFile.cpp; sourceTree = ""; }; 26BCFC541368B4B8006DC050 /* OptionGroupOutputFile.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = OptionGroupOutputFile.h; path = include/lldb/Interpreter/OptionGroupOutputFile.h; sourceTree = ""; }; 26BD407D135D2AC400237D80 /* FileLineResolver.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FileLineResolver.h; path = include/lldb/Core/FileLineResolver.h; sourceTree = ""; }; 26BD407E135D2ADF00237D80 /* FileLineResolver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FileLineResolver.cpp; path = source/Core/FileLineResolver.cpp; sourceTree = ""; }; 26BF51EA1B3C754400016294 /* ABISysV_hexagon.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ABISysV_hexagon.cpp; sourceTree = ""; }; 26BF51EB1B3C754400016294 /* ABISysV_hexagon.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ABISysV_hexagon.h; sourceTree = ""; }; 26BF51EF1B3C754400016294 /* ABISysV_i386.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ABISysV_i386.cpp; sourceTree = ""; }; 26BF51F01B3C754400016294 /* ABISysV_i386.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ABISysV_i386.h; sourceTree = ""; }; 26C5577B132575AD008FD8FE /* PlatformMacOSX.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PlatformMacOSX.cpp; sourceTree = ""; }; 26C5577C132575AD008FD8FE /* PlatformMacOSX.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformMacOSX.h; sourceTree = ""; }; 26C6886D137880B900407EDF /* RegisterValue.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = RegisterValue.h; path = include/lldb/Core/RegisterValue.h; sourceTree = ""; }; 26C6886E137880C400407EDF /* RegisterValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegisterValue.cpp; path = source/Core/RegisterValue.cpp; sourceTree = ""; }; 26C72C93124322890068DC16 /* SBStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBStream.h; path = include/lldb/API/SBStream.h; sourceTree = ""; }; 26C72C951243229A0068DC16 /* SBStream.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBStream.cpp; path = source/API/SBStream.cpp; sourceTree = ""; }; 26C7C4811BFFEA7E009BD01F /* WindowsMiniDump.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WindowsMiniDump.cpp; sourceTree = ""; }; 26C7C4821BFFEA7E009BD01F /* WindowsMiniDump.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WindowsMiniDump.h; sourceTree = ""; }; 26CA979F172B1FD5005DC71B /* RegisterContextThreadMemory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegisterContextThreadMemory.cpp; path = Utility/RegisterContextThreadMemory.cpp; sourceTree = ""; }; 26CA97A0172B1FD5005DC71B /* RegisterContextThreadMemory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterContextThreadMemory.h; path = Utility/RegisterContextThreadMemory.h; sourceTree = ""; }; 26CEB5F018762056008F575A /* CommandObjectGUI.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandObjectGUI.cpp; path = source/Commands/CommandObjectGUI.cpp; sourceTree = ""; }; 26CEB5F118762056008F575A /* CommandObjectGUI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CommandObjectGUI.h; path = source/Commands/CommandObjectGUI.h; sourceTree = ""; }; 26CF992414428766001E4138 /* AnsiTerminal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AnsiTerminal.h; path = include/lldb/Utility/AnsiTerminal.h; sourceTree = ""; }; 26CFDCA01861638D000E63E5 /* Editline.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Editline.h; path = include/lldb/Host/Editline.h; sourceTree = ""; }; 26CFDCA2186163A4000E63E5 /* Editline.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Editline.cpp; sourceTree = ""; }; 26D0DD5010FE554D00271C65 /* BreakpointResolverAddress.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BreakpointResolverAddress.h; path = include/lldb/Breakpoint/BreakpointResolverAddress.h; sourceTree = ""; }; 26D0DD5110FE554D00271C65 /* BreakpointResolverFileLine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BreakpointResolverFileLine.h; path = include/lldb/Breakpoint/BreakpointResolverFileLine.h; sourceTree = ""; }; 26D0DD5210FE554D00271C65 /* BreakpointResolverName.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BreakpointResolverName.h; path = include/lldb/Breakpoint/BreakpointResolverName.h; sourceTree = ""; }; 26D0DD5310FE555900271C65 /* BreakpointResolverAddress.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BreakpointResolverAddress.cpp; path = source/Breakpoint/BreakpointResolverAddress.cpp; sourceTree = ""; }; 26D0DD5410FE555900271C65 /* BreakpointResolverFileLine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BreakpointResolverFileLine.cpp; path = source/Breakpoint/BreakpointResolverFileLine.cpp; sourceTree = ""; }; 26D0DD5510FE555900271C65 /* BreakpointResolverName.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BreakpointResolverName.cpp; path = source/Breakpoint/BreakpointResolverName.cpp; sourceTree = ""; }; 26D27C9D11ED3A4E0024D721 /* ELFHeader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ELFHeader.cpp; sourceTree = ""; }; 26D27C9E11ED3A4E0024D721 /* ELFHeader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ELFHeader.h; sourceTree = ""; }; 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; }; 26D55234159A7DB100708D8D /* libxml2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libxml2.dylib; path = /usr/lib/libxml2.dylib; sourceTree = ""; }; 26D5E15E135BAEA2006EA0A7 /* OptionGroupArchitecture.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OptionGroupArchitecture.cpp; path = source/Interpreter/OptionGroupArchitecture.cpp; sourceTree = ""; }; 26D5E160135BAEB0006EA0A7 /* OptionGroupArchitecture.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = OptionGroupArchitecture.h; path = include/lldb/Interpreter/OptionGroupArchitecture.h; sourceTree = ""; }; 26D5E161135BB040006EA0A7 /* OptionGroupPlatform.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = OptionGroupPlatform.h; path = include/lldb/Interpreter/OptionGroupPlatform.h; sourceTree = ""; }; 26D5E162135BB054006EA0A7 /* OptionGroupPlatform.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OptionGroupPlatform.cpp; path = source/Interpreter/OptionGroupPlatform.cpp; sourceTree = ""; }; 26D6F3F4183E7F9300194858 /* lldb-gdbserver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = "lldb-gdbserver.cpp"; path = "tools/lldb-server/lldb-gdbserver.cpp"; sourceTree = ""; }; 26D7E45B13D5E2F9007FD12B /* SocketAddress.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SocketAddress.h; path = include/lldb/Host/SocketAddress.h; sourceTree = ""; }; 26D7E45C13D5E30A007FD12B /* SocketAddress.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SocketAddress.cpp; path = source/Host/common/SocketAddress.cpp; sourceTree = ""; }; 26D9FDC612F784E60003F2EE /* EmulateInstruction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = EmulateInstruction.h; path = include/lldb/Core/EmulateInstruction.h; sourceTree = ""; }; 26D9FDC812F784FD0003F2EE /* EmulateInstruction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = EmulateInstruction.cpp; path = source/Core/EmulateInstruction.cpp; sourceTree = ""; }; 26DAED5F15D327A200E15819 /* OptionValuePathMappings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OptionValuePathMappings.h; path = include/lldb/Interpreter/OptionValuePathMappings.h; sourceTree = ""; }; 26DAED6215D327C200E15819 /* OptionValuePathMappings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OptionValuePathMappings.cpp; path = source/Interpreter/OptionValuePathMappings.cpp; sourceTree = ""; }; 26DAFD9711529BC7005A394E /* ExecutionContextScope.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ExecutionContextScope.h; path = include/lldb/Target/ExecutionContextScope.h; sourceTree = ""; }; 26DB3E071379E7AD0080DC73 /* ABIMacOSX_arm.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ABIMacOSX_arm.cpp; sourceTree = ""; }; 26DB3E081379E7AD0080DC73 /* ABIMacOSX_arm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ABIMacOSX_arm.h; sourceTree = ""; }; 26DB3E0B1379E7AD0080DC73 /* ABIMacOSX_arm64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ABIMacOSX_arm64.cpp; sourceTree = ""; }; 26DB3E0C1379E7AD0080DC73 /* ABIMacOSX_arm64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ABIMacOSX_arm64.h; sourceTree = ""; }; 26DB3E0F1379E7AD0080DC73 /* ABIMacOSX_i386.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ABIMacOSX_i386.cpp; sourceTree = ""; }; 26DB3E101379E7AD0080DC73 /* ABIMacOSX_i386.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ABIMacOSX_i386.h; sourceTree = ""; }; 26DB3E131379E7AD0080DC73 /* ABISysV_x86_64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ABISysV_x86_64.cpp; sourceTree = ""; }; 26DB3E141379E7AD0080DC73 /* ABISysV_x86_64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ABISysV_x86_64.h; sourceTree = ""; }; 26DC6A101337FE6900FF7998 /* lldb-server */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "lldb-server"; 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 = ""; }; 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 = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; 26DE204011618AB900A093E2 /* SBSymbolContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBSymbolContext.h; path = include/lldb/API/SBSymbolContext.h; sourceTree = ""; }; 26DE204211618ACA00A093E2 /* SBAddress.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBAddress.h; path = include/lldb/API/SBAddress.h; sourceTree = ""; }; 26DE204411618ADA00A093E2 /* SBAddress.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBAddress.cpp; path = source/API/SBAddress.cpp; sourceTree = ""; }; 26DE204611618AED00A093E2 /* SBSymbolContext.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBSymbolContext.cpp; path = source/API/SBSymbolContext.cpp; sourceTree = ""; }; 26DE204C11618E7A00A093E2 /* SBModule.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBModule.cpp; path = source/API/SBModule.cpp; sourceTree = ""; }; 26DE204E11618E9800A093E2 /* SBModule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBModule.h; path = include/lldb/API/SBModule.h; sourceTree = ""; }; 26DE205211618FAC00A093E2 /* SBFunction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBFunction.h; path = include/lldb/API/SBFunction.h; sourceTree = ""; }; 26DE205411618FB800A093E2 /* SBCompileUnit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBCompileUnit.h; path = include/lldb/API/SBCompileUnit.h; sourceTree = ""; }; 26DE205611618FC500A093E2 /* SBBlock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBBlock.h; path = include/lldb/API/SBBlock.h; sourceTree = ""; }; 26DE205811618FE700A093E2 /* SBLineEntry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBLineEntry.h; path = include/lldb/API/SBLineEntry.h; sourceTree = ""; }; 26DE205A11618FF600A093E2 /* SBSymbol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBSymbol.h; path = include/lldb/API/SBSymbol.h; sourceTree = ""; }; 26DE205C1161901400A093E2 /* SBFunction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBFunction.cpp; path = source/API/SBFunction.cpp; sourceTree = ""; }; 26DE205E1161901B00A093E2 /* SBCompileUnit.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBCompileUnit.cpp; path = source/API/SBCompileUnit.cpp; sourceTree = ""; }; 26DE20601161902600A093E2 /* SBBlock.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBBlock.cpp; path = source/API/SBBlock.cpp; sourceTree = ""; }; 26DE20621161904200A093E2 /* SBLineEntry.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBLineEntry.cpp; path = source/API/SBLineEntry.cpp; sourceTree = ""; }; 26DE20641161904E00A093E2 /* SBSymbol.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBSymbol.cpp; path = source/API/SBSymbol.cpp; sourceTree = ""; }; 26DFBC51113B48D600DD817F /* CommandObjectMultiword.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CommandObjectMultiword.h; path = include/lldb/Interpreter/CommandObjectMultiword.h; sourceTree = ""; }; 26DFBC52113B48D600DD817F /* CommandObjectRegexCommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CommandObjectRegexCommand.h; path = include/lldb/Interpreter/CommandObjectRegexCommand.h; sourceTree = ""; }; 26DFBC58113B48F300DD817F /* CommandObjectMultiword.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandObjectMultiword.cpp; path = source/Commands/CommandObjectMultiword.cpp; sourceTree = ""; }; 26DFBC59113B48F300DD817F /* CommandObjectRegexCommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandObjectRegexCommand.cpp; path = source/Interpreter/CommandObjectRegexCommand.cpp; sourceTree = ""; }; 26E152231419CACA007967D0 /* ObjectFilePECOFF.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = ObjectFilePECOFF.cpp; sourceTree = ""; }; 26E152241419CACA007967D0 /* ObjectFilePECOFF.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ObjectFilePECOFF.h; sourceTree = ""; }; 26E3EEBD11A9870400FBADB6 /* Unwind.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Unwind.h; path = include/lldb/Target/Unwind.h; sourceTree = ""; }; 26E3EEE311A9901300FBADB6 /* UnwindMacOSXFrameBackchain.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UnwindMacOSXFrameBackchain.cpp; path = Utility/UnwindMacOSXFrameBackchain.cpp; sourceTree = ""; }; 26E3EEE411A9901300FBADB6 /* UnwindMacOSXFrameBackchain.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UnwindMacOSXFrameBackchain.h; path = Utility/UnwindMacOSXFrameBackchain.h; sourceTree = ""; }; 26E3EEF711A994E800FBADB6 /* RegisterContextMacOSXFrameBackchain.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegisterContextMacOSXFrameBackchain.cpp; path = Utility/RegisterContextMacOSXFrameBackchain.cpp; sourceTree = ""; }; 26E3EEF811A994E800FBADB6 /* RegisterContextMacOSXFrameBackchain.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterContextMacOSXFrameBackchain.h; path = Utility/RegisterContextMacOSXFrameBackchain.h; sourceTree = ""; }; 26E6902E129C6BD500DDECD9 /* ClangExternalASTSourceCallbacks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ClangExternalASTSourceCallbacks.h; path = include/lldb/Symbol/ClangExternalASTSourceCallbacks.h; sourceTree = ""; }; 26E69030129C6BEF00DDECD9 /* ClangExternalASTSourceCallbacks.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ClangExternalASTSourceCallbacks.cpp; path = source/Symbol/ClangExternalASTSourceCallbacks.cpp; sourceTree = ""; }; 26ED3D6C13C563810017D45E /* OptionGroupVariable.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OptionGroupVariable.cpp; path = source/Interpreter/OptionGroupVariable.cpp; sourceTree = ""; }; 26ED3D6F13C5638A0017D45E /* OptionGroupVariable.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = OptionGroupVariable.h; path = include/lldb/Interpreter/OptionGroupVariable.h; sourceTree = ""; }; 26EFB6181BFE8D3E00544801 /* PlatformNetBSD.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PlatformNetBSD.cpp; sourceTree = ""; }; 26EFB6191BFE8D3E00544801 /* PlatformNetBSD.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformNetBSD.h; sourceTree = ""; }; 26EFC4CA18CFAF0D00865D87 /* ObjectFileJIT.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ObjectFileJIT.cpp; sourceTree = ""; }; 26EFC4CB18CFAF0D00865D87 /* ObjectFileJIT.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ObjectFileJIT.h; sourceTree = ""; }; 26F006541B4DD86700B872E5 /* DynamicLoaderWindowsDYLD.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DynamicLoaderWindowsDYLD.cpp; sourceTree = ""; }; 26F006551B4DD86700B872E5 /* DynamicLoaderWindowsDYLD.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DynamicLoaderWindowsDYLD.h; sourceTree = ""; }; 26F2F8FD1B156678007857DE /* StructuredData.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = StructuredData.h; path = include/lldb/Core/StructuredData.h; sourceTree = ""; }; 26F4A21A13FBA31A0064B613 /* ThreadMemory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ThreadMemory.cpp; path = Utility/ThreadMemory.cpp; sourceTree = ""; }; 26F4A21B13FBA31A0064B613 /* ThreadMemory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ThreadMemory.h; path = Utility/ThreadMemory.h; sourceTree = ""; }; 26F5C26A10F3D9A4009D5894 /* lldb */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = lldb; sourceTree = BUILT_PRODUCTS_DIR; }; 26F5C27210F3D9E4009D5894 /* lldb-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "lldb-Info.plist"; path = "tools/driver/lldb-Info.plist"; sourceTree = ""; }; 26F5C27310F3D9E4009D5894 /* Driver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Driver.cpp; path = tools/driver/Driver.cpp; sourceTree = ""; }; 26F5C27410F3D9E4009D5894 /* Driver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Driver.h; path = tools/driver/Driver.h; sourceTree = ""; }; 26F5C32410F3DF23009D5894 /* libpython.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libpython.dylib; path = /usr/lib/libpython.dylib; sourceTree = ""; }; 26F5C32A10F3DFDD009D5894 /* libedit.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libedit.dylib; path = /usr/lib/libedit.dylib; sourceTree = ""; }; 26F5C32B10F3DFDD009D5894 /* libtermcap.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libtermcap.dylib; path = /usr/lib/libtermcap.dylib; sourceTree = ""; }; 26F5C37410F3F61B009D5894 /* libobjc.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libobjc.dylib; path = /usr/lib/libobjc.dylib; sourceTree = ""; }; 26F5C39010F3FA26009D5894 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = ""; }; 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 = ""; }; 26FA4315130103F400E71120 /* FileSpec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FileSpec.h; path = include/lldb/Utility/FileSpec.h; sourceTree = ""; }; 26FA43171301048600E71120 /* FileSpec.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FileSpec.cpp; path = source/Utility/FileSpec.cpp; sourceTree = ""; }; 26FFC19314FC072100087D58 /* AuxVector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AuxVector.cpp; sourceTree = ""; }; 26FFC19414FC072100087D58 /* AuxVector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AuxVector.h; sourceTree = ""; }; 26FFC19514FC072100087D58 /* DYLDRendezvous.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DYLDRendezvous.cpp; sourceTree = ""; }; 26FFC19614FC072100087D58 /* DYLDRendezvous.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DYLDRendezvous.h; sourceTree = ""; }; 26FFC19714FC072100087D58 /* DynamicLoaderPOSIXDYLD.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DynamicLoaderPOSIXDYLD.cpp; sourceTree = ""; }; 26FFC19814FC072100087D58 /* DynamicLoaderPOSIXDYLD.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DynamicLoaderPOSIXDYLD.h; sourceTree = ""; }; 3032B1B61CAAA3D1004BE1AB /* ClangUtil.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ClangUtil.cpp; path = source/Symbol/ClangUtil.cpp; sourceTree = ""; }; 3032B1B91CAAA400004BE1AB /* ClangUtil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ClangUtil.h; path = include/lldb/Symbol/ClangUtil.h; sourceTree = ""; }; - 30DED5DC1B4ECB17004CC508 /* MainLoopPosix.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MainLoopPosix.cpp; sourceTree = ""; }; 33064C991A5C7A330033D415 /* UriParser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UriParser.cpp; path = source/Utility/UriParser.cpp; sourceTree = ""; }; 3392EBB71AFF402200858B9F /* SBLanguageRuntime.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBLanguageRuntime.h; path = include/lldb/API/SBLanguageRuntime.h; sourceTree = ""; }; 33E5E8411A672A240024ED68 /* StringConvert.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StringConvert.cpp; sourceTree = ""; }; 33E5E8451A6736D30024ED68 /* StringConvert.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StringConvert.h; path = include/lldb/Host/StringConvert.h; sourceTree = SOURCE_ROOT; }; 3F5E8AF31A40D4A500A73232 /* PipeBase.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = PipeBase.h; path = include/lldb/Host/PipeBase.h; sourceTree = ""; }; 3F8160A51AB9F7DD001DA9DF /* Logging.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Logging.cpp; path = source/Utility/Logging.cpp; sourceTree = ""; }; 3F8160A71AB9F809001DA9DF /* Logging.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = Logging.h; path = include/lldb/Utility/Logging.h; sourceTree = ""; }; 3F8169181ABA2419001DA9DF /* NameMatches.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = NameMatches.cpp; path = source/Utility/NameMatches.cpp; sourceTree = ""; }; 3F81691C1ABA242B001DA9DF /* NameMatches.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = NameMatches.h; path = include/lldb/Utility/NameMatches.h; sourceTree = ""; }; 3F81692A1ABB7A16001DA9DF /* SystemInitializerFull.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SystemInitializerFull.cpp; path = source/API/SystemInitializerFull.cpp; sourceTree = ""; }; 3F81692D1ABB7A40001DA9DF /* SystemInitializerFull.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SystemInitializerFull.h; path = include/lldb/API/SystemInitializerFull.h; sourceTree = ""; }; 3F81692E1ABB7A6D001DA9DF /* SystemInitializer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SystemInitializer.cpp; path = source/Initialization/SystemInitializer.cpp; sourceTree = ""; }; 3F81692F1ABB7A6D001DA9DF /* SystemInitializerCommon.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SystemInitializerCommon.cpp; path = source/Initialization/SystemInitializerCommon.cpp; sourceTree = ""; }; 3F8169301ABB7A6D001DA9DF /* SystemLifetimeManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SystemLifetimeManager.cpp; path = source/Initialization/SystemLifetimeManager.cpp; sourceTree = ""; }; 3F8169341ABB7A80001DA9DF /* SystemInitializer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SystemInitializer.h; path = include/lldb/Initialization/SystemInitializer.h; sourceTree = ""; }; 3F8169351ABB7A80001DA9DF /* SystemInitializerCommon.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SystemInitializerCommon.h; path = include/lldb/Initialization/SystemInitializerCommon.h; sourceTree = ""; }; 3F8169361ABB7A80001DA9DF /* SystemLifetimeManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SystemLifetimeManager.h; path = include/lldb/Initialization/SystemLifetimeManager.h; sourceTree = ""; }; 3FA093141BF65D3A0037DD08 /* PythonExceptionStateTests.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PythonExceptionStateTests.cpp; sourceTree = ""; }; 3FBA69DD1B6067020008F44A /* ScriptInterpreterNone.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ScriptInterpreterNone.cpp; path = ScriptInterpreter/None/ScriptInterpreterNone.cpp; sourceTree = ""; }; 3FBA69DE1B6067020008F44A /* ScriptInterpreterNone.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ScriptInterpreterNone.h; path = ScriptInterpreter/None/ScriptInterpreterNone.h; sourceTree = ""; }; 3FBA69E21B60672A0008F44A /* lldb-python.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "lldb-python.h"; path = "ScriptInterpreter/Python/lldb-python.h"; sourceTree = ""; }; 3FBA69E31B60672A0008F44A /* PythonDataObjects.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PythonDataObjects.cpp; path = ScriptInterpreter/Python/PythonDataObjects.cpp; sourceTree = ""; }; 3FBA69E41B60672A0008F44A /* PythonDataObjects.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PythonDataObjects.h; path = ScriptInterpreter/Python/PythonDataObjects.h; sourceTree = ""; }; 3FBA69E51B60672A0008F44A /* ScriptInterpreterPython.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ScriptInterpreterPython.cpp; path = ScriptInterpreter/Python/ScriptInterpreterPython.cpp; sourceTree = ""; }; 3FBA69E61B60672A0008F44A /* ScriptInterpreterPython.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ScriptInterpreterPython.h; path = ScriptInterpreter/Python/ScriptInterpreterPython.h; sourceTree = ""; }; 3FDFD6C3199C396E009756A7 /* FileAction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FileAction.h; path = include/lldb/Target/FileAction.h; sourceTree = ""; }; 3FDFDDBC199C3A06009756A7 /* FileAction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FileAction.cpp; path = source/Target/FileAction.cpp; sourceTree = ""; }; 3FDFDDBE199D345E009756A7 /* FileCache.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FileCache.cpp; path = source/Host/common/FileCache.cpp; sourceTree = ""; }; 3FDFDDC0199D34E2009756A7 /* FileCache.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FileCache.h; path = include/lldb/Host/FileCache.h; sourceTree = ""; }; 3FDFDDC1199D34E2009756A7 /* FileSystem.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FileSystem.h; path = include/lldb/Host/FileSystem.h; sourceTree = ""; }; 3FDFDDC5199D37ED009756A7 /* FileSystem.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FileSystem.cpp; sourceTree = ""; }; 3FDFE52B19A2917A009756A7 /* HostInfoMacOSX.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = HostInfoMacOSX.mm; path = source/Host/macosx/HostInfoMacOSX.mm; sourceTree = ""; }; 3FDFE52D19A291AF009756A7 /* HostInfoMacOSX.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HostInfoMacOSX.h; path = include/lldb/Host/macosx/HostInfoMacOSX.h; sourceTree = ""; }; 3FDFE53019A292F0009756A7 /* HostInfoPosix.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HostInfoPosix.cpp; sourceTree = ""; }; 3FDFE53219A29304009756A7 /* HostInfoPosix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HostInfoPosix.h; path = ../../../include/lldb/Host/posix/HostInfoPosix.h; sourceTree = ""; }; 3FDFE53419A29327009756A7 /* HostInfoBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HostInfoBase.cpp; sourceTree = ""; }; 3FDFE53619A2933E009756A7 /* HostInfoLinux.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = HostInfoLinux.cpp; sourceTree = ""; }; 3FDFE53719A2936B009756A7 /* HostInfo.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = HostInfo.h; path = include/lldb/Host/HostInfo.h; sourceTree = ""; }; 3FDFE53819A2936B009756A7 /* HostInfoBase.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = HostInfoBase.h; path = include/lldb/Host/HostInfoBase.h; sourceTree = ""; }; 3FDFE53B19A293B3009756A7 /* HostInfoFreeBSD.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = HostInfoFreeBSD.cpp; path = source/Host/freebsd/HostInfoFreeBSD.cpp; sourceTree = ""; }; 3FDFE53C19A293CA009756A7 /* Config.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = Config.h; path = include/lldb/Host/freebsd/Config.h; sourceTree = ""; }; 3FDFE53D19A293CA009756A7 /* HostInfoFreeBSD.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = HostInfoFreeBSD.h; path = include/lldb/Host/freebsd/HostInfoFreeBSD.h; sourceTree = ""; }; 3FDFE54019A29448009756A7 /* EditLineWin.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = EditLineWin.cpp; path = source/Host/windows/EditLineWin.cpp; sourceTree = ""; }; 3FDFE54119A29448009756A7 /* FileSystem.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = FileSystem.cpp; path = source/Host/windows/FileSystem.cpp; sourceTree = ""; }; 3FDFE54219A29448009756A7 /* Host.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = Host.cpp; path = source/Host/windows/Host.cpp; sourceTree = ""; }; 3FDFE54319A29448009756A7 /* HostInfoWindows.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = HostInfoWindows.cpp; path = source/Host/windows/HostInfoWindows.cpp; sourceTree = ""; }; 3FDFE54519A29448009756A7 /* ProcessRunLock.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = ProcessRunLock.cpp; path = source/Host/windows/ProcessRunLock.cpp; sourceTree = ""; }; 3FDFE54619A29448009756A7 /* Windows.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = Windows.cpp; path = source/Host/windows/Windows.cpp; sourceTree = ""; }; 3FDFE54719A2946B009756A7 /* AutoHandle.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = AutoHandle.h; path = include/lldb/Host/windows/AutoHandle.h; sourceTree = ""; }; 3FDFE54819A2946B009756A7 /* editlinewin.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = editlinewin.h; path = include/lldb/Host/windows/editlinewin.h; sourceTree = ""; }; 3FDFE54919A2946B009756A7 /* HostInfoWindows.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = HostInfoWindows.h; path = include/lldb/Host/windows/HostInfoWindows.h; sourceTree = ""; }; 3FDFE54A19A2946B009756A7 /* win32.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = win32.h; path = include/lldb/Host/windows/win32.h; sourceTree = ""; }; 3FDFE54B19A2946B009756A7 /* windows.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = windows.h; path = include/lldb/Host/windows/windows.h; sourceTree = ""; }; 3FDFE55E19AF9B14009756A7 /* Host.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = Host.cpp; path = source/Host/freebsd/Host.cpp; sourceTree = ""; }; 3FDFE55F19AF9B14009756A7 /* HostThreadFreeBSD.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = HostThreadFreeBSD.cpp; path = source/Host/freebsd/HostThreadFreeBSD.cpp; sourceTree = ""; }; 3FDFE56019AF9B39009756A7 /* HostThreadFreeBSD.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HostThreadFreeBSD.h; path = include/lldb/Host/freebsd/HostThreadFreeBSD.h; sourceTree = ""; }; 3FDFE56219AF9B60009756A7 /* HostThreadLinux.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = HostThreadLinux.cpp; sourceTree = ""; }; 3FDFE56319AF9B77009756A7 /* Config.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = Config.h; path = include/lldb/Host/linux/Config.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; }; 3FDFE56519AF9B77009756A7 /* HostThreadLinux.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = HostThreadLinux.h; path = include/lldb/Host/linux/HostThreadLinux.h; sourceTree = SOURCE_ROOT; }; 3FDFE56619AF9BB2009756A7 /* Config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Config.h; path = include/lldb/Host/macosx/Config.h; sourceTree = ""; }; 3FDFE56719AF9BB2009756A7 /* HostThreadMacOSX.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HostThreadMacOSX.h; path = include/lldb/Host/macosx/HostThreadMacOSX.h; sourceTree = ""; }; 3FDFE56A19AF9C44009756A7 /* HostProcessPosix.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HostProcessPosix.cpp; sourceTree = ""; }; 3FDFE56B19AF9C44009756A7 /* HostThreadPosix.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HostThreadPosix.cpp; sourceTree = ""; }; 3FDFE56E19AF9C5A009756A7 /* HostProcessPosix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HostProcessPosix.h; path = ../../../include/lldb/Host/posix/HostProcessPosix.h; sourceTree = ""; }; 3FDFE56F19AF9C5A009756A7 /* HostThreadPosix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HostThreadPosix.h; path = ../../../include/lldb/Host/posix/HostThreadPosix.h; sourceTree = ""; }; 3FDFE57019AF9CA0009756A7 /* HostProcessWindows.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = HostProcessWindows.cpp; path = source/Host/windows/HostProcessWindows.cpp; sourceTree = ""; }; 3FDFE57119AF9CA0009756A7 /* HostThreadWindows.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = HostThreadWindows.cpp; path = source/Host/windows/HostThreadWindows.cpp; sourceTree = ""; }; 3FDFE57219AF9CD3009756A7 /* HostProcessWindows.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = HostProcessWindows.h; path = include/lldb/Host/windows/HostProcessWindows.h; sourceTree = ""; }; 3FDFE57319AF9CD3009756A7 /* HostThreadWindows.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = HostThreadWindows.h; path = include/lldb/Host/windows/HostThreadWindows.h; sourceTree = ""; }; 3FDFE57419AFABFD009756A7 /* HostProcess.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = HostProcess.h; path = include/lldb/Host/HostProcess.h; sourceTree = ""; }; 3FDFE57519AFABFD009756A7 /* HostThread.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = HostThread.h; path = include/lldb/Host/HostThread.h; sourceTree = ""; }; 3FDFED0519B7C898009756A7 /* HostThreadMacOSX.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = HostThreadMacOSX.mm; path = source/Host/macosx/HostThreadMacOSX.mm; sourceTree = ""; }; 3FDFED1E19BA6D55009756A7 /* Debug.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = Debug.h; path = include/lldb/Host/Debug.h; sourceTree = ""; }; 3FDFED1F19BA6D55009756A7 /* HostGetOpt.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = HostGetOpt.h; path = include/lldb/Host/HostGetOpt.h; sourceTree = ""; }; 3FDFED2019BA6D55009756A7 /* HostNativeThread.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = HostNativeThread.h; path = include/lldb/Host/HostNativeThread.h; sourceTree = ""; }; 3FDFED2119BA6D55009756A7 /* HostNativeThreadBase.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = HostNativeThreadBase.h; path = include/lldb/Host/HostNativeThreadBase.h; sourceTree = ""; }; 3FDFED2219BA6D55009756A7 /* ProcessRunLock.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ProcessRunLock.h; path = include/lldb/Host/ProcessRunLock.h; sourceTree = ""; }; 3FDFED2319BA6D55009756A7 /* ThreadLauncher.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ThreadLauncher.h; path = include/lldb/Host/ThreadLauncher.h; sourceTree = ""; }; 3FDFED2419BA6D96009756A7 /* HostNativeThreadBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HostNativeThreadBase.cpp; sourceTree = ""; }; 3FDFED2519BA6D96009756A7 /* HostThread.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HostThread.cpp; sourceTree = ""; }; 3FDFED2619BA6D96009756A7 /* ThreadLauncher.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ThreadLauncher.cpp; sourceTree = ""; }; 3FDFED2C19C257A0009756A7 /* HostProcess.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HostProcess.cpp; sourceTree = ""; }; 4906FD4012F2255300A2A77C /* ASTDumper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ASTDumper.cpp; path = ExpressionParser/Clang/ASTDumper.cpp; sourceTree = ""; }; 4906FD4412F2257600A2A77C /* ASTDumper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ASTDumper.h; path = ExpressionParser/Clang/ASTDumper.h; sourceTree = ""; }; 490A36BD180F0E6F00BA31F8 /* PlatformWindows.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PlatformWindows.cpp; sourceTree = ""; }; 490A36BE180F0E6F00BA31F8 /* PlatformWindows.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformWindows.h; sourceTree = ""; }; 4911934B1226383D00578B7F /* ASTStructExtractor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ASTStructExtractor.h; path = ExpressionParser/Clang/ASTStructExtractor.h; sourceTree = ""; }; 491193501226386000578B7F /* ASTStructExtractor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ASTStructExtractor.cpp; path = ExpressionParser/Clang/ASTStructExtractor.cpp; sourceTree = ""; }; 49307AAD11DEA4D90081F992 /* IRForTarget.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = IRForTarget.cpp; path = ExpressionParser/Clang/IRForTarget.cpp; sourceTree = ""; }; 49307AB111DEA4F20081F992 /* IRForTarget.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IRForTarget.h; path = ExpressionParser/Clang/IRForTarget.h; sourceTree = ""; }; 4939EA8B1BD56B3700084382 /* REPL.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = REPL.h; path = include/lldb/Expression/REPL.h; sourceTree = ""; }; 4939EA8C1BD56B6D00084382 /* REPL.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = REPL.cpp; path = source/Expression/REPL.cpp; sourceTree = ""; }; 494260D7145790D5003C1C78 /* VerifyDecl.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = VerifyDecl.h; path = include/lldb/Symbol/VerifyDecl.h; sourceTree = ""; }; 494260D914579144003C1C78 /* VerifyDecl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = VerifyDecl.cpp; path = source/Symbol/VerifyDecl.cpp; sourceTree = ""; }; 49445C2512245E3600C11A81 /* ClangExpressionParser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ClangExpressionParser.cpp; path = ExpressionParser/Clang/ClangExpressionParser.cpp; sourceTree = ""; }; 49445C2912245E5500C11A81 /* ClangExpressionParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ClangExpressionParser.h; path = ExpressionParser/Clang/ClangExpressionParser.h; sourceTree = ""; }; 49445E341225AB6A00C11A81 /* ClangUserExpression.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ClangUserExpression.h; path = ExpressionParser/Clang/ClangUserExpression.h; sourceTree = ""; }; 4959511B1A1BC48100F6F8FC /* ClangModulesDeclVendor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ClangModulesDeclVendor.h; path = ExpressionParser/Clang/ClangModulesDeclVendor.h; sourceTree = ""; }; 4959511E1A1BC4BC00F6F8FC /* ClangModulesDeclVendor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ClangModulesDeclVendor.cpp; path = ExpressionParser/Clang/ClangModulesDeclVendor.cpp; sourceTree = ""; }; 495B38431489714C002708C5 /* ClangExternalASTSourceCommon.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ClangExternalASTSourceCommon.h; path = include/lldb/Symbol/ClangExternalASTSourceCommon.h; sourceTree = ""; }; 495BBACB119A0DBE00418BEA /* PathMappingList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PathMappingList.cpp; path = source/Target/PathMappingList.cpp; sourceTree = ""; }; 495BBACF119A0DE700418BEA /* PathMappingList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PathMappingList.h; path = include/lldb/Target/PathMappingList.h; sourceTree = ""; }; 4966DCC3148978A10028481B /* ClangExternalASTSourceCommon.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ClangExternalASTSourceCommon.cpp; path = source/Symbol/ClangExternalASTSourceCommon.cpp; sourceTree = ""; }; 496B01581406DE8900F830D5 /* IRInterpreter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = IRInterpreter.cpp; path = source/Expression/IRInterpreter.cpp; sourceTree = ""; }; 496B015A1406DEB100F830D5 /* IRInterpreter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IRInterpreter.h; path = include/lldb/Expression/IRInterpreter.h; sourceTree = ""; }; 497C86BD122823D800B54702 /* ClangUtilityFunction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ClangUtilityFunction.cpp; path = ExpressionParser/Clang/ClangUtilityFunction.cpp; sourceTree = ""; }; 497C86C1122823F300B54702 /* ClangUtilityFunction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ClangUtilityFunction.h; path = ExpressionParser/Clang/ClangUtilityFunction.h; sourceTree = ""; }; 497E7B331188ED300065CCA1 /* ABI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ABI.h; path = include/lldb/Target/ABI.h; sourceTree = ""; }; 497E7B9D1188F6690065CCA1 /* ABI.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ABI.cpp; path = source/Target/ABI.cpp; sourceTree = ""; }; 4984BA0E1B978C3E008658D4 /* ClangExpressionVariable.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ClangExpressionVariable.cpp; path = ExpressionParser/Clang/ClangExpressionVariable.cpp; sourceTree = ""; }; 4984BA0F1B978C3E008658D4 /* ClangExpressionVariable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ClangExpressionVariable.h; path = ExpressionParser/Clang/ClangExpressionVariable.h; sourceTree = ""; }; 4984BA151B979973008658D4 /* ExpressionVariable.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ExpressionVariable.cpp; path = source/Expression/ExpressionVariable.cpp; sourceTree = ""; }; 4984BA171B979C08008658D4 /* ExpressionVariable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ExpressionVariable.h; path = include/lldb/Expression/ExpressionVariable.h; sourceTree = ""; }; 499F381E11A5B3F300F5CE02 /* CommandObjectArgs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CommandObjectArgs.h; path = source/Commands/CommandObjectArgs.h; sourceTree = ""; }; 499F381F11A5B3F300F5CE02 /* CommandObjectArgs.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandObjectArgs.cpp; path = source/Commands/CommandObjectArgs.cpp; sourceTree = ""; }; 49A1CAC11430E21D00306AC9 /* ExpressionSourceCode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ExpressionSourceCode.h; path = include/lldb/Expression/ExpressionSourceCode.h; sourceTree = ""; }; 49A1CAC31430E8BD00306AC9 /* ExpressionSourceCode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ExpressionSourceCode.cpp; path = source/Expression/ExpressionSourceCode.cpp; sourceTree = ""; }; 49A8A39F11D568A300AD3B68 /* ASTResultSynthesizer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ASTResultSynthesizer.cpp; path = ExpressionParser/Clang/ASTResultSynthesizer.cpp; sourceTree = ""; }; 49A8A3A311D568BF00AD3B68 /* ASTResultSynthesizer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ASTResultSynthesizer.h; path = ExpressionParser/Clang/ASTResultSynthesizer.h; sourceTree = ""; }; 49B01A2D15F67B1700666829 /* DeclVendor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = DeclVendor.h; path = include/lldb/Symbol/DeclVendor.h; sourceTree = ""; }; 49BB309511F79450001A4197 /* TaggedASTType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TaggedASTType.h; path = include/lldb/Symbol/TaggedASTType.h; sourceTree = ""; }; 49C66B1C17011A43004D1922 /* IRMemoryMap.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = IRMemoryMap.h; path = include/lldb/Expression/IRMemoryMap.h; sourceTree = ""; }; 49CA96E61E6AAC6600C03FEE /* DataBufferHeap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DataBufferHeap.cpp; path = source/Utility/DataBufferHeap.cpp; sourceTree = ""; }; 49CA96E71E6AAC6600C03FEE /* DataBufferLLVM.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DataBufferLLVM.cpp; path = source/Utility/DataBufferLLVM.cpp; sourceTree = ""; }; 49CA96E81E6AAC6600C03FEE /* DataEncoder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DataEncoder.cpp; path = source/Utility/DataEncoder.cpp; sourceTree = ""; }; 49CA96E91E6AAC6600C03FEE /* DataExtractor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DataExtractor.cpp; path = source/Utility/DataExtractor.cpp; sourceTree = ""; }; 49CA96EA1E6AAC6600C03FEE /* UUID.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UUID.cpp; path = source/Utility/UUID.cpp; sourceTree = ""; }; 49CA96F01E6AAC8E00C03FEE /* DataBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DataBuffer.h; path = include/lldb/Utility/DataBuffer.h; sourceTree = ""; }; 49CA96F11E6AAC8E00C03FEE /* DataBufferHeap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DataBufferHeap.h; path = include/lldb/Utility/DataBufferHeap.h; sourceTree = ""; }; 49CA96F21E6AAC8E00C03FEE /* DataBufferLLVM.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DataBufferLLVM.h; path = include/lldb/Utility/DataBufferLLVM.h; sourceTree = ""; }; 49CA96F31E6AAC8E00C03FEE /* DataEncoder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DataEncoder.h; path = include/lldb/Utility/DataEncoder.h; sourceTree = ""; }; 49CA96F41E6AAC8E00C03FEE /* DataExtractor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DataExtractor.h; path = include/lldb/Utility/DataExtractor.h; sourceTree = ""; }; 49CA96F51E6AAC8E00C03FEE /* UUID.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UUID.h; path = include/lldb/Utility/UUID.h; sourceTree = ""; }; 49CF9829122C70BD007A0B96 /* IRDynamicChecks.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = IRDynamicChecks.cpp; path = source/Expression/IRDynamicChecks.cpp; sourceTree = ""; }; 49CF9833122C718B007A0B96 /* IRDynamicChecks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IRDynamicChecks.h; path = include/lldb/Expression/IRDynamicChecks.h; sourceTree = ""; }; 49D4FE821210B5FB00CDB854 /* ClangPersistentVariables.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ClangPersistentVariables.h; path = ExpressionParser/Clang/ClangPersistentVariables.h; sourceTree = ""; }; 49D4FE871210B61C00CDB854 /* ClangPersistentVariables.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ClangPersistentVariables.cpp; path = ExpressionParser/Clang/ClangPersistentVariables.cpp; sourceTree = ""; }; 49D7072611B5AD03001AD875 /* ClangASTSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ClangASTSource.h; path = ExpressionParser/Clang/ClangASTSource.h; sourceTree = ""; }; 49D7072811B5AD11001AD875 /* ClangASTSource.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ClangASTSource.cpp; path = ExpressionParser/Clang/ClangASTSource.cpp; sourceTree = ""; }; 49D8FB3513B558DE00411094 /* ClangASTImporter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ClangASTImporter.cpp; path = source/Symbol/ClangASTImporter.cpp; sourceTree = ""; }; 49D8FB3713B5594900411094 /* ClangASTImporter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ClangASTImporter.h; path = include/lldb/Symbol/ClangASTImporter.h; sourceTree = ""; }; 49DA65021485C92A005FF180 /* AppleObjCDeclVendor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = AppleObjCDeclVendor.cpp; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.cpp; }; 49DA65041485C942005FF180 /* AppleObjCDeclVendor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppleObjCDeclVendor.h; sourceTree = ""; }; 49DCF6FD170E6B4A0092F75E /* IRMemoryMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = IRMemoryMap.cpp; path = source/Expression/IRMemoryMap.cpp; sourceTree = ""; }; 49DCF6FF170E6FD90092F75E /* Materializer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = Materializer.h; path = include/lldb/Expression/Materializer.h; sourceTree = ""; }; 49DCF700170E70120092F75E /* Materializer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Materializer.cpp; path = source/Expression/Materializer.cpp; sourceTree = ""; }; 49DEF11F1CD7BD90006A7C7D /* BlockPointer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BlockPointer.cpp; path = Language/CPlusPlus/BlockPointer.cpp; sourceTree = ""; }; 49DEF1201CD7BD90006A7C7D /* BlockPointer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BlockPointer.h; path = Language/CPlusPlus/BlockPointer.h; sourceTree = ""; }; 49E45FA911F660DC008F7B28 /* CompilerType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CompilerType.h; path = include/lldb/Symbol/CompilerType.h; sourceTree = ""; }; 49E45FAD11F660FE008F7B28 /* CompilerType.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CompilerType.cpp; path = source/Symbol/CompilerType.cpp; sourceTree = ""; }; 49E4F6681C9CAD12008487EA /* DiagnosticManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DiagnosticManager.cpp; path = source/Expression/DiagnosticManager.cpp; sourceTree = ""; }; 49E4F66C1C9CAD2D008487EA /* DiagnosticManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DiagnosticManager.h; path = include/lldb/Expression/DiagnosticManager.h; sourceTree = ""; }; 49EC3E98118F90AC00B1265E /* ThreadPlanCallFunction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ThreadPlanCallFunction.cpp; path = source/Target/ThreadPlanCallFunction.cpp; sourceTree = ""; }; 49EC3E9C118F90D400B1265E /* ThreadPlanCallFunction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ThreadPlanCallFunction.h; path = include/lldb/Target/ThreadPlanCallFunction.h; sourceTree = ""; }; 49F1A74511B3388F003ED505 /* ClangExpressionDeclMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ClangExpressionDeclMap.cpp; path = ExpressionParser/Clang/ClangExpressionDeclMap.cpp; sourceTree = ""; }; 49F1A74911B338AE003ED505 /* ClangExpressionDeclMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ClangExpressionDeclMap.h; path = ExpressionParser/Clang/ClangExpressionDeclMap.h; sourceTree = ""; }; 49F811EF1E931B1500F4E163 /* CPlusPlusNameParser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CPlusPlusNameParser.cpp; path = Language/CPlusPlus/CPlusPlusNameParser.cpp; sourceTree = ""; }; 49F811F01E931B1500F4E163 /* CPlusPlusNameParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CPlusPlusNameParser.h; path = Language/CPlusPlus/CPlusPlusNameParser.h; sourceTree = ""; }; 4C00832C1B9A58A700D5CF24 /* Expression.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Expression.h; path = include/lldb/Expression/Expression.h; sourceTree = ""; }; 4C00832D1B9A58A700D5CF24 /* FunctionCaller.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FunctionCaller.h; path = include/lldb/Expression/FunctionCaller.h; sourceTree = ""; }; 4C00832E1B9A58A700D5CF24 /* UserExpression.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UserExpression.h; path = include/lldb/Expression/UserExpression.h; sourceTree = ""; }; 4C0083321B9A5DE200D5CF24 /* FunctionCaller.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FunctionCaller.cpp; path = source/Expression/FunctionCaller.cpp; sourceTree = ""; }; 4C0083331B9A5DE200D5CF24 /* UserExpression.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UserExpression.cpp; path = source/Expression/UserExpression.cpp; sourceTree = ""; }; 4C00833D1B9F9B8400D5CF24 /* UtilityFunction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UtilityFunction.h; path = include/lldb/Expression/UtilityFunction.h; sourceTree = ""; }; 4C00833F1B9F9BA900D5CF24 /* UtilityFunction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UtilityFunction.cpp; path = source/Expression/UtilityFunction.cpp; sourceTree = ""; }; 4C00986F11500B4300F316B0 /* UnixSignals.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UnixSignals.h; path = include/lldb/Target/UnixSignals.h; sourceTree = ""; }; 4C00987011500B4300F316B0 /* UnixSignals.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UnixSignals.cpp; path = source/Target/UnixSignals.cpp; sourceTree = ""; }; 4C08CDE711C81EF8001610A8 /* ThreadSpec.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ThreadSpec.cpp; path = source/Target/ThreadSpec.cpp; sourceTree = ""; }; 4C08CDEB11C81F1E001610A8 /* ThreadSpec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ThreadSpec.h; path = include/lldb/Target/ThreadSpec.h; sourceTree = ""; }; 4C09CB73116BD98B00C7A725 /* CommandCompletions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CommandCompletions.h; path = include/lldb/Interpreter/CommandCompletions.h; sourceTree = ""; }; 4C09CB74116BD98B00C7A725 /* CommandCompletions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandCompletions.cpp; path = source/Commands/CommandCompletions.cpp; sourceTree = ""; }; 4C2479BE1BA39843009C9A7B /* ExpressionParser.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ExpressionParser.h; path = include/lldb/Expression/ExpressionParser.h; sourceTree = ""; }; 4C29E77D1BA2403F00DFF855 /* ExpressionTypeSystemHelper.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; name = ExpressionTypeSystemHelper.h; path = include/lldb/Expression/ExpressionTypeSystemHelper.h; sourceTree = ""; }; 4C2FAE2E135E3A70001EDE44 /* SharedCluster.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SharedCluster.h; path = include/lldb/Utility/SharedCluster.h; sourceTree = ""; }; 4C3DA2301CA0BFB800CEB1D4 /* ClangDiagnostic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ClangDiagnostic.h; path = ExpressionParser/Clang/ClangDiagnostic.h; sourceTree = ""; }; 4C43DEF9110641F300E55CBF /* ThreadPlanShouldStopHere.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ThreadPlanShouldStopHere.h; path = include/lldb/Target/ThreadPlanShouldStopHere.h; sourceTree = ""; }; 4C43DEFA110641F300E55CBF /* ThreadPlanShouldStopHere.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ThreadPlanShouldStopHere.cpp; path = source/Target/ThreadPlanShouldStopHere.cpp; sourceTree = ""; }; 4C43DF8511069BFD00E55CBF /* ThreadPlanStepInRange.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ThreadPlanStepInRange.h; path = include/lldb/Target/ThreadPlanStepInRange.h; sourceTree = ""; }; 4C43DF8611069BFD00E55CBF /* ThreadPlanStepOverRange.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ThreadPlanStepOverRange.h; path = include/lldb/Target/ThreadPlanStepOverRange.h; sourceTree = ""; }; 4C43DF8911069C3200E55CBF /* ThreadPlanStepInRange.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ThreadPlanStepInRange.cpp; path = source/Target/ThreadPlanStepInRange.cpp; sourceTree = ""; }; 4C43DF8A11069C3200E55CBF /* ThreadPlanStepOverRange.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ThreadPlanStepOverRange.cpp; path = source/Target/ThreadPlanStepOverRange.cpp; sourceTree = ""; }; 4C4EB77F1E6A4DB8002035C0 /* DumpDataExtractor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DumpDataExtractor.cpp; path = source/Core/DumpDataExtractor.cpp; sourceTree = ""; }; 4C4EB7821E6A4DE7002035C0 /* DumpDataExtractor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DumpDataExtractor.h; path = include/lldb/Core/DumpDataExtractor.h; sourceTree = ""; }; 4C562CC21CC07DDD00C52EAC /* PDBASTParser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PDBASTParser.cpp; path = PDB/PDBASTParser.cpp; sourceTree = ""; }; 4C562CC31CC07DDD00C52EAC /* PDBASTParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PDBASTParser.h; path = PDB/PDBASTParser.h; sourceTree = ""; }; 4C56543019D1EFAA002E9C44 /* ThreadPlanPython.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ThreadPlanPython.cpp; path = source/Target/ThreadPlanPython.cpp; sourceTree = ""; }; 4C56543219D1EFB5002E9C44 /* ThreadPlanPython.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ThreadPlanPython.h; path = include/lldb/Target/ThreadPlanPython.h; sourceTree = ""; }; 4C56543419D2297A002E9C44 /* SBThreadPlan.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBThreadPlan.h; path = include/lldb/API/SBThreadPlan.h; sourceTree = ""; }; 4C56543619D22B32002E9C44 /* SBThreadPlan.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBThreadPlan.cpp; path = source/API/SBThreadPlan.cpp; sourceTree = ""; }; 4C56543819D22FD9002E9C44 /* SBThreadPlan.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBThreadPlan.i; sourceTree = ""; }; 4C5DBBC611E3FEC60035160F /* CommandObjectCommands.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandObjectCommands.cpp; path = source/Commands/CommandObjectCommands.cpp; sourceTree = ""; }; 4C5DBBC711E3FEC60035160F /* CommandObjectCommands.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CommandObjectCommands.h; path = source/Commands/CommandObjectCommands.h; sourceTree = ""; }; 4C73152119B7D71700F865A4 /* Iterable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Iterable.h; path = include/lldb/Utility/Iterable.h; sourceTree = ""; }; 4C7CF7E31295E10E00B4FBB5 /* ThreadPlanCallUserExpression.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ThreadPlanCallUserExpression.h; path = include/lldb/Target/ThreadPlanCallUserExpression.h; sourceTree = ""; }; 4C7CF7E51295E12B00B4FBB5 /* ThreadPlanCallUserExpression.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ThreadPlanCallUserExpression.cpp; path = source/Target/ThreadPlanCallUserExpression.cpp; sourceTree = ""; }; 4C88BC291BA3722B00AA0964 /* Expression.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Expression.cpp; path = source/Expression/Expression.cpp; sourceTree = ""; }; 4C98D3DA118FB96F00E575D0 /* ClangFunctionCaller.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ClangFunctionCaller.cpp; path = ExpressionParser/Clang/ClangFunctionCaller.cpp; sourceTree = ""; }; 4C98D3DB118FB96F00E575D0 /* IRExecutionUnit.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = IRExecutionUnit.cpp; path = source/Expression/IRExecutionUnit.cpp; sourceTree = ""; }; 4C98D3E0118FB98F00E575D0 /* ClangFunctionCaller.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ClangFunctionCaller.h; path = ExpressionParser/Clang/ClangFunctionCaller.h; sourceTree = ""; }; 4C98D3E1118FB98F00E575D0 /* IRExecutionUnit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IRExecutionUnit.h; path = include/lldb/Expression/IRExecutionUnit.h; sourceTree = ""; }; 4CA9637911B6E99A00780E28 /* CommandObjectApropos.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandObjectApropos.cpp; path = source/Commands/CommandObjectApropos.cpp; sourceTree = ""; }; 4CA9637A11B6E99A00780E28 /* CommandObjectApropos.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CommandObjectApropos.h; path = source/Commands/CommandObjectApropos.h; sourceTree = ""; }; 4CAA56121422D96A001FFA01 /* BreakpointResolverFileRegex.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BreakpointResolverFileRegex.h; path = include/lldb/Breakpoint/BreakpointResolverFileRegex.h; sourceTree = ""; }; 4CAA56141422D986001FFA01 /* BreakpointResolverFileRegex.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BreakpointResolverFileRegex.cpp; path = source/Breakpoint/BreakpointResolverFileRegex.cpp; sourceTree = ""; }; 4CAB257C18EC9DB800BAD33E /* SafeMachO.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SafeMachO.h; path = include/lldb/Utility/SafeMachO.h; sourceTree = ""; }; 4CABA9DC134A8BA700539BDD /* ValueObjectMemory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ValueObjectMemory.h; path = include/lldb/Core/ValueObjectMemory.h; sourceTree = ""; }; 4CABA9DF134A8BCD00539BDD /* ValueObjectMemory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ValueObjectMemory.cpp; path = source/Core/ValueObjectMemory.cpp; sourceTree = ""; }; 4CAFCE001101216B00CA63DB /* ThreadPlanRunToAddress.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ThreadPlanRunToAddress.h; path = include/lldb/Target/ThreadPlanRunToAddress.h; sourceTree = ""; }; 4CAFCE031101218900CA63DB /* ThreadPlanRunToAddress.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ThreadPlanRunToAddress.cpp; path = source/Target/ThreadPlanRunToAddress.cpp; sourceTree = ""; }; 4CB4430912491DDA00C13DC2 /* LanguageRuntime.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LanguageRuntime.h; path = include/lldb/Target/LanguageRuntime.h; sourceTree = ""; }; 4CB4430A12491DDA00C13DC2 /* LanguageRuntime.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LanguageRuntime.cpp; path = source/Target/LanguageRuntime.cpp; sourceTree = ""; }; 4CB443BB1249920C00C13DC2 /* CPPLanguageRuntime.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CPPLanguageRuntime.h; path = include/lldb/Target/CPPLanguageRuntime.h; sourceTree = ""; }; 4CB443BC1249920C00C13DC2 /* CPPLanguageRuntime.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CPPLanguageRuntime.cpp; path = source/Target/CPPLanguageRuntime.cpp; sourceTree = ""; }; 4CB443F212499B5000C13DC2 /* ObjCLanguageRuntime.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ObjCLanguageRuntime.cpp; path = source/Target/ObjCLanguageRuntime.cpp; sourceTree = ""; }; 4CB443F612499B6E00C13DC2 /* ObjCLanguageRuntime.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ObjCLanguageRuntime.h; path = include/lldb/Target/ObjCLanguageRuntime.h; sourceTree = ""; }; 4CC2A148128C73ED001531C4 /* ThreadPlanTracer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ThreadPlanTracer.cpp; path = source/Target/ThreadPlanTracer.cpp; sourceTree = ""; }; 4CC2A14C128C7409001531C4 /* ThreadPlanTracer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ThreadPlanTracer.h; path = include/lldb/Target/ThreadPlanTracer.h; sourceTree = ""; }; 4CC7C64C1D5298E20076FF94 /* OCamlLanguage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OCamlLanguage.h; path = Language/OCaml/OCamlLanguage.h; sourceTree = ""; }; 4CC7C64D1D5298E20076FF94 /* OCamlLanguage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OCamlLanguage.cpp; path = Language/OCaml/OCamlLanguage.cpp; sourceTree = ""; }; 4CC7C6511D5299140076FF94 /* DWARFASTParserOCaml.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DWARFASTParserOCaml.h; sourceTree = ""; }; 4CC7C6521D5299140076FF94 /* DWARFASTParserOCaml.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DWARFASTParserOCaml.cpp; sourceTree = ""; }; 4CC7C6551D52996C0076FF94 /* OCamlASTContext.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OCamlASTContext.cpp; path = source/Symbol/OCamlASTContext.cpp; sourceTree = ""; }; 4CCA643D13B40B82003BDF98 /* ItaniumABILanguageRuntime.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ItaniumABILanguageRuntime.cpp; sourceTree = ""; }; 4CCA643E13B40B82003BDF98 /* ItaniumABILanguageRuntime.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ItaniumABILanguageRuntime.h; sourceTree = ""; }; 4CCA644213B40B82003BDF98 /* AppleObjCRuntime.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AppleObjCRuntime.cpp; sourceTree = ""; }; 4CCA644313B40B82003BDF98 /* AppleObjCRuntime.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppleObjCRuntime.h; sourceTree = ""; }; 4CCA644413B40B82003BDF98 /* AppleObjCRuntimeV1.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = AppleObjCRuntimeV1.cpp; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.cpp; }; 4CCA644513B40B82003BDF98 /* AppleObjCRuntimeV1.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = AppleObjCRuntimeV1.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; 4CCA644613B40B82003BDF98 /* AppleObjCRuntimeV2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = AppleObjCRuntimeV2.cpp; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.cpp; }; 4CCA644713B40B82003BDF98 /* AppleObjCRuntimeV2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = AppleObjCRuntimeV2.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; 4CCA644813B40B82003BDF98 /* AppleObjCTrampolineHandler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AppleObjCTrampolineHandler.cpp; sourceTree = ""; }; 4CCA644913B40B82003BDF98 /* AppleObjCTrampolineHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppleObjCTrampolineHandler.h; sourceTree = ""; }; 4CCA644A13B40B82003BDF98 /* AppleThreadPlanStepThroughObjCTrampoline.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AppleThreadPlanStepThroughObjCTrampoline.cpp; sourceTree = ""; }; 4CCA644B13B40B82003BDF98 /* AppleThreadPlanStepThroughObjCTrampoline.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppleThreadPlanStepThroughObjCTrampoline.h; sourceTree = ""; }; 4CD0BD0C134BFAB600CB44D4 /* ValueObjectDynamicValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ValueObjectDynamicValue.h; path = include/lldb/Core/ValueObjectDynamicValue.h; sourceTree = ""; }; 4CD0BD0E134BFADF00CB44D4 /* ValueObjectDynamicValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ValueObjectDynamicValue.cpp; path = source/Core/ValueObjectDynamicValue.cpp; sourceTree = ""; }; 4CDB8D671DBA91A6006C5B13 /* LibStdcppUniquePointer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LibStdcppUniquePointer.cpp; path = Language/CPlusPlus/LibStdcppUniquePointer.cpp; sourceTree = ""; }; 4CDB8D681DBA91A6006C5B13 /* LibStdcppTuple.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LibStdcppTuple.cpp; path = Language/CPlusPlus/LibStdcppTuple.cpp; sourceTree = ""; }; 4CE4EFA61E8999B000A80C06 /* PlatformOpenBSD.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PlatformOpenBSD.cpp; sourceTree = ""; }; 4CE4EFA71E8999B000A80C06 /* PlatformOpenBSD.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformOpenBSD.h; sourceTree = ""; }; 4CE4EFAB1E899A1200A80C06 /* RegisterContextOpenBSD_i386.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegisterContextOpenBSD_i386.cpp; path = Utility/RegisterContextOpenBSD_i386.cpp; sourceTree = ""; }; 4CE4EFAC1E899A1200A80C06 /* RegisterContextOpenBSD_i386.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterContextOpenBSD_i386.h; path = Utility/RegisterContextOpenBSD_i386.h; sourceTree = ""; }; 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 = ""; }; 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 = ""; }; 4CE4F672162C971A00F75CB3 /* SBExpressionOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBExpressionOptions.h; path = include/lldb/API/SBExpressionOptions.h; sourceTree = ""; }; 4CE4F674162C973F00F75CB3 /* SBExpressionOptions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBExpressionOptions.cpp; path = source/API/SBExpressionOptions.cpp; sourceTree = ""; }; 4CE4F676162CE1E100F75CB3 /* SBExpressionOptions.i */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBExpressionOptions.i; sourceTree = ""; }; 4CEDAED311754F5E00E875A6 /* ThreadPlanStepUntil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ThreadPlanStepUntil.h; path = include/lldb/Target/ThreadPlanStepUntil.h; sourceTree = ""; }; 4CF52AF41428291E0051E832 /* SBFileSpecList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBFileSpecList.h; path = include/lldb/API/SBFileSpecList.h; sourceTree = ""; }; 4CF52AF7142829390051E832 /* SBFileSpecList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBFileSpecList.cpp; path = source/API/SBFileSpecList.cpp; sourceTree = ""; }; 69A01E1C1236C5D400C660B5 /* Host.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Host.cpp; sourceTree = ""; }; 69A01E1F1236C5D400C660B5 /* Symbols.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Symbols.cpp; sourceTree = ""; }; 6D0F613C1C80AA8900A4ECEE /* DebugMacros.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DebugMacros.h; path = include/lldb/Symbol/DebugMacros.h; sourceTree = ""; }; 6D0F613D1C80AA8900A4ECEE /* JavaASTContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JavaASTContext.h; path = include/lldb/Symbol/JavaASTContext.h; sourceTree = ""; }; 6D0F61411C80AAAA00A4ECEE /* JavaASTContext.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JavaASTContext.cpp; path = source/Symbol/JavaASTContext.cpp; sourceTree = ""; }; 6D0F61441C80AACF00A4ECEE /* DWARFASTParserJava.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DWARFASTParserJava.cpp; sourceTree = ""; }; 6D0F61451C80AACF00A4ECEE /* DWARFASTParserJava.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DWARFASTParserJava.h; sourceTree = ""; }; 6D0F614A1C80AB0400A4ECEE /* JavaLanguageRuntime.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JavaLanguageRuntime.cpp; path = Java/JavaLanguageRuntime.cpp; sourceTree = ""; }; 6D0F614B1C80AB0400A4ECEE /* JavaLanguageRuntime.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JavaLanguageRuntime.h; path = Java/JavaLanguageRuntime.h; sourceTree = ""; }; 6D0F61511C80AB3000A4ECEE /* JavaFormatterFunctions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JavaFormatterFunctions.cpp; path = Language/Java/JavaFormatterFunctions.cpp; sourceTree = ""; }; 6D0F61521C80AB3000A4ECEE /* JavaFormatterFunctions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JavaFormatterFunctions.h; path = Language/Java/JavaFormatterFunctions.h; sourceTree = ""; }; 6D0F61531C80AB3000A4ECEE /* JavaLanguage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JavaLanguage.cpp; path = Language/Java/JavaLanguage.cpp; sourceTree = ""; }; 6D0F61541C80AB3000A4ECEE /* JavaLanguage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JavaLanguage.h; path = Language/Java/JavaLanguage.h; sourceTree = ""; }; 6D55B28D1A8A806200A70529 /* GDBRemoteCommunicationServerCommon.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GDBRemoteCommunicationServerCommon.cpp; sourceTree = ""; }; 6D55B28E1A8A806200A70529 /* GDBRemoteCommunicationServerLLGS.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GDBRemoteCommunicationServerLLGS.cpp; sourceTree = ""; }; 6D55B28F1A8A806200A70529 /* GDBRemoteCommunicationServerPlatform.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GDBRemoteCommunicationServerPlatform.cpp; sourceTree = ""; }; 6D55B2931A8A808400A70529 /* GDBRemoteCommunicationServerCommon.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GDBRemoteCommunicationServerCommon.h; sourceTree = ""; }; 6D55B2941A8A808400A70529 /* GDBRemoteCommunicationServerLLGS.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GDBRemoteCommunicationServerLLGS.h; sourceTree = ""; }; 6D55B2951A8A808400A70529 /* GDBRemoteCommunicationServerPlatform.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GDBRemoteCommunicationServerPlatform.h; sourceTree = ""; }; 6D55BAE01A8CD03D00A70529 /* HostInfoAndroid.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = HostInfoAndroid.cpp; path = source/Host/android/HostInfoAndroid.cpp; sourceTree = ""; }; 6D55BAE21A8CD06000A70529 /* Android.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = Android.h; path = include/lldb/Host/android/Android.h; sourceTree = ""; }; 6D55BAE31A8CD06000A70529 /* Config.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = Config.h; path = include/lldb/Host/android/Config.h; sourceTree = ""; }; 6D55BAE41A8CD06000A70529 /* HostInfoAndroid.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = HostInfoAndroid.h; path = include/lldb/Host/android/HostInfoAndroid.h; sourceTree = ""; }; 6D55BAE91A8CD08C00A70529 /* PlatformAndroid.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = PlatformAndroid.cpp; sourceTree = ""; }; 6D55BAEA1A8CD08C00A70529 /* PlatformAndroid.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PlatformAndroid.h; sourceTree = ""; }; 6D55BAEB1A8CD08C00A70529 /* PlatformAndroidRemoteGDBServer.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = PlatformAndroidRemoteGDBServer.cpp; sourceTree = ""; }; 6D55BAEC1A8CD08C00A70529 /* PlatformAndroidRemoteGDBServer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PlatformAndroidRemoteGDBServer.h; sourceTree = ""; }; 6D762BEC1B1605CD006C929D /* LLDBServerUtilities.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = LLDBServerUtilities.cpp; path = "tools/lldb-server/LLDBServerUtilities.cpp"; sourceTree = ""; }; 6D762BED1B1605CD006C929D /* LLDBServerUtilities.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = LLDBServerUtilities.h; path = "tools/lldb-server/LLDBServerUtilities.h"; sourceTree = ""; }; 6D86CE9E1B440F6B00A7FBFA /* CommandObjectBugreport.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = CommandObjectBugreport.cpp; path = source/Commands/CommandObjectBugreport.cpp; sourceTree = ""; }; 6D86CE9F1B440F6B00A7FBFA /* CommandObjectBugreport.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CommandObjectBugreport.h; path = source/Commands/CommandObjectBugreport.h; sourceTree = ""; }; 6D95DBFD1B9DC057000E318A /* DIERef.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DIERef.cpp; sourceTree = ""; }; 6D95DBFE1B9DC057000E318A /* HashedNameToDIE.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HashedNameToDIE.cpp; sourceTree = ""; }; 6D95DBFF1B9DC057000E318A /* SymbolFileDWARFDwo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SymbolFileDWARFDwo.cpp; sourceTree = ""; }; 6D95DC031B9DC06F000E318A /* DIERef.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DIERef.h; sourceTree = ""; }; 6D95DC041B9DC06F000E318A /* SymbolFileDWARFDwo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SymbolFileDWARFDwo.h; sourceTree = ""; }; 6D99A3611BBC2F1600979793 /* ArmUnwindInfo.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ArmUnwindInfo.h; path = include/lldb/Symbol/ArmUnwindInfo.h; sourceTree = ""; }; 6D99A3621BBC2F3200979793 /* ArmUnwindInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ArmUnwindInfo.cpp; path = source/Symbol/ArmUnwindInfo.cpp; sourceTree = ""; }; 6D9AB3DC1BB2B74E003F2289 /* TypeMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TypeMap.cpp; path = source/Symbol/TypeMap.cpp; sourceTree = ""; }; 6D9AB3DE1BB2B76B003F2289 /* TypeMap.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = TypeMap.h; path = include/lldb/Symbol/TypeMap.h; sourceTree = ""; }; 6DEC6F381BD66D750091ABA6 /* TaskPool.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TaskPool.cpp; path = source/Utility/TaskPool.cpp; sourceTree = ""; }; 6DEC6F3A1BD66D950091ABA6 /* TaskPool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TaskPool.h; path = include/lldb/Utility/TaskPool.h; sourceTree = ""; }; 8C26C4241C3EA4340031DF7C /* ThreadSanitizerRuntime.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = ThreadSanitizerRuntime.cpp; path = ThreadSanitizer/ThreadSanitizerRuntime.cpp; sourceTree = ""; }; 8C26C4251C3EA4340031DF7C /* ThreadSanitizerRuntime.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ThreadSanitizerRuntime.h; path = ThreadSanitizer/ThreadSanitizerRuntime.h; sourceTree = ""; }; 8C2D6A52197A1EAF006989C9 /* MemoryHistory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MemoryHistory.cpp; path = source/Target/MemoryHistory.cpp; sourceTree = ""; }; 8C2D6A54197A1EBE006989C9 /* MemoryHistory.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = MemoryHistory.h; path = include/lldb/Target/MemoryHistory.h; sourceTree = ""; }; 8C2D6A5A197A1FDC006989C9 /* MemoryHistoryASan.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MemoryHistoryASan.cpp; sourceTree = ""; }; 8C2D6A5B197A1FDC006989C9 /* MemoryHistoryASan.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MemoryHistoryASan.h; sourceTree = ""; }; 8CCB017A19BA283D0009FD44 /* ThreadCollection.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ThreadCollection.cpp; path = source/Target/ThreadCollection.cpp; sourceTree = ""; }; 8CCB017C19BA289B0009FD44 /* ThreadCollection.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ThreadCollection.h; path = include/lldb/Target/ThreadCollection.h; sourceTree = ""; }; 8CCB017F19BA4DD00009FD44 /* SBThreadCollection.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = SBThreadCollection.cpp; path = source/API/SBThreadCollection.cpp; sourceTree = ""; }; 8CCB018119BA4E210009FD44 /* SBThreadCollection.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SBThreadCollection.h; path = include/lldb/API/SBThreadCollection.h; sourceTree = ""; }; 8CCB018419BA54930009FD44 /* SBThreadCollection.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBThreadCollection.i; sourceTree = ""; }; 8CF02ADF19DCBF3B00B14BE0 /* InstrumentationRuntime.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = InstrumentationRuntime.cpp; path = source/Target/InstrumentationRuntime.cpp; sourceTree = ""; }; 8CF02AE019DCBF3B00B14BE0 /* InstrumentationRuntime.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = InstrumentationRuntime.h; path = include/lldb/Target/InstrumentationRuntime.h; sourceTree = ""; }; 8CF02AE519DCBF8400B14BE0 /* AddressSanitizerRuntime.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AddressSanitizerRuntime.cpp; sourceTree = ""; }; 8CF02AE619DCBF8400B14BE0 /* AddressSanitizerRuntime.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AddressSanitizerRuntime.h; sourceTree = ""; }; 8CF02AED19DD15CF00B14BE0 /* InstrumentationRuntimeStopInfo.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = InstrumentationRuntimeStopInfo.cpp; path = source/Target/InstrumentationRuntimeStopInfo.cpp; sourceTree = ""; }; 8CF02AEE19DD15CF00B14BE0 /* InstrumentationRuntimeStopInfo.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = InstrumentationRuntimeStopInfo.h; path = include/lldb/Target/InstrumentationRuntimeStopInfo.h; sourceTree = ""; }; 94005E0313F438DF001EF42D /* python-wrapper.swig */ = {isa = PBXFileReference; lastKnownFileType = text; path = "python-wrapper.swig"; sourceTree = ""; }; 94005E0513F45A1B001EF42D /* embedded_interpreter.py */ = {isa = PBXFileReference; lastKnownFileType = text.script.python; name = embedded_interpreter.py; path = source/Interpreter/embedded_interpreter.py; sourceTree = ""; }; 940495781BEC497E00926025 /* NSError.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = NSError.cpp; path = Language/ObjC/NSError.cpp; sourceTree = ""; }; 940495791BEC497E00926025 /* NSException.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = NSException.cpp; path = Language/ObjC/NSException.cpp; sourceTree = ""; }; 94094C68163B6CCC0083A547 /* ValueObjectCast.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ValueObjectCast.h; path = include/lldb/Core/ValueObjectCast.h; sourceTree = ""; }; 94094C69163B6CD90083A547 /* ValueObjectCast.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ValueObjectCast.cpp; path = source/Core/ValueObjectCast.cpp; sourceTree = ""; }; 940B01FE1D2D82220058795E /* ThreadSafeSTLVector.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ThreadSafeSTLVector.h; path = include/lldb/Core/ThreadSafeSTLVector.h; sourceTree = ""; }; 940B02F419DC96CB00AD0F52 /* SBExecutionContext.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SBExecutionContext.h; path = include/lldb/API/SBExecutionContext.h; sourceTree = ""; }; 940B02F519DC96E700AD0F52 /* SBExecutionContext.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBExecutionContext.cpp; path = source/API/SBExecutionContext.cpp; sourceTree = ""; }; 940B02F719DC970900AD0F52 /* SBExecutionContext.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBExecutionContext.i; sourceTree = ""; }; 940B04D81A8984FF0045D5F7 /* argdumper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = argdumper.cpp; path = tools/argdumper/argdumper.cpp; sourceTree = ""; }; 94145430175D7FDE00284436 /* lldb-versioning.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "lldb-versioning.h"; path = "include/lldb/lldb-versioning.h"; sourceTree = ""; }; 9418EBCB1AA9108B0058B02E /* VectorType.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = VectorType.h; path = include/lldb/DataFormatters/VectorType.h; sourceTree = ""; }; 9418EBCC1AA910910058B02E /* VectorType.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = VectorType.cpp; path = source/DataFormatters/VectorType.cpp; sourceTree = ""; }; 94235B9A1A8D5FD800EB2EED /* SBVariablesOptions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SBVariablesOptions.h; path = include/lldb/API/SBVariablesOptions.h; sourceTree = ""; }; 94235B9B1A8D5FF300EB2EED /* SBVariablesOptions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBVariablesOptions.cpp; path = source/API/SBVariablesOptions.cpp; sourceTree = ""; }; 94235B9D1A8D601A00EB2EED /* SBVariablesOptions.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBVariablesOptions.i; sourceTree = ""; }; 942612F51B94FFE900EF842E /* LanguageCategory.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = LanguageCategory.h; path = include/lldb/DataFormatters/LanguageCategory.h; sourceTree = ""; }; 942612F61B95000000EF842E /* LanguageCategory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LanguageCategory.cpp; path = source/DataFormatters/LanguageCategory.cpp; sourceTree = ""; }; 942829541A89614000521B30 /* JSON.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = JSON.h; path = include/lldb/Utility/JSON.h; sourceTree = ""; }; 942829551A89614C00521B30 /* JSON.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSON.cpp; path = source/Utility/JSON.cpp; sourceTree = ""; }; 942829C01A89835300521B30 /* lldb-argdumper */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "lldb-argdumper"; sourceTree = BUILT_PRODUCTS_DIR; }; 9428BC291C6E64DC002A24D7 /* LibCxxAtomic.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = LibCxxAtomic.cpp; path = Language/CPlusPlus/LibCxxAtomic.cpp; sourceTree = ""; }; 9428BC2A1C6E64DC002A24D7 /* LibCxxAtomic.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = LibCxxAtomic.h; path = Language/CPlusPlus/LibCxxAtomic.h; sourceTree = ""; }; 94380B8019940B0300BFE4A8 /* StringLexer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = StringLexer.h; path = include/lldb/Utility/StringLexer.h; sourceTree = ""; }; 94380B8119940B0A00BFE4A8 /* StringLexer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StringLexer.cpp; path = source/Utility/StringLexer.cpp; sourceTree = ""; }; 943B90FC1B991586007BA499 /* VectorIterator.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = VectorIterator.h; path = include/lldb/DataFormatters/VectorIterator.h; sourceTree = ""; }; 943BDEFC1AA7B2DE00789CE8 /* LLDBAssert.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = LLDBAssert.h; path = include/lldb/Utility/LLDBAssert.h; sourceTree = ""; }; 943BDEFD1AA7B2F800789CE8 /* LLDBAssert.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LLDBAssert.cpp; path = source/Utility/LLDBAssert.cpp; sourceTree = ""; }; 9441816B1C8F5EB000E5A8D9 /* CommandAlias.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CommandAlias.h; path = include/lldb/Interpreter/CommandAlias.h; sourceTree = ""; }; 9441816D1C8F5EC900E5A8D9 /* CommandAlias.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandAlias.cpp; path = source/Interpreter/CommandAlias.cpp; sourceTree = ""; }; 944372DA171F6B4300E57C32 /* RegisterContextDummy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegisterContextDummy.cpp; path = Utility/RegisterContextDummy.cpp; sourceTree = ""; }; 944372DB171F6B4300E57C32 /* RegisterContextDummy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterContextDummy.h; path = Utility/RegisterContextDummy.h; sourceTree = ""; }; 9443B120140C18A90013457C /* SBData.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SBData.h; path = include/lldb/API/SBData.h; sourceTree = ""; }; 9443B121140C18C10013457C /* SBData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBData.cpp; path = source/API/SBData.cpp; sourceTree = ""; }; 9447DE411BD5962900E67212 /* DumpValueObjectOptions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = DumpValueObjectOptions.h; path = include/lldb/DataFormatters/DumpValueObjectOptions.h; sourceTree = ""; }; 9447DE421BD5963300E67212 /* DumpValueObjectOptions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DumpValueObjectOptions.cpp; path = source/DataFormatters/DumpValueObjectOptions.cpp; sourceTree = ""; }; 9449B8031B30E0690019342B /* ThreadSafeDenseSet.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ThreadSafeDenseSet.h; path = include/lldb/Core/ThreadSafeDenseSet.h; sourceTree = ""; }; 944DC3481774C99000D7D884 /* python-swigsafecast.swig */ = {isa = PBXFileReference; lastKnownFileType = text; path = "python-swigsafecast.swig"; sourceTree = ""; }; 945215DD17F639E600521C0B /* ValueObjectPrinter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ValueObjectPrinter.h; path = include/lldb/DataFormatters/ValueObjectPrinter.h; sourceTree = ""; }; 945215DE17F639EE00521C0B /* ValueObjectPrinter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ValueObjectPrinter.cpp; path = source/DataFormatters/ValueObjectPrinter.cpp; sourceTree = ""; }; 9452573616262CD000325455 /* SBDeclaration.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBDeclaration.i; sourceTree = ""; }; 9452573816262CEF00325455 /* SBDeclaration.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SBDeclaration.h; path = include/lldb/API/SBDeclaration.h; sourceTree = ""; }; 9452573916262D0200325455 /* SBDeclaration.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBDeclaration.cpp; path = source/API/SBDeclaration.cpp; sourceTree = ""; }; 945261B31B9A11E800BF138D /* CxxStringTypes.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = CxxStringTypes.cpp; path = Language/CPlusPlus/CxxStringTypes.cpp; sourceTree = ""; }; 945261B41B9A11E800BF138D /* CxxStringTypes.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CxxStringTypes.h; path = Language/CPlusPlus/CxxStringTypes.h; sourceTree = ""; }; 945261B51B9A11E800BF138D /* LibCxx.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = LibCxx.cpp; path = Language/CPlusPlus/LibCxx.cpp; sourceTree = ""; }; 945261B61B9A11E800BF138D /* LibCxx.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = LibCxx.h; path = Language/CPlusPlus/LibCxx.h; sourceTree = ""; }; 945261B71B9A11E800BF138D /* LibCxxInitializerList.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = LibCxxInitializerList.cpp; path = Language/CPlusPlus/LibCxxInitializerList.cpp; sourceTree = ""; }; 945261B81B9A11E800BF138D /* LibCxxList.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = LibCxxList.cpp; path = Language/CPlusPlus/LibCxxList.cpp; sourceTree = ""; }; 945261B91B9A11E800BF138D /* LibCxxMap.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = LibCxxMap.cpp; path = Language/CPlusPlus/LibCxxMap.cpp; sourceTree = ""; }; 945261BA1B9A11E800BF138D /* LibCxxUnorderedMap.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = LibCxxUnorderedMap.cpp; path = Language/CPlusPlus/LibCxxUnorderedMap.cpp; sourceTree = ""; }; 945261BB1B9A11E800BF138D /* LibCxxVector.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = LibCxxVector.cpp; path = Language/CPlusPlus/LibCxxVector.cpp; sourceTree = ""; }; 945261BC1B9A11E800BF138D /* LibStdcpp.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = LibStdcpp.cpp; path = Language/CPlusPlus/LibStdcpp.cpp; sourceTree = ""; }; 945261BD1B9A11E800BF138D /* LibStdcpp.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = LibStdcpp.h; path = Language/CPlusPlus/LibStdcpp.h; sourceTree = ""; }; 945261C71B9A14D300BF138D /* CXXFunctionPointer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CXXFunctionPointer.cpp; path = source/DataFormatters/CXXFunctionPointer.cpp; sourceTree = ""; }; 945261C91B9A14E000BF138D /* CXXFunctionPointer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CXXFunctionPointer.h; path = include/lldb/DataFormatters/CXXFunctionPointer.h; sourceTree = ""; }; 9455630A1BEAD0570073F75F /* PlatformAppleSimulator.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = PlatformAppleSimulator.cpp; sourceTree = ""; }; 9455630B1BEAD0570073F75F /* PlatformAppleSimulator.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PlatformAppleSimulator.h; sourceTree = ""; }; 9455630C1BEAD0570073F75F /* PlatformiOSSimulatorCoreSimulatorSupport.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PlatformiOSSimulatorCoreSimulatorSupport.h; sourceTree = ""; }; 9455630D1BEAD0570073F75F /* PlatformiOSSimulatorCoreSimulatorSupport.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = PlatformiOSSimulatorCoreSimulatorSupport.mm; sourceTree = ""; }; 945759651534941F005A9070 /* PlatformPOSIX.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PlatformPOSIX.cpp; path = POSIX/PlatformPOSIX.cpp; sourceTree = ""; }; 945759661534941F005A9070 /* PlatformPOSIX.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PlatformPOSIX.h; path = POSIX/PlatformPOSIX.h; sourceTree = ""; }; 9461568614E355F2003A195C /* SBTypeFilter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SBTypeFilter.h; path = include/lldb/API/SBTypeFilter.h; sourceTree = ""; }; 9461568714E355F2003A195C /* SBTypeFormat.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SBTypeFormat.h; path = include/lldb/API/SBTypeFormat.h; sourceTree = ""; }; 9461568814E355F2003A195C /* SBTypeSummary.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SBTypeSummary.h; path = include/lldb/API/SBTypeSummary.h; sourceTree = ""; }; 9461568914E355F2003A195C /* SBTypeSynthetic.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SBTypeSynthetic.h; path = include/lldb/API/SBTypeSynthetic.h; sourceTree = ""; }; 9461568A14E35621003A195C /* SBTypeFilter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBTypeFilter.cpp; path = source/API/SBTypeFilter.cpp; sourceTree = ""; }; 9461568B14E35621003A195C /* SBTypeFormat.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBTypeFormat.cpp; path = source/API/SBTypeFormat.cpp; sourceTree = ""; }; 9461568C14E35621003A195C /* SBTypeSummary.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBTypeSummary.cpp; path = source/API/SBTypeSummary.cpp; sourceTree = ""; }; 9461568D14E35621003A195C /* SBTypeSynthetic.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBTypeSynthetic.cpp; path = source/API/SBTypeSynthetic.cpp; sourceTree = ""; }; 9461569214E3567F003A195C /* SBTypeFilter.i */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBTypeFilter.i; sourceTree = ""; }; 9461569314E3567F003A195C /* SBTypeFormat.i */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBTypeFormat.i; sourceTree = ""; }; 9461569414E3567F003A195C /* SBTypeSummary.i */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBTypeSummary.i; sourceTree = ""; }; 9461569514E3567F003A195C /* SBTypeSynthetic.i */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBTypeSynthetic.i; sourceTree = ""; }; 946216BF1A97C055006E19CC /* OptionValueLanguage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OptionValueLanguage.h; path = include/lldb/Interpreter/OptionValueLanguage.h; sourceTree = ""; }; 946216C11A97C080006E19CC /* OptionValueLanguage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OptionValueLanguage.cpp; path = source/Interpreter/OptionValueLanguage.cpp; sourceTree = ""; }; 9463D4CC13B1798800C230D4 /* CommandObjectType.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; name = CommandObjectType.cpp; path = source/Commands/CommandObjectType.cpp; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.cpp; }; 9463D4CE13B179A500C230D4 /* CommandObjectType.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CommandObjectType.h; path = source/Commands/CommandObjectType.h; sourceTree = ""; }; 9475C18514E5E9C5001BFC6D /* SBTypeCategory.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SBTypeCategory.h; path = include/lldb/API/SBTypeCategory.h; sourceTree = ""; }; 9475C18714E5E9FA001BFC6D /* SBTypeCategory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBTypeCategory.cpp; path = source/API/SBTypeCategory.cpp; sourceTree = ""; }; 9475C18A14E5EA1C001BFC6D /* SBTypeCategory.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBTypeCategory.i; sourceTree = ""; }; 9475C18B14E5F818001BFC6D /* SBTypeNameSpecifier.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBTypeNameSpecifier.i; sourceTree = ""; }; 9475C18C14E5F826001BFC6D /* SBTypeNameSpecifier.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SBTypeNameSpecifier.h; path = include/lldb/API/SBTypeNameSpecifier.h; sourceTree = ""; }; 9475C18D14E5F834001BFC6D /* SBTypeNameSpecifier.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBTypeNameSpecifier.cpp; path = source/API/SBTypeNameSpecifier.cpp; sourceTree = ""; }; 947A1D621616476A0017C8D1 /* CommandObjectPlugin.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandObjectPlugin.cpp; path = source/Commands/CommandObjectPlugin.cpp; sourceTree = ""; }; 947A1D631616476A0017C8D1 /* CommandObjectPlugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CommandObjectPlugin.h; path = source/Commands/CommandObjectPlugin.h; sourceTree = ""; }; 947CF76F1DC7B1E300EF980B /* ProcessMinidump.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ProcessMinidump.h; sourceTree = ""; }; 947CF7701DC7B1EE00EF980B /* ProcessMinidump.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ProcessMinidump.cpp; sourceTree = ""; }; 947CF7721DC7B20300EF980B /* RegisterContextMinidump_x86_32.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RegisterContextMinidump_x86_32.h; sourceTree = ""; }; 947CF7731DC7B20300EF980B /* ThreadMinidump.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ThreadMinidump.h; sourceTree = ""; }; 947CF7741DC7B20D00EF980B /* RegisterContextMinidump_x86_32.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RegisterContextMinidump_x86_32.cpp; sourceTree = ""; }; 947CF7751DC7B20D00EF980B /* ThreadMinidump.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ThreadMinidump.cpp; sourceTree = ""; }; 9481FE6B1B5F2D9200DED357 /* Either.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = Either.h; path = include/lldb/Utility/Either.h; sourceTree = ""; }; 948554581DCBAE3200345FF5 /* RenderScriptScriptGroup.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RenderScriptScriptGroup.h; sourceTree = ""; }; 948554591DCBAE3B00345FF5 /* RenderScriptScriptGroup.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderScriptScriptGroup.cpp; sourceTree = ""; }; 949ADF001406F62E004833E1 /* ValueObjectConstResultImpl.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ValueObjectConstResultImpl.h; path = include/lldb/Core/ValueObjectConstResultImpl.h; sourceTree = ""; }; 949ADF021406F648004833E1 /* ValueObjectConstResultImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ValueObjectConstResultImpl.cpp; path = source/Core/ValueObjectConstResultImpl.cpp; sourceTree = ""; }; 949EED9E1BA74B64008C63CF /* CoreMedia.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = CoreMedia.cpp; path = Language/ObjC/CoreMedia.cpp; sourceTree = ""; }; 949EED9F1BA74B64008C63CF /* CoreMedia.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CoreMedia.h; path = Language/ObjC/CoreMedia.h; sourceTree = ""; }; 949EEDA11BA76571008C63CF /* Cocoa.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = Cocoa.cpp; path = Language/ObjC/Cocoa.cpp; sourceTree = ""; }; 949EEDA21BA76571008C63CF /* Cocoa.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = Cocoa.h; path = Language/ObjC/Cocoa.h; sourceTree = ""; }; 949EEDA41BA765B5008C63CF /* NSArray.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = NSArray.cpp; path = Language/ObjC/NSArray.cpp; sourceTree = ""; }; 949EEDA51BA765B5008C63CF /* NSDictionary.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = NSDictionary.cpp; path = Language/ObjC/NSDictionary.cpp; sourceTree = ""; }; 949EEDA61BA765B5008C63CF /* NSIndexPath.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = NSIndexPath.cpp; path = Language/ObjC/NSIndexPath.cpp; sourceTree = ""; }; 949EEDA71BA765B5008C63CF /* NSSet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = NSSet.cpp; path = Language/ObjC/NSSet.cpp; sourceTree = ""; }; 949EEDAC1BA76719008C63CF /* CF.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = CF.cpp; path = Language/ObjC/CF.cpp; sourceTree = ""; }; 949EEDAD1BA76719008C63CF /* CF.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CF.h; path = Language/ObjC/CF.h; sourceTree = ""; }; 94A5B3951AB9FE8300A5EE7F /* EmulateInstructionMIPS64.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = EmulateInstructionMIPS64.cpp; path = MIPS64/EmulateInstructionMIPS64.cpp; sourceTree = ""; }; 94A5B3961AB9FE8300A5EE7F /* EmulateInstructionMIPS64.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = EmulateInstructionMIPS64.h; path = MIPS64/EmulateInstructionMIPS64.h; sourceTree = ""; }; 94B638511B8F8E53004FE1E4 /* Language.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = Language.h; path = include/lldb/Target/Language.h; sourceTree = ""; }; 94B638521B8F8E6C004FE1E4 /* Language.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Language.cpp; path = source/Target/Language.cpp; sourceTree = ""; }; 94B6385B1B8FB174004FE1E4 /* CPlusPlusLanguage.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = CPlusPlusLanguage.cpp; path = Language/CPlusPlus/CPlusPlusLanguage.cpp; sourceTree = ""; }; 94B6385C1B8FB174004FE1E4 /* CPlusPlusLanguage.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CPlusPlusLanguage.h; path = Language/CPlusPlus/CPlusPlusLanguage.h; sourceTree = ""; }; 94B6385E1B8FB7A2004FE1E4 /* ObjCLanguage.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = ObjCLanguage.cpp; path = Language/ObjC/ObjCLanguage.cpp; sourceTree = ""; }; 94B6385F1B8FB7A2004FE1E4 /* ObjCLanguage.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ObjCLanguage.h; path = Language/ObjC/ObjCLanguage.h; sourceTree = ""; }; 94B638611B8FB7E9004FE1E4 /* ObjCPlusPlusLanguage.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ObjCPlusPlusLanguage.h; path = Language/ObjCPlusPlus/ObjCPlusPlusLanguage.h; sourceTree = ""; }; 94B638621B8FB7F1004FE1E4 /* ObjCPlusPlusLanguage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ObjCPlusPlusLanguage.cpp; path = Language/ObjCPlusPlus/ObjCPlusPlusLanguage.cpp; sourceTree = ""; }; 94B6E76013D8833C005F417F /* ValueObjectSyntheticFilter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ValueObjectSyntheticFilter.h; path = include/lldb/Core/ValueObjectSyntheticFilter.h; sourceTree = ""; }; 94B6E76113D88362005F417F /* ValueObjectSyntheticFilter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ValueObjectSyntheticFilter.cpp; path = source/Core/ValueObjectSyntheticFilter.cpp; sourceTree = ""; }; 94B9E50E1BBEFDFE000A48DC /* NSDictionary.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = NSDictionary.h; path = Language/ObjC/NSDictionary.h; sourceTree = ""; }; 94B9E50F1BBF0069000A48DC /* NSSet.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = NSSet.h; path = Language/ObjC/NSSet.h; sourceTree = ""; }; 94B9E5101BBF20B7000A48DC /* NSString.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = NSString.h; path = Language/ObjC/NSString.h; sourceTree = ""; }; 94B9E5111BBF20F4000A48DC /* NSString.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = NSString.cpp; path = Language/ObjC/NSString.cpp; sourceTree = ""; }; 94BA8B6C176F8C9B005A91B5 /* Range.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Range.cpp; path = source/Utility/Range.cpp; sourceTree = ""; }; 94BA8B6E176F8CA0005A91B5 /* Range.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = Range.h; path = include/lldb/Utility/Range.h; sourceTree = ""; }; 94BA8B6F176F97CE005A91B5 /* CommandHistory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandHistory.cpp; path = source/Interpreter/CommandHistory.cpp; sourceTree = ""; }; 94BA8B71176F97D4005A91B5 /* CommandHistory.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CommandHistory.h; path = include/lldb/Interpreter/CommandHistory.h; sourceTree = ""; }; 94CB255816B069770059775D /* DataVisualization.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DataVisualization.cpp; path = source/DataFormatters/DataVisualization.cpp; sourceTree = ""; }; 94CB255916B069770059775D /* FormatClasses.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FormatClasses.cpp; path = source/DataFormatters/FormatClasses.cpp; sourceTree = ""; }; 94CB255A16B069770059775D /* FormatManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FormatManager.cpp; path = source/DataFormatters/FormatManager.cpp; sourceTree = ""; }; 94CB256016B069800059775D /* DataVisualization.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = DataVisualization.h; path = include/lldb/DataFormatters/DataVisualization.h; sourceTree = ""; }; 94CB256116B069800059775D /* FormatClasses.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FormatClasses.h; path = include/lldb/DataFormatters/FormatClasses.h; sourceTree = ""; }; 94CB256216B069800059775D /* FormatManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FormatManager.h; path = include/lldb/DataFormatters/FormatManager.h; sourceTree = ""; }; 94CB256416B096F10059775D /* TypeCategory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TypeCategory.cpp; path = source/DataFormatters/TypeCategory.cpp; sourceTree = ""; }; 94CB256516B096F10059775D /* TypeCategoryMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TypeCategoryMap.cpp; path = source/DataFormatters/TypeCategoryMap.cpp; sourceTree = ""; }; 94CB256816B096F90059775D /* TypeCategory.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = TypeCategory.h; path = include/lldb/DataFormatters/TypeCategory.h; sourceTree = ""; }; 94CB256916B096FA0059775D /* TypeCategoryMap.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = TypeCategoryMap.h; path = include/lldb/DataFormatters/TypeCategoryMap.h; sourceTree = ""; }; 94CB256A16B0A4030059775D /* TypeFormat.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = TypeFormat.h; path = include/lldb/DataFormatters/TypeFormat.h; sourceTree = ""; }; 94CB256B16B0A4030059775D /* TypeSummary.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = TypeSummary.h; path = include/lldb/DataFormatters/TypeSummary.h; sourceTree = ""; }; 94CB256C16B0A4040059775D /* TypeSynthetic.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = TypeSynthetic.h; path = include/lldb/DataFormatters/TypeSynthetic.h; sourceTree = ""; }; 94CB256D16B0A4260059775D /* TypeFormat.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TypeFormat.cpp; path = source/DataFormatters/TypeFormat.cpp; sourceTree = ""; }; 94CB256E16B0A4260059775D /* TypeSummary.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TypeSummary.cpp; path = source/DataFormatters/TypeSummary.cpp; sourceTree = ""; }; 94CB256F16B0A4270059775D /* TypeSynthetic.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TypeSynthetic.cpp; path = source/DataFormatters/TypeSynthetic.cpp; sourceTree = ""; }; 94CB257316B1D3870059775D /* FormatCache.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FormatCache.cpp; path = source/DataFormatters/FormatCache.cpp; sourceTree = ""; }; 94CB257516B1D3910059775D /* FormatCache.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FormatCache.h; path = include/lldb/DataFormatters/FormatCache.h; sourceTree = ""; }; 94CD131819BA33A100DB7BED /* TypeValidator.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = TypeValidator.h; path = include/lldb/DataFormatters/TypeValidator.h; sourceTree = ""; }; 94CD131919BA33B400DB7BED /* TypeValidator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TypeValidator.cpp; path = source/DataFormatters/TypeValidator.cpp; sourceTree = ""; }; 94CD7D0719A3FB8600908B7C /* AppleObjCClassDescriptorV2.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppleObjCClassDescriptorV2.h; sourceTree = ""; }; 94CD7D0819A3FBA300908B7C /* AppleObjCClassDescriptorV2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AppleObjCClassDescriptorV2.cpp; sourceTree = ""; }; 94CD7D0A19A3FBC300908B7C /* AppleObjCTypeEncodingParser.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppleObjCTypeEncodingParser.h; sourceTree = ""; }; 94CD7D0B19A3FBCE00908B7C /* AppleObjCTypeEncodingParser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = AppleObjCTypeEncodingParser.cpp; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.cpp; }; 94D0858A1B9675A0000D24BD /* FormattersHelpers.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FormattersHelpers.h; path = include/lldb/DataFormatters/FormattersHelpers.h; sourceTree = ""; }; 94D0858B1B9675B8000D24BD /* FormattersHelpers.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FormattersHelpers.cpp; path = source/DataFormatters/FormattersHelpers.cpp; sourceTree = ""; }; 94E367CC140C4EC4001C7A5A /* modify-python-lldb.py */ = {isa = PBXFileReference; lastKnownFileType = text.script.python; path = "modify-python-lldb.py"; sourceTree = ""; }; 94E367CE140C4EEA001C7A5A /* python-typemaps.swig */ = {isa = PBXFileReference; lastKnownFileType = text; path = "python-typemaps.swig"; sourceTree = ""; }; 94ED54A119C8A822007BE2EA /* ThreadSafeDenseMap.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ThreadSafeDenseMap.h; path = include/lldb/Core/ThreadSafeDenseMap.h; sourceTree = ""; }; 94EE33F218643C6900CD703B /* FormattersContainer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FormattersContainer.h; path = include/lldb/DataFormatters/FormattersContainer.h; sourceTree = ""; }; 94F48F231A01C679005C0EC6 /* StringPrinter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = StringPrinter.h; path = include/lldb/DataFormatters/StringPrinter.h; sourceTree = ""; }; 94F48F241A01C687005C0EC6 /* StringPrinter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StringPrinter.cpp; path = source/DataFormatters/StringPrinter.cpp; sourceTree = ""; }; 94FA3DDD1405D4E500833217 /* ValueObjectConstResultChild.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ValueObjectConstResultChild.h; path = include/lldb/Core/ValueObjectConstResultChild.h; sourceTree = ""; }; 94FA3DDF1405D50300833217 /* ValueObjectConstResultChild.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ValueObjectConstResultChild.cpp; path = source/Core/ValueObjectConstResultChild.cpp; sourceTree = ""; }; 94FE476613FC1DA8001F8475 /* finish-swig-Python-LLDB.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = "finish-swig-Python-LLDB.sh"; sourceTree = ""; }; 961FABB81235DE1600F93A47 /* FuncUnwinders.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FuncUnwinders.cpp; path = source/Symbol/FuncUnwinders.cpp; sourceTree = ""; }; 961FABB91235DE1600F93A47 /* UnwindPlan.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UnwindPlan.cpp; path = source/Symbol/UnwindPlan.cpp; sourceTree = ""; }; 961FABBA1235DE1600F93A47 /* UnwindTable.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UnwindTable.cpp; path = source/Symbol/UnwindTable.cpp; sourceTree = ""; }; 964463EB1A330C0500154ED8 /* CompactUnwindInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CompactUnwindInfo.cpp; path = source/Symbol/CompactUnwindInfo.cpp; sourceTree = ""; }; 964463ED1A330C1B00154ED8 /* CompactUnwindInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CompactUnwindInfo.h; path = include/lldb/Symbol/CompactUnwindInfo.h; sourceTree = ""; }; 966C6B7818E6A56A0093F5EC /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = /usr/lib/libz.dylib; sourceTree = ""; }; 9694FA6F1B32AA64005EBB16 /* ABISysV_mips.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ABISysV_mips.cpp; path = "SysV-mips/ABISysV_mips.cpp"; sourceTree = ""; }; 9694FA701B32AA64005EBB16 /* ABISysV_mips.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ABISysV_mips.h; path = "SysV-mips/ABISysV_mips.h"; sourceTree = ""; }; 9A0FDE951E8EF5010086B2F5 /* RegisterContext_mips.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterContext_mips.h; path = Utility/RegisterContext_mips.h; sourceTree = ""; }; 9A0FDE961E8EF5010086B2F5 /* RegisterContext_s390x.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterContext_s390x.h; path = Utility/RegisterContext_s390x.h; sourceTree = ""; }; 9A0FDE971E8EF5010086B2F5 /* RegisterContextLinux_mips.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegisterContextLinux_mips.cpp; path = Utility/RegisterContextLinux_mips.cpp; sourceTree = ""; }; 9A0FDE981E8EF5010086B2F5 /* RegisterContextLinux_mips.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterContextLinux_mips.h; path = Utility/RegisterContextLinux_mips.h; sourceTree = ""; }; 9A0FDE991E8EF5010086B2F5 /* RegisterInfos_arm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterInfos_arm.h; path = Utility/RegisterInfos_arm.h; sourceTree = ""; }; 9A0FDE9A1E8EF5010086B2F5 /* RegisterInfos_arm64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterInfos_arm64.h; path = Utility/RegisterInfos_arm64.h; sourceTree = ""; }; 9A0FDE9B1E8EF5010086B2F5 /* RegisterInfos_mips.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterInfos_mips.h; path = Utility/RegisterInfos_mips.h; sourceTree = ""; }; 9A19A6A51163BB7E00E0D453 /* SBValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBValue.h; path = include/lldb/API/SBValue.h; sourceTree = ""; }; 9A19A6AD1163BB9800E0D453 /* SBValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBValue.cpp; path = source/API/SBValue.cpp; sourceTree = ""; }; + 9A1E59521EB2B0B9002206A5 /* SBTrace.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBTrace.cpp; path = source/API/SBTrace.cpp; sourceTree = ""; }; + 9A1E59531EB2B0B9002206A5 /* SBTraceOptions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBTraceOptions.cpp; path = source/API/SBTraceOptions.cpp; sourceTree = ""; }; + 9A1E59581EB2B10D002206A5 /* SBTrace.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBTrace.h; path = include/lldb/API/SBTrace.h; sourceTree = ""; }; + 9A1E59591EB2B10D002206A5 /* SBTraceOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBTraceOptions.h; path = include/lldb/API/SBTraceOptions.h; sourceTree = ""; }; 9A22A15D135E30370024DDC3 /* EmulateInstructionARM.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EmulateInstructionARM.cpp; sourceTree = ""; }; 9A22A15E135E30370024DDC3 /* EmulateInstructionARM.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EmulateInstructionARM.h; sourceTree = ""; }; 9A22A15F135E30370024DDC3 /* EmulationStateARM.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EmulationStateARM.cpp; sourceTree = ""; }; 9A22A160135E30370024DDC3 /* EmulationStateARM.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EmulationStateARM.h; sourceTree = ""; }; 9A357582116CFDEE00E8ED2F /* SBValueList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBValueList.h; path = include/lldb/API/SBValueList.h; sourceTree = ""; }; 9A35758D116CFE0F00E8ED2F /* SBValueList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBValueList.cpp; path = source/API/SBValueList.cpp; sourceTree = ""; }; 9A35765E116E76A700E8ED2F /* StringList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StringList.h; path = include/lldb/Utility/StringList.h; sourceTree = ""; }; 9A35765F116E76B900E8ED2F /* StringList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StringList.cpp; path = source/Utility/StringList.cpp; sourceTree = ""; }; 9A357670116E7B5200E8ED2F /* SBStringList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBStringList.h; path = include/lldb/API/SBStringList.h; sourceTree = ""; }; 9A357672116E7B6400E8ED2F /* SBStringList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBStringList.cpp; path = source/API/SBStringList.cpp; sourceTree = ""; }; 9A3576A7116E9AB700E8ED2F /* SBHostOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBHostOS.h; path = include/lldb/API/SBHostOS.h; sourceTree = ""; }; 9A3576A9116E9AC700E8ED2F /* SBHostOS.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBHostOS.cpp; path = source/API/SBHostOS.cpp; sourceTree = ""; }; 9A42976111861A9F00FE05CD /* CommandObjectBreakpointCommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CommandObjectBreakpointCommand.h; path = source/Commands/CommandObjectBreakpointCommand.h; sourceTree = ""; }; 9A42976211861AA600FE05CD /* CommandObjectBreakpointCommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandObjectBreakpointCommand.cpp; path = source/Commands/CommandObjectBreakpointCommand.cpp; sourceTree = ""; }; 9A4633DA11F65D8600955CE1 /* UserSettingsController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UserSettingsController.h; path = include/lldb/Core/UserSettingsController.h; sourceTree = ""; }; 9A4633DC11F65D9A00955CE1 /* UserSettingsController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UserSettingsController.cpp; path = source/Core/UserSettingsController.cpp; sourceTree = ""; }; 9A48A3A7124AAA5A00922451 /* python-extensions.swig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "python-extensions.swig"; sourceTree = ""; }; 9A4F350F1368A51A00823F52 /* StreamAsynchronousIO.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StreamAsynchronousIO.cpp; path = source/Core/StreamAsynchronousIO.cpp; sourceTree = ""; }; 9A4F35111368A54100823F52 /* StreamAsynchronousIO.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StreamAsynchronousIO.h; path = include/lldb/Core/StreamAsynchronousIO.h; sourceTree = ""; }; 9A633FE7112DCE3C001A7E43 /* SBFrame.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBFrame.cpp; path = source/API/SBFrame.cpp; sourceTree = ""; }; 9A633FE8112DCE3C001A7E43 /* SBFrame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBFrame.h; path = include/lldb/API/SBFrame.h; sourceTree = ""; }; 9A77AD501E64E24E0025CE04 /* RegisterInfoPOSIX_arm.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegisterInfoPOSIX_arm.cpp; path = Utility/RegisterInfoPOSIX_arm.cpp; sourceTree = ""; }; 9A77AD511E64E24E0025CE04 /* RegisterInfoPOSIX_arm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterInfoPOSIX_arm.h; path = Utility/RegisterInfoPOSIX_arm.h; sourceTree = ""; }; 9A82010B10FFB49800182560 /* ScriptInterpreter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ScriptInterpreter.cpp; path = source/Interpreter/ScriptInterpreter.cpp; sourceTree = ""; }; 9A9830F21125FC5800A56CB0 /* SBBroadcaster.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBBroadcaster.cpp; path = source/API/SBBroadcaster.cpp; sourceTree = ""; }; 9A9830F31125FC5800A56CB0 /* SBBroadcaster.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBBroadcaster.h; path = include/lldb/API/SBBroadcaster.h; sourceTree = ""; }; 9A9830F61125FC5800A56CB0 /* SBCommandInterpreter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBCommandInterpreter.cpp; path = source/API/SBCommandInterpreter.cpp; sourceTree = ""; }; 9A9830F71125FC5800A56CB0 /* SBCommandInterpreter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBCommandInterpreter.h; path = include/lldb/API/SBCommandInterpreter.h; sourceTree = ""; }; 9A9830F81125FC5800A56CB0 /* SBCommandReturnObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBCommandReturnObject.cpp; path = source/API/SBCommandReturnObject.cpp; sourceTree = ""; }; 9A9830F91125FC5800A56CB0 /* SBCommandReturnObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBCommandReturnObject.h; path = include/lldb/API/SBCommandReturnObject.h; sourceTree = ""; }; 9A9830FA1125FC5800A56CB0 /* SBDebugger.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBDebugger.cpp; path = source/API/SBDebugger.cpp; sourceTree = ""; }; 9A9830FB1125FC5800A56CB0 /* SBDebugger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBDebugger.h; path = include/lldb/API/SBDebugger.h; sourceTree = ""; }; 9A9830FC1125FC5800A56CB0 /* SBDefines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBDefines.h; path = include/lldb/API/SBDefines.h; sourceTree = ""; }; 9A9830FD1125FC5800A56CB0 /* SBEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBEvent.cpp; path = source/API/SBEvent.cpp; sourceTree = ""; }; 9A9830FE1125FC5800A56CB0 /* SBEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBEvent.h; path = include/lldb/API/SBEvent.h; sourceTree = ""; }; 9A9831011125FC5800A56CB0 /* SBListener.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBListener.cpp; path = source/API/SBListener.cpp; sourceTree = ""; }; 9A9831021125FC5800A56CB0 /* SBListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBListener.h; path = include/lldb/API/SBListener.h; sourceTree = ""; }; 9A9831031125FC5800A56CB0 /* SBProcess.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBProcess.cpp; path = source/API/SBProcess.cpp; sourceTree = ""; }; 9A9831041125FC5800A56CB0 /* SBProcess.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBProcess.h; path = include/lldb/API/SBProcess.h; sourceTree = ""; }; 9A9831051125FC5800A56CB0 /* SBSourceManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBSourceManager.cpp; path = source/API/SBSourceManager.cpp; sourceTree = ""; }; 9A9831061125FC5800A56CB0 /* SBSourceManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBSourceManager.h; path = include/lldb/API/SBSourceManager.h; sourceTree = ""; }; 9A9831071125FC5800A56CB0 /* SBTarget.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; name = SBTarget.cpp; path = source/API/SBTarget.cpp; sourceTree = ""; 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 = ""; }; 9A9831091125FC5800A56CB0 /* SBThread.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBThread.cpp; path = source/API/SBThread.cpp; sourceTree = ""; }; 9A98310A1125FC5800A56CB0 /* SBThread.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBThread.h; path = include/lldb/API/SBThread.h; sourceTree = ""; }; 9AC7033D11752C4C0086C050 /* AddressResolverFileLine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AddressResolverFileLine.h; path = include/lldb/Core/AddressResolverFileLine.h; sourceTree = ""; }; 9AC7033E11752C540086C050 /* AddressResolver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AddressResolver.h; path = include/lldb/Core/AddressResolver.h; sourceTree = ""; }; 9AC7033F11752C590086C050 /* AddressResolverName.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AddressResolverName.h; path = include/lldb/Core/AddressResolverName.h; sourceTree = ""; }; 9AC7034011752C6B0086C050 /* AddressResolver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AddressResolver.cpp; path = source/Core/AddressResolver.cpp; sourceTree = ""; }; 9AC7034211752C720086C050 /* AddressResolverFileLine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AddressResolverFileLine.cpp; path = source/Core/AddressResolverFileLine.cpp; sourceTree = ""; }; 9AC7034411752C790086C050 /* AddressResolverName.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AddressResolverName.cpp; path = source/Core/AddressResolverName.cpp; sourceTree = ""; }; 9AC7038D117674EB0086C050 /* SBInstruction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBInstruction.h; path = include/lldb/API/SBInstruction.h; sourceTree = ""; }; 9AC7038F117675270086C050 /* SBInstructionList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBInstructionList.h; path = include/lldb/API/SBInstructionList.h; sourceTree = ""; }; 9AC703AE117675410086C050 /* SBInstruction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBInstruction.cpp; path = source/API/SBInstruction.cpp; sourceTree = ""; }; 9AC703B0117675490086C050 /* SBInstructionList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBInstructionList.cpp; path = source/API/SBInstructionList.cpp; sourceTree = ""; }; 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 = ""; }; 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 = ""; }; 9AF16A9C11402D5B007A7B3F /* SBBreakpoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBBreakpoint.cpp; path = source/API/SBBreakpoint.cpp; sourceTree = ""; }; 9AF16A9E11402D69007A7B3F /* SBBreakpoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBBreakpoint.h; path = include/lldb/API/SBBreakpoint.h; sourceTree = ""; }; 9AF16CC611408686007A7B3F /* SBBreakpointLocation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBBreakpointLocation.h; path = include/lldb/API/SBBreakpointLocation.h; sourceTree = ""; }; 9AF16CC7114086A1007A7B3F /* SBBreakpointLocation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBBreakpointLocation.cpp; path = source/API/SBBreakpointLocation.cpp; sourceTree = ""; }; A36FF33B17D8E94600244D40 /* OptionParser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = OptionParser.cpp; sourceTree = ""; }; A36FF33D17D8E98800244D40 /* OptionParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OptionParser.h; path = include/lldb/Host/OptionParser.h; sourceTree = ""; }; AE44FB261BB07DC60033EB62 /* GoAST.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = GoAST.h; path = ExpressionParser/Go/GoAST.h; sourceTree = ""; }; AE44FB271BB07DC60033EB62 /* GoLexer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = GoLexer.h; path = ExpressionParser/Go/GoLexer.h; sourceTree = ""; }; AE44FB281BB07DC60033EB62 /* GoParser.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = GoParser.h; path = ExpressionParser/Go/GoParser.h; sourceTree = ""; }; AE44FB291BB07DC60033EB62 /* GoUserExpression.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = GoUserExpression.h; path = ExpressionParser/Go/GoUserExpression.h; sourceTree = ""; }; AE44FB2A1BB07DD80033EB62 /* GoLexer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GoLexer.cpp; path = ExpressionParser/Go/GoLexer.cpp; sourceTree = ""; }; AE44FB2B1BB07DD80033EB62 /* GoParser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GoParser.cpp; path = ExpressionParser/Go/GoParser.cpp; sourceTree = ""; }; AE44FB2C1BB07DD80033EB62 /* GoUserExpression.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GoUserExpression.cpp; path = ExpressionParser/Go/GoUserExpression.cpp; sourceTree = ""; }; AE44FB3C1BB4858A0033EB62 /* GoLanguageRuntime.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = GoLanguageRuntime.h; path = Go/GoLanguageRuntime.h; sourceTree = ""; }; AE44FB3D1BB485960033EB62 /* GoLanguageRuntime.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GoLanguageRuntime.cpp; path = Go/GoLanguageRuntime.cpp; sourceTree = ""; }; AE44FB451BB4BB090033EB62 /* GoLanguage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GoLanguage.cpp; path = Language/Go/GoLanguage.cpp; sourceTree = ""; }; AE44FB461BB4BB090033EB62 /* GoLanguage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GoLanguage.h; path = Language/Go/GoLanguage.h; sourceTree = ""; }; AE44FB4A1BB4BB540033EB62 /* GoFormatterFunctions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GoFormatterFunctions.cpp; path = Language/Go/GoFormatterFunctions.cpp; sourceTree = ""; }; AE44FB4B1BB4BB540033EB62 /* GoFormatterFunctions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GoFormatterFunctions.h; path = Language/Go/GoFormatterFunctions.h; sourceTree = ""; }; AE6897261B94F6DE0018845D /* DWARFASTParserGo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DWARFASTParserGo.cpp; sourceTree = ""; }; AE6897271B94F6DE0018845D /* DWARFASTParserGo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DWARFASTParserGo.h; sourceTree = ""; }; AE8F624719EF3E1E00326B21 /* OperatingSystemGo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OperatingSystemGo.cpp; path = Go/OperatingSystemGo.cpp; sourceTree = ""; }; AE8F624819EF3E1E00326B21 /* OperatingSystemGo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OperatingSystemGo.h; path = Go/OperatingSystemGo.h; sourceTree = ""; }; AEB0E4581BD6E9F800B24093 /* LLVMUserExpression.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LLVMUserExpression.cpp; path = source/Expression/LLVMUserExpression.cpp; sourceTree = ""; }; AEB0E45A1BD6EA1400B24093 /* LLVMUserExpression.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = LLVMUserExpression.h; path = include/lldb/Expression/LLVMUserExpression.h; sourceTree = ""; }; AEC6FF9F1BE970A2007882C1 /* GoParserTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GoParserTest.cpp; sourceTree = ""; }; AEEA33F61AC74FE700AB639D /* TypeSystem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TypeSystem.h; path = include/lldb/Symbol/TypeSystem.h; sourceTree = ""; }; AEEA34041AC88A7400AB639D /* TypeSystem.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TypeSystem.cpp; path = source/Symbol/TypeSystem.cpp; sourceTree = ""; }; AEEA340F1ACA08A000AB639D /* GoASTContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GoASTContext.h; path = include/lldb/Symbol/GoASTContext.h; sourceTree = ""; }; AEFFBA7C1AC4835D0087B932 /* GoASTContext.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GoASTContext.cpp; path = source/Symbol/GoASTContext.cpp; sourceTree = ""; }; AF061F85182C97ED00B6A19C /* RegisterContextHistory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegisterContextHistory.cpp; path = Utility/RegisterContextHistory.cpp; sourceTree = ""; }; AF061F86182C97ED00B6A19C /* RegisterContextHistory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterContextHistory.h; path = Utility/RegisterContextHistory.h; sourceTree = ""; }; AF061F89182C980000B6A19C /* HistoryThread.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HistoryThread.h; path = Utility/HistoryThread.h; sourceTree = ""; }; AF061F8A182C980000B6A19C /* HistoryUnwind.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HistoryUnwind.h; path = Utility/HistoryUnwind.h; sourceTree = ""; }; AF0C112718580CD800C4C45B /* QueueItem.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = QueueItem.cpp; path = source/Target/QueueItem.cpp; sourceTree = ""; }; AF0E22EE18A09FB20009B7D1 /* AppleGetItemInfoHandler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AppleGetItemInfoHandler.cpp; sourceTree = ""; }; AF0E22EF18A09FB20009B7D1 /* AppleGetItemInfoHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppleGetItemInfoHandler.h; sourceTree = ""; }; AF0EBBE6185940FB0059E52F /* SBQueue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBQueue.cpp; path = source/API/SBQueue.cpp; sourceTree = ""; }; AF0EBBE7185940FB0059E52F /* SBQueueItem.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBQueueItem.cpp; path = source/API/SBQueueItem.cpp; sourceTree = ""; }; AF0EBBEA185941360059E52F /* SBQueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBQueue.h; path = include/lldb/API/SBQueue.h; sourceTree = ""; }; AF0EBBEB185941360059E52F /* SBQueueItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBQueueItem.h; path = include/lldb/API/SBQueueItem.h; sourceTree = ""; }; AF0EBBEE1859419F0059E52F /* SBQueue.i */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBQueue.i; sourceTree = ""; }; AF0EBBEF1859419F0059E52F /* SBQueueItem.i */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBQueueItem.i; sourceTree = ""; }; AF0F6E4E1739A76D009180FE /* RegisterContextKDP_arm64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RegisterContextKDP_arm64.cpp; sourceTree = ""; }; AF0F6E4F1739A76D009180FE /* RegisterContextKDP_arm64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegisterContextKDP_arm64.h; sourceTree = ""; }; AF1729D4182C907200E0AB97 /* HistoryThread.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = HistoryThread.cpp; path = Utility/HistoryThread.cpp; sourceTree = ""; }; AF1729D5182C907200E0AB97 /* HistoryUnwind.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = HistoryUnwind.cpp; path = Utility/HistoryUnwind.cpp; sourceTree = ""; }; AF1F7B05189C904B0087DB9C /* AppleGetPendingItemsHandler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AppleGetPendingItemsHandler.cpp; sourceTree = ""; }; AF1F7B06189C904B0087DB9C /* AppleGetPendingItemsHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppleGetPendingItemsHandler.h; sourceTree = ""; }; AF20F7641AF18F8500751A6E /* ABISysV_arm.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ABISysV_arm.cpp; path = "SysV-arm/ABISysV_arm.cpp"; sourceTree = ""; }; AF20F7651AF18F8500751A6E /* ABISysV_arm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ABISysV_arm.h; path = "SysV-arm/ABISysV_arm.h"; sourceTree = ""; }; AF20F7681AF18F9000751A6E /* ABISysV_arm64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ABISysV_arm64.cpp; path = "SysV-arm64/ABISysV_arm64.cpp"; sourceTree = ""; }; AF20F7691AF18F9000751A6E /* ABISysV_arm64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ABISysV_arm64.h; path = "SysV-arm64/ABISysV_arm64.h"; sourceTree = ""; }; AF20F76C1AF18FC700751A6E /* SBLanguageRuntime.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBLanguageRuntime.cpp; path = source/API/SBLanguageRuntime.cpp; sourceTree = ""; }; AF23B4D919009C66003E2A58 /* FreeBSDSignals.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FreeBSDSignals.cpp; path = Utility/FreeBSDSignals.cpp; sourceTree = ""; }; AF23B4DA19009C66003E2A58 /* FreeBSDSignals.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FreeBSDSignals.h; path = Utility/FreeBSDSignals.h; sourceTree = ""; }; AF248A4C1DA71C77000B814D /* TestArm64InstEmulation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TestArm64InstEmulation.cpp; path = UnwindAssembly/InstEmulation/TestArm64InstEmulation.cpp; sourceTree = ""; }; AF254E2F170CCC33007AE5C9 /* PlatformDarwinKernel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PlatformDarwinKernel.cpp; sourceTree = ""; }; AF254E30170CCC33007AE5C9 /* PlatformDarwinKernel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformDarwinKernel.h; sourceTree = ""; }; AF25AB24188F685C0030DEC3 /* AppleGetQueuesHandler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AppleGetQueuesHandler.cpp; sourceTree = ""; }; AF25AB25188F685C0030DEC3 /* AppleGetQueuesHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppleGetQueuesHandler.h; sourceTree = ""; }; AF2670381852D01E00B6CC36 /* Queue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Queue.cpp; path = source/Target/Queue.cpp; sourceTree = ""; }; AF2670391852D01E00B6CC36 /* QueueList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = QueueList.cpp; path = source/Target/QueueList.cpp; sourceTree = ""; }; AF27AD531D3603EA00CF2833 /* DynamicLoaderDarwin.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DynamicLoaderDarwin.cpp; sourceTree = ""; }; AF27AD541D3603EA00CF2833 /* DynamicLoaderDarwin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DynamicLoaderDarwin.h; sourceTree = ""; }; AF2907BD1D3F082400E10654 /* DynamicLoaderMacOS.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DynamicLoaderMacOS.cpp; sourceTree = ""; }; AF2907BE1D3F082400E10654 /* DynamicLoaderMacOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DynamicLoaderMacOS.h; sourceTree = ""; }; AF2BCA6918C7EFDE005B4526 /* JITLoaderGDB.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JITLoaderGDB.cpp; sourceTree = ""; }; AF2BCA6A18C7EFDE005B4526 /* JITLoaderGDB.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JITLoaderGDB.h; sourceTree = ""; }; AF33B4BC1C1FA441001B28D9 /* NetBSDSignals.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = NetBSDSignals.cpp; path = Utility/NetBSDSignals.cpp; sourceTree = ""; }; AF33B4BD1C1FA441001B28D9 /* NetBSDSignals.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NetBSDSignals.h; path = Utility/NetBSDSignals.h; sourceTree = ""; }; AF37E10917C861F20061E18E /* ProcessRunLock.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ProcessRunLock.cpp; sourceTree = ""; }; AF3A4AD01EA05C4700B5DEB4 /* PlatformRemoteDarwinDevice.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PlatformRemoteDarwinDevice.cpp; sourceTree = ""; }; AF3A4AD11EA05C4700B5DEB4 /* PlatformRemoteDarwinDevice.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformRemoteDarwinDevice.h; sourceTree = ""; }; AF3F54AE1B3BA59C00186E73 /* CrashReason.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CrashReason.cpp; sourceTree = ""; }; AF3F54AF1B3BA59C00186E73 /* CrashReason.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CrashReason.h; sourceTree = ""; }; AF3F54B21B3BA5D500186E73 /* POSIXStopInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = POSIXStopInfo.cpp; sourceTree = ""; }; AF3F54B31B3BA5D500186E73 /* POSIXStopInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = POSIXStopInfo.h; sourceTree = ""; }; AF3F54B81B3BA5D500186E73 /* RegisterContextPOSIXProcessMonitor_arm.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RegisterContextPOSIXProcessMonitor_arm.cpp; sourceTree = ""; }; AF3F54B91B3BA5D500186E73 /* RegisterContextPOSIXProcessMonitor_arm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegisterContextPOSIXProcessMonitor_arm.h; sourceTree = ""; }; AF3F54BA1B3BA5D500186E73 /* RegisterContextPOSIXProcessMonitor_arm64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RegisterContextPOSIXProcessMonitor_arm64.cpp; sourceTree = ""; }; AF3F54BB1B3BA5D500186E73 /* RegisterContextPOSIXProcessMonitor_arm64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegisterContextPOSIXProcessMonitor_arm64.h; sourceTree = ""; }; AF3F54BC1B3BA5D500186E73 /* RegisterContextPOSIXProcessMonitor_mips64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RegisterContextPOSIXProcessMonitor_mips64.cpp; sourceTree = ""; }; AF3F54BD1B3BA5D500186E73 /* RegisterContextPOSIXProcessMonitor_mips64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegisterContextPOSIXProcessMonitor_mips64.h; sourceTree = ""; }; AF3F54BE1B3BA5D500186E73 /* RegisterContextPOSIXProcessMonitor_powerpc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RegisterContextPOSIXProcessMonitor_powerpc.cpp; sourceTree = ""; }; AF3F54BF1B3BA5D500186E73 /* RegisterContextPOSIXProcessMonitor_powerpc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegisterContextPOSIXProcessMonitor_powerpc.h; sourceTree = ""; }; AF3F54C01B3BA5D500186E73 /* RegisterContextPOSIXProcessMonitor_x86.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RegisterContextPOSIXProcessMonitor_x86.cpp; sourceTree = ""; }; AF3F54C11B3BA5D500186E73 /* RegisterContextPOSIXProcessMonitor_x86.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegisterContextPOSIXProcessMonitor_x86.h; sourceTree = ""; }; AF415AE51D949E4400FCE0D4 /* x86AssemblyInspectionEngine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = x86AssemblyInspectionEngine.cpp; sourceTree = ""; }; AF415AE61D949E4400FCE0D4 /* x86AssemblyInspectionEngine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = x86AssemblyInspectionEngine.h; sourceTree = ""; }; AF45E1FC1BF57C8D000563EB /* PythonTestSuite.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PythonTestSuite.cpp; sourceTree = ""; }; AF45E1FD1BF57C8D000563EB /* PythonTestSuite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PythonTestSuite.h; sourceTree = ""; }; AF45FDE318A1F3AC0007051C /* AppleGetThreadItemInfoHandler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AppleGetThreadItemInfoHandler.cpp; sourceTree = ""; }; AF45FDE418A1F3AC0007051C /* AppleGetThreadItemInfoHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppleGetThreadItemInfoHandler.h; sourceTree = ""; }; AF6335E01C87B21E00F7D554 /* SymbolFilePDB.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SymbolFilePDB.cpp; path = PDB/SymbolFilePDB.cpp; sourceTree = ""; }; AF6335E11C87B21E00F7D554 /* SymbolFilePDB.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SymbolFilePDB.h; path = PDB/SymbolFilePDB.h; sourceTree = ""; }; AF68D2541255416E002FF25B /* RegisterContextLLDB.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegisterContextLLDB.cpp; path = Utility/RegisterContextLLDB.cpp; sourceTree = ""; }; AF68D2551255416E002FF25B /* RegisterContextLLDB.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterContextLLDB.h; path = Utility/RegisterContextLLDB.h; sourceTree = ""; }; AF68D32F1255A110002FF25B /* UnwindLLDB.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UnwindLLDB.cpp; path = Utility/UnwindLLDB.cpp; sourceTree = ""; }; AF68D3301255A110002FF25B /* UnwindLLDB.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UnwindLLDB.h; path = Utility/UnwindLLDB.h; sourceTree = ""; }; AF77E08D1A033C700096C0EA /* ABISysV_ppc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ABISysV_ppc.cpp; path = "SysV-ppc/ABISysV_ppc.cpp"; sourceTree = ""; }; AF77E08E1A033C700096C0EA /* ABISysV_ppc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ABISysV_ppc.h; path = "SysV-ppc/ABISysV_ppc.h"; sourceTree = ""; }; AF77E0911A033C7F0096C0EA /* ABISysV_ppc64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ABISysV_ppc64.cpp; path = "SysV-ppc64/ABISysV_ppc64.cpp"; sourceTree = ""; }; AF77E0921A033C7F0096C0EA /* ABISysV_ppc64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ABISysV_ppc64.h; path = "SysV-ppc64/ABISysV_ppc64.h"; sourceTree = ""; }; AF77E0991A033D360096C0EA /* RegisterContext_powerpc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterContext_powerpc.h; path = Utility/RegisterContext_powerpc.h; sourceTree = ""; }; AF77E09A1A033D360096C0EA /* RegisterContextFreeBSD_powerpc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegisterContextFreeBSD_powerpc.cpp; path = Utility/RegisterContextFreeBSD_powerpc.cpp; sourceTree = ""; }; AF77E09B1A033D360096C0EA /* RegisterContextFreeBSD_powerpc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterContextFreeBSD_powerpc.h; path = Utility/RegisterContextFreeBSD_powerpc.h; sourceTree = ""; }; AF77E09C1A033D360096C0EA /* RegisterContextMacOSXFrameBackchain.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegisterContextMacOSXFrameBackchain.cpp; path = Utility/RegisterContextMacOSXFrameBackchain.cpp; sourceTree = ""; }; AF77E09D1A033D360096C0EA /* RegisterContextPOSIX_powerpc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegisterContextPOSIX_powerpc.cpp; path = Utility/RegisterContextPOSIX_powerpc.cpp; sourceTree = ""; }; AF77E09E1A033D360096C0EA /* RegisterContextPOSIX_powerpc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterContextPOSIX_powerpc.h; path = Utility/RegisterContextPOSIX_powerpc.h; sourceTree = ""; }; AF77E09F1A033D360096C0EA /* RegisterInfos_powerpc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterInfos_powerpc.h; path = Utility/RegisterInfos_powerpc.h; sourceTree = ""; }; AF77E0A71A033D740096C0EA /* RegisterContextPOSIXCore_powerpc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RegisterContextPOSIXCore_powerpc.cpp; sourceTree = ""; }; AF77E0A81A033D740096C0EA /* RegisterContextPOSIXCore_powerpc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegisterContextPOSIXCore_powerpc.h; sourceTree = ""; }; AF81DEF91828A23F0042CF19 /* SystemRuntime.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SystemRuntime.cpp; path = source/Target/SystemRuntime.cpp; sourceTree = ""; }; AF8AD62A1BEC28A400150209 /* PlatformAppleTVSimulator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PlatformAppleTVSimulator.cpp; sourceTree = ""; }; AF8AD62B1BEC28A400150209 /* PlatformAppleTVSimulator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformAppleTVSimulator.h; sourceTree = ""; }; AF8AD62C1BEC28A400150209 /* PlatformAppleWatchSimulator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PlatformAppleWatchSimulator.cpp; sourceTree = ""; }; AF8AD62D1BEC28A400150209 /* PlatformAppleWatchSimulator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformAppleWatchSimulator.h; sourceTree = ""; }; AF8AD6331BEC28C400150209 /* PlatformRemoteAppleTV.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PlatformRemoteAppleTV.cpp; sourceTree = ""; }; AF8AD6341BEC28C400150209 /* PlatformRemoteAppleTV.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformRemoteAppleTV.h; sourceTree = ""; }; AF8AD6351BEC28C400150209 /* PlatformRemoteAppleWatch.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PlatformRemoteAppleWatch.cpp; sourceTree = ""; }; AF8AD6361BEC28C400150209 /* PlatformRemoteAppleWatch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformRemoteAppleWatch.h; sourceTree = ""; }; AF90106315AB7C5700FF120D /* lldb.1 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.man; name = lldb.1; path = docs/lldb.1; sourceTree = ""; }; AF9107EC168570D200DBCD3C /* RegisterContextDarwin_arm64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegisterContextDarwin_arm64.cpp; path = Utility/RegisterContextDarwin_arm64.cpp; sourceTree = ""; }; AF9107ED168570D200DBCD3C /* RegisterContextDarwin_arm64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterContextDarwin_arm64.h; path = Utility/RegisterContextDarwin_arm64.h; sourceTree = ""; }; AF94005711C03F6500085DB9 /* SymbolVendor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SymbolVendor.cpp; path = source/Symbol/SymbolVendor.cpp; sourceTree = ""; }; AF94726E1B575E430063D65C /* ValueObjectConstResultCast.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ValueObjectConstResultCast.cpp; path = source/Core/ValueObjectConstResultCast.cpp; sourceTree = ""; }; AF9472701B575E5F0063D65C /* ValueObjectConstResultCast.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ValueObjectConstResultCast.h; path = include/lldb/Core/ValueObjectConstResultCast.h; sourceTree = ""; }; AF9B8F31182DB52900DA866F /* SystemRuntimeMacOSX.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SystemRuntimeMacOSX.cpp; sourceTree = ""; }; AF9B8F32182DB52900DA866F /* SystemRuntimeMacOSX.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SystemRuntimeMacOSX.h; sourceTree = ""; }; AFAFD8091E57E1B90017A14F /* ModuleCacheTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ModuleCacheTest.cpp; path = Target/ModuleCacheTest.cpp; sourceTree = ""; }; 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; }; AFC234061AF85CE000CDE8B6 /* CommandObjectLanguage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandObjectLanguage.cpp; path = source/Commands/CommandObjectLanguage.cpp; sourceTree = ""; }; AFC234071AF85CE000CDE8B6 /* CommandObjectLanguage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CommandObjectLanguage.h; path = source/Commands/CommandObjectLanguage.h; sourceTree = ""; }; AFC2DCE61E6E2ED000283714 /* FastDemangle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FastDemangle.cpp; path = source/Utility/FastDemangle.cpp; sourceTree = ""; }; AFC2DCE81E6E2F2C00283714 /* Baton.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Baton.cpp; path = source/Utility/Baton.cpp; sourceTree = ""; }; AFC2DCEA1E6E2F7D00283714 /* UserID.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UserID.cpp; path = source/Utility/UserID.cpp; sourceTree = ""; }; AFC2DCEC1E6E2F8C00283714 /* UserID.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = UserID.h; path = include/lldb/Utility/UserID.h; sourceTree = ""; }; AFC2DCED1E6E2F9800283714 /* FastDemangle.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FastDemangle.h; path = include/lldb/Utility/FastDemangle.h; sourceTree = ""; }; AFC2DCEE1E6E2FA300283714 /* Baton.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = Baton.h; path = include/lldb/Utility/Baton.h; sourceTree = ""; }; AFC2DCEF1E6E2FD200283714 /* VMRange.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = VMRange.cpp; path = source/Utility/VMRange.cpp; sourceTree = ""; }; AFC2DCF11E6E2FDA00283714 /* VMRange.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = VMRange.h; path = include/lldb/Utility/VMRange.h; sourceTree = ""; }; AFC2DCF21E6E30CF00283714 /* History.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = History.cpp; path = source/Utility/History.cpp; sourceTree = ""; }; AFC2DCF41E6E30D800283714 /* History.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = History.h; path = include/lldb/Utility/History.h; sourceTree = ""; }; AFC2DCF51E6E316A00283714 /* StreamCallback.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StreamCallback.cpp; path = source/Utility/StreamCallback.cpp; sourceTree = ""; }; AFC2DCF71E6E316F00283714 /* StreamCallback.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = StreamCallback.h; path = include/lldb/Utility/StreamCallback.h; sourceTree = ""; }; AFC2DCF81E6E318000283714 /* StreamGDBRemote.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StreamGDBRemote.cpp; path = source/Utility/StreamGDBRemote.cpp; sourceTree = ""; }; AFC2DCFA1E6E318600283714 /* StreamGDBRemote.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = StreamGDBRemote.h; path = include/lldb/Utility/StreamGDBRemote.h; sourceTree = ""; }; AFCB2BBB1BF577F40018B553 /* PythonExceptionState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PythonExceptionState.cpp; path = ScriptInterpreter/Python/PythonExceptionState.cpp; sourceTree = ""; }; AFCB2BBC1BF577F40018B553 /* PythonExceptionState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PythonExceptionState.h; path = ScriptInterpreter/Python/PythonExceptionState.h; sourceTree = ""; }; AFD65C7F1D9B5B2E00D93120 /* RegisterContextMinidump_x86_64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RegisterContextMinidump_x86_64.cpp; sourceTree = ""; }; AFD65C801D9B5B2E00D93120 /* RegisterContextMinidump_x86_64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegisterContextMinidump_x86_64.h; sourceTree = ""; }; AFDFDFD019E34D3400EAE509 /* ConnectionFileDescriptorPosix.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ConnectionFileDescriptorPosix.cpp; sourceTree = ""; }; AFEC3361194A8ABA00FF05C6 /* StructuredData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StructuredData.cpp; path = source/Core/StructuredData.cpp; sourceTree = ""; }; AFEC5FD51D94F9380076A480 /* Testx86AssemblyInspectionEngine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Testx86AssemblyInspectionEngine.cpp; path = UnwindAssembly/x86/Testx86AssemblyInspectionEngine.cpp; sourceTree = ""; }; 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 = ""; }; 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 = ""; }; 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 = ""; }; 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 = ""; }; AFF8FF0B1E779D4B003830EF /* TildeExpressionResolver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TildeExpressionResolver.cpp; path = source/Utility/TildeExpressionResolver.cpp; sourceTree = ""; }; AFF8FF0D1E779D51003830EF /* TildeExpressionResolver.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = TildeExpressionResolver.h; path = include/lldb/Utility/TildeExpressionResolver.h; sourceTree = ""; }; B207C4921429607D00F36E4E /* CommandObjectWatchpoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandObjectWatchpoint.cpp; path = source/Commands/CommandObjectWatchpoint.cpp; sourceTree = ""; }; B207C4941429609C00F36E4E /* CommandObjectWatchpoint.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CommandObjectWatchpoint.h; path = source/Commands/CommandObjectWatchpoint.h; sourceTree = ""; }; B23DD24F12EDFAC1000C3894 /* ARMUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ARMUtils.h; path = Utility/ARMUtils.h; sourceTree = ""; }; B2462246141AD37D00F3D409 /* OptionGroupWatchpoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OptionGroupWatchpoint.cpp; path = source/Interpreter/OptionGroupWatchpoint.cpp; sourceTree = ""; }; B2462248141AD39B00F3D409 /* OptionGroupWatchpoint.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = OptionGroupWatchpoint.h; path = include/lldb/Interpreter/OptionGroupWatchpoint.h; sourceTree = ""; }; B27318411416AC12006039C8 /* WatchpointList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WatchpointList.cpp; path = source/Breakpoint/WatchpointList.cpp; sourceTree = ""; }; B27318431416AC43006039C8 /* WatchpointList.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = WatchpointList.h; path = include/lldb/Breakpoint/WatchpointList.h; sourceTree = ""; }; B28058A0139988B0002D96D0 /* InferiorCallPOSIX.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = InferiorCallPOSIX.cpp; path = Utility/InferiorCallPOSIX.cpp; sourceTree = ""; }; B28058A2139988C6002D96D0 /* InferiorCallPOSIX.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = InferiorCallPOSIX.h; path = Utility/InferiorCallPOSIX.h; sourceTree = ""; }; B287E63E12EFAE2C00C9BEFE /* ARMDefines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ARMDefines.h; path = Utility/ARMDefines.h; sourceTree = ""; }; B296983412C2FB2B002D92C3 /* CommandObjectVersion.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandObjectVersion.cpp; path = source/Commands/CommandObjectVersion.cpp; sourceTree = ""; }; B296983512C2FB2B002D92C3 /* CommandObjectVersion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CommandObjectVersion.h; path = source/Commands/CommandObjectVersion.h; sourceTree = ""; }; B299580A14F2FA1400050A04 /* DisassemblerLLVMC.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DisassemblerLLVMC.cpp; sourceTree = ""; }; B299580C14F2FA1F00050A04 /* DisassemblerLLVMC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DisassemblerLLVMC.h; sourceTree = ""; }; B2A58721143119810092BFBA /* SBWatchpoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBWatchpoint.h; path = include/lldb/API/SBWatchpoint.h; sourceTree = ""; }; B2A58723143119D50092BFBA /* SBWatchpoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBWatchpoint.cpp; path = source/API/SBWatchpoint.cpp; sourceTree = ""; }; B2A5872514313B480092BFBA /* SBWatchpoint.i */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; path = SBWatchpoint.i; sourceTree = ""; }; B2B7CCEA15D1BD6600EEFB57 /* CommandObjectWatchpointCommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandObjectWatchpointCommand.cpp; path = source/Commands/CommandObjectWatchpointCommand.cpp; sourceTree = ""; }; B2B7CCEC15D1BD9600EEFB57 /* CommandObjectWatchpointCommand.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CommandObjectWatchpointCommand.h; path = source/Commands/CommandObjectWatchpointCommand.h; sourceTree = ""; }; B2B7CCED15D1BFB700EEFB57 /* WatchpointOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WatchpointOptions.h; path = include/lldb/Breakpoint/WatchpointOptions.h; sourceTree = ""; }; B2B7CCEF15D1C20F00EEFB57 /* WatchpointOptions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WatchpointOptions.cpp; path = source/Breakpoint/WatchpointOptions.cpp; sourceTree = ""; }; B2D3033612EFA5C500F84EB3 /* InstructionUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = InstructionUtils.h; path = Utility/InstructionUtils.h; sourceTree = ""; }; + D67521351EA17C3900439694 /* MainLoop.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MainLoop.cpp; sourceTree = ""; }; E73A15A41B548EC500786197 /* GDBRemoteSignals.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GDBRemoteSignals.cpp; path = Utility/GDBRemoteSignals.cpp; sourceTree = ""; }; E73A15A51B548EC500786197 /* GDBRemoteSignals.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GDBRemoteSignals.h; path = Utility/GDBRemoteSignals.h; sourceTree = ""; }; E769331D1A94D18100C73337 /* lldb-server.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = "lldb-server.cpp"; path = "tools/lldb-server/lldb-server.cpp"; sourceTree = ""; }; E7723D421AC4A7FB002BA082 /* RegisterContextPOSIXCore_arm64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RegisterContextPOSIXCore_arm64.cpp; sourceTree = ""; }; E7723D431AC4A7FB002BA082 /* RegisterContextPOSIXCore_arm64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegisterContextPOSIXCore_arm64.h; sourceTree = ""; }; E7723D4A1AC4A944002BA082 /* RegisterContextPOSIX_arm64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegisterContextPOSIX_arm64.cpp; path = Utility/RegisterContextPOSIX_arm64.cpp; sourceTree = ""; }; E7723D4B1AC4A944002BA082 /* RegisterContextPOSIX_arm64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterContextPOSIX_arm64.h; path = Utility/RegisterContextPOSIX_arm64.h; sourceTree = ""; }; E778E99F1B062D1700247609 /* EmulateInstructionMIPS.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EmulateInstructionMIPS.cpp; sourceTree = ""; }; E778E9A01B062D1700247609 /* EmulateInstructionMIPS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EmulateInstructionMIPS.h; sourceTree = ""; }; EB8375E61B553DE800BA907D /* ThreadPlanCallFunctionUsingABI.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ThreadPlanCallFunctionUsingABI.cpp; path = source/Target/ThreadPlanCallFunctionUsingABI.cpp; sourceTree = ""; }; EB8375E81B553DFE00BA907D /* ThreadPlanCallFunctionUsingABI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ThreadPlanCallFunctionUsingABI.h; path = include/lldb/Target/ThreadPlanCallFunctionUsingABI.h; sourceTree = ""; }; EDB919B414F6F10D008FF64B /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = /System/Library/Frameworks/Security.framework; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ 239504D11BDD451400963CEA /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; 23CB15481D66DA9300EDDDE1 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( 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; }; 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 = ( 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 = ""; }; 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 = ""; 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 */, ); name = Products; sourceTree = ""; usesTabs = 0; }; 23042D0F1976C9D800621B2C /* Kalimba */ = { isa = PBXGroup; children = ( 23042D111976CA0A00621B2C /* PlatformKalimba.h */, 23042D101976CA0A00621B2C /* PlatformKalimba.cpp */, ); path = Kalimba; sourceTree = ""; }; 2321F9331BDD326500BA9A93 /* unittests */ = { isa = PBXGroup; children = ( 23E2E52C1D903806006F38BB /* Breakpoint */, 239504C61BDD3FF300963CEA /* CMakeLists.txt */, 239504C21BDD3FD600963CEA /* gtest_common.h */, 23CB14E51D66CBEB00EDDDE1 /* Core */, 2326CF501BDD68CA00A5CEAC /* Editline */, AEC6FF9D1BE97035007882C1 /* Expression */, 2321F9371BDD32ED00BA9A93 /* Host */, 2321F93C1BDD339A00BA9A93 /* Interpreter */, 23CB14F51D66CCB700EDDDE1 /* Language */, 2370A3781D66C549000E7BE6 /* Process */, 2321F93F1BDD33D800BA9A93 /* ScriptInterpreter */, 23CB15091D66CF2B00EDDDE1 /* Symbol */, 23CB150A1D66CF3200EDDDE1 /* SymbolFile */, AFAFD8081E57E19E0017A14F /* Target */, AFEC5FD31D94F9130076A480 /* UnwindAssembly */, 2321F9421BDD343A00BA9A93 /* Utility */, ); path = unittests; sourceTree = ""; }; 2321F9371BDD32ED00BA9A93 /* Host */ = { isa = PBXGroup; children = ( 2321F9381BDD332400BA9A93 /* CMakeLists.txt */, 23CB14FD1D66CD2400EDDDE1 /* FileSpecTest.cpp */, 2321F9391BDD332400BA9A93 /* SocketAddressTest.cpp */, 2321F93A1BDD332400BA9A93 /* SocketTest.cpp */, 2321F93B1BDD332400BA9A93 /* SymbolsTest.cpp */, ); path = Host; sourceTree = ""; }; 2321F93C1BDD339A00BA9A93 /* Interpreter */ = { isa = PBXGroup; children = ( 2321F93D1BDD33CE00BA9A93 /* CMakeLists.txt */, 2321F93E1BDD33CE00BA9A93 /* TestArgs.cpp */, ); path = Interpreter; sourceTree = ""; }; 2321F93F1BDD33D800BA9A93 /* ScriptInterpreter */ = { isa = PBXGroup; children = ( 2321F9401BDD340D00BA9A93 /* CMakeLists.txt */, 2321F94B1BDD35D500BA9A93 /* Python */, ); path = ScriptInterpreter; sourceTree = ""; }; 2321F9421BDD343A00BA9A93 /* Utility */ = { isa = PBXGroup; children = ( 2321F9431BDD346100BA9A93 /* CMakeLists.txt */, 23CB15041D66CD9200EDDDE1 /* Inputs */, 2321F9441BDD346100BA9A93 /* StringExtractorTest.cpp */, 2321F9451BDD346100BA9A93 /* TaskPoolTest.cpp */, 2321F9461BDD346100BA9A93 /* UriParserTest.cpp */, ); path = Utility; sourceTree = ""; }; 2321F94B1BDD35D500BA9A93 /* Python */ = { isa = PBXGroup; children = ( 2321F94C1BDD360F00BA9A93 /* CMakeLists.txt */, 2321F94D1BDD360F00BA9A93 /* PythonDataObjectsTests.cpp */, 3FA093141BF65D3A0037DD08 /* PythonExceptionStateTests.cpp */, AF45E1FC1BF57C8D000563EB /* PythonTestSuite.cpp */, AF45E1FD1BF57C8D000563EB /* PythonTestSuite.h */, ); path = Python; sourceTree = ""; }; 2326CF501BDD68CA00A5CEAC /* Editline */ = { isa = PBXGroup; children = ( 23CB14F11D66CC9000EDDDE1 /* CMakeLists.txt */, 2326CF511BDD693B00A5CEAC /* EditlineTest.cpp */, ); path = Editline; sourceTree = ""; }; 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 = ""; }; 236102941CF389BE00B8E0B9 /* cmake */ = { isa = PBXGroup; children = ( 236102961CF389F800B8E0B9 /* modules */, 236102971CF38A0900B8E0B9 /* platforms */, ); path = cmake; sourceTree = ""; }; 236102961CF389F800B8E0B9 /* modules */ = { isa = PBXGroup; children = ( 236102981CF38A2B00B8E0B9 /* AddLLDB.cmake */, 236102991CF38A2B00B8E0B9 /* LLDBConfig.cmake */, 2361029A1CF38A2B00B8E0B9 /* LLDBStandalone.cmake */, ); path = modules; sourceTree = ""; }; 236102971CF38A0900B8E0B9 /* platforms */ = { isa = PBXGroup; children = ( 2361029E1CF38A3500B8E0B9 /* Android.cmake */, ); path = platforms; sourceTree = ""; }; 2370A3781D66C549000E7BE6 /* Process */ = { isa = PBXGroup; children = ( 2370A37A1D66C57B000E7BE6 /* CMakeLists.txt */, 2370A3791D66C569000E7BE6 /* gdb-remote */, 23E2E5181D9036CF006F38BB /* minidump */, ); path = Process; sourceTree = ""; }; 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 = ""; }; 238F2BA41D2C858F001FF92A /* StructuredData */ = { isa = PBXGroup; children = ( 238F2BA51D2C85B2001FF92A /* DarwinLog */, ); path = StructuredData; sourceTree = ""; }; 238F2BA51D2C85B2001FF92A /* DarwinLog */ = { isa = PBXGroup; children = ( 238F2BA71D2C85FA001FF92A /* StructuredDataDarwinLog.h */, 238F2BA61D2C85FA001FF92A /* StructuredDataDarwinLog.cpp */, ); path = DarwinLog; sourceTree = ""; }; 23AB0526199FF5D3003B8084 /* FreeBSD */ = { isa = PBXGroup; children = ( AF3F54B21B3BA5D500186E73 /* POSIXStopInfo.cpp */, AF3F54B31B3BA5D500186E73 /* POSIXStopInfo.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 = ""; }; 23CB14E21D66CA2200EDDDE1 /* Frameworks */ = { isa = PBXGroup; children = ( 23CB14E31D66CA2200EDDDE1 /* libxml2.2.dylib */, ); name = Frameworks; sourceTree = ""; }; 23CB14E51D66CBEB00EDDDE1 /* Core */ = { isa = PBXGroup; children = ( 23E2E5161D903689006F38BB /* ArchSpecTest.cpp */, 23CB14E71D66CC0E00EDDDE1 /* CMakeLists.txt */, 23CB14E61D66CC0E00EDDDE1 /* BroadcasterTest.cpp */, 23CB14E81D66CC0E00EDDDE1 /* DataExtractorTest.cpp */, 23CB14E91D66CC0E00EDDDE1 /* ScalarTest.cpp */, ); path = Core; sourceTree = ""; }; 23CB14F51D66CCB700EDDDE1 /* Language */ = { isa = PBXGroup; children = ( 23CB14F61D66CCD600EDDDE1 /* CMakeLists.txt */, 23CB14F81D66CCDA00EDDDE1 /* CPlusPlus */, ); path = Language; sourceTree = ""; }; 23CB14F81D66CCDA00EDDDE1 /* CPlusPlus */ = { isa = PBXGroup; children = ( 23CB14F91D66CCF100EDDDE1 /* CMakeLists.txt */, 23CB14FA1D66CCF100EDDDE1 /* CPlusPlusLanguageTest.cpp */, ); path = CPlusPlus; sourceTree = ""; }; 23CB15041D66CD9200EDDDE1 /* Inputs */ = { isa = PBXGroup; children = ( 23CB15051D66CDB400EDDDE1 /* TestModule.c */, 23CB15061D66CDB400EDDDE1 /* TestModule.so */, ); path = Inputs; sourceTree = ""; }; 23CB15091D66CF2B00EDDDE1 /* Symbol */ = { isa = PBXGroup; children = ( 23CB150B1D66CF5600EDDDE1 /* CMakeLists.txt */, 23CB150C1D66CF5600EDDDE1 /* TestClangASTContext.cpp */, ); path = Symbol; sourceTree = ""; }; 23CB150A1D66CF3200EDDDE1 /* SymbolFile */ = { isa = PBXGroup; children = ( 23CB15101D66CF6900EDDDE1 /* CMakeLists.txt */, 23CB15121D66CF6E00EDDDE1 /* PDB */, ); path = SymbolFile; sourceTree = ""; }; 23CB15121D66CF6E00EDDDE1 /* PDB */ = { isa = PBXGroup; children = ( 23CB15131D66CF8700EDDDE1 /* CMakeLists.txt */, 23CB15181D66CF9500EDDDE1 /* Inputs */, 23CB15141D66CF8700EDDDE1 /* SymbolFilePDBTests.cpp */, ); path = PDB; sourceTree = ""; }; 23CB15181D66CF9500EDDDE1 /* Inputs */ = { isa = PBXGroup; children = ( 23CB15191D66CFAC00EDDDE1 /* test-dwarf.cpp */, 23CB151A1D66CFAC00EDDDE1 /* test-dwarf.exe */, 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 = ""; }; 23E2E5181D9036CF006F38BB /* minidump */ = { isa = PBXGroup; children = ( 23E2E5191D9036F2006F38BB /* CMakeLists.txt */, 23E2E51A1D9036F2006F38BB /* MinidumpParserTest.cpp */, 23E2E51D1D9036F6006F38BB /* Inputs */, ); path = minidump; sourceTree = ""; }; 23E2E51D1D9036F6006F38BB /* Inputs */ = { isa = PBXGroup; children = ( 23E2E51E1D903726006F38BB /* fizzbuzz_no_heap.dmp */, 23E2E51F1D903726006F38BB /* linux-x86_64.cpp */, 23E2E5201D903726006F38BB /* linux-x86_64.dmp */, ); path = Inputs; sourceTree = ""; }; 23E2E52C1D903806006F38BB /* Breakpoint */ = { isa = PBXGroup; children = ( 23E2E52D1D90382B006F38BB /* BreakpointIDTest.cpp */, 23E2E52E1D90382B006F38BB /* CMakeLists.txt */, ); path = Breakpoint; sourceTree = ""; }; 23E2E5351D9048E7006F38BB /* minidump */ = { isa = PBXGroup; children = ( 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 = ""; }; 260C897110F57C5600BB2B04 /* Plugins */ = { isa = PBXGroup; children = ( 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 = ""; }; 260C897210F57C5600BB2B04 /* Disassembler */ = { isa = PBXGroup; children = ( 260C897310F57C5600BB2B04 /* llvm */, ); path = Disassembler; sourceTree = ""; }; 260C897310F57C5600BB2B04 /* llvm */ = { isa = PBXGroup; children = ( B299580A14F2FA1400050A04 /* DisassemblerLLVMC.cpp */, B299580C14F2FA1F00050A04 /* DisassemblerLLVMC.h */, ); path = llvm; sourceTree = ""; }; 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 = ""; }; 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 = ""; }; 260C897E10F57C5600BB2B04 /* ObjectContainer */ = { isa = PBXGroup; children = ( 26A3B4AB1181454800381BC2 /* BSD-Archive */, 260C897F10F57C5600BB2B04 /* Universal-Mach-O */, ); path = ObjectContainer; sourceTree = ""; }; 260C897F10F57C5600BB2B04 /* Universal-Mach-O */ = { isa = PBXGroup; children = ( 260C898010F57C5600BB2B04 /* ObjectContainerUniversalMachO.cpp */, 260C898110F57C5600BB2B04 /* ObjectContainerUniversalMachO.h */, ); path = "Universal-Mach-O"; sourceTree = ""; }; 260C898210F57C5600BB2B04 /* ObjectFile */ = { isa = PBXGroup; children = ( 260C898310F57C5600BB2B04 /* ELF */, 26EFC4C718CFAF0D00865D87 /* JIT */, 260C898710F57C5600BB2B04 /* Mach-O */, 26E152221419CACA007967D0 /* PECOFF */, ); path = ObjectFile; sourceTree = ""; }; 260C898310F57C5600BB2B04 /* ELF */ = { isa = PBXGroup; children = ( 26D27C9E11ED3A4E0024D721 /* ELFHeader.h */, 26D27C9D11ED3A4E0024D721 /* ELFHeader.cpp */, 260C898610F57C5600BB2B04 /* ObjectFileELF.h */, 260C898510F57C5600BB2B04 /* ObjectFileELF.cpp */, ); path = ELF; sourceTree = ""; }; 260C898710F57C5600BB2B04 /* Mach-O */ = { isa = PBXGroup; children = ( 260C898810F57C5600BB2B04 /* ObjectFileMachO.cpp */, 260C898910F57C5600BB2B04 /* ObjectFileMachO.h */, ); path = "Mach-O"; sourceTree = ""; }; 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 = ""; }; 260C89B110F57C5600BB2B04 /* SymbolFile */ = { isa = PBXGroup; children = ( AF6335DF1C87B20A00F7D554 /* PDB */, 260C89B210F57C5600BB2B04 /* DWARF */, 260C89DD10F57C5600BB2B04 /* Symtab */, ); path = SymbolFile; sourceTree = ""; }; 260C89B210F57C5600BB2B04 /* DWARF */ = { isa = PBXGroup; children = ( 6D95DC031B9DC06F000E318A /* DIERef.h */, 6D95DC041B9DC06F000E318A /* SymbolFileDWARFDwo.h */, 6D95DBFD1B9DC057000E318A /* DIERef.cpp */, 6D95DBFE1B9DC057000E318A /* HashedNameToDIE.cpp */, 6D95DBFF1B9DC057000E318A /* SymbolFileDWARFDwo.cpp */, 260C89B310F57C5600BB2B04 /* DWARFAbbreviationDeclaration.cpp */, 260C89B410F57C5600BB2B04 /* DWARFAbbreviationDeclaration.h */, 269DDD451B8FD01A00D0DBD8 /* DWARFASTParser.h */, 269DDD491B8FD1C300D0DBD8 /* DWARFASTParserClang.h */, 269DDD481B8FD1C300D0DBD8 /* DWARFASTParserClang.cpp */, AE6897271B94F6DE0018845D /* DWARFASTParserGo.h */, AE6897261B94F6DE0018845D /* DWARFASTParserGo.cpp */, 6D0F61441C80AACF00A4ECEE /* DWARFASTParserJava.cpp */, 6D0F61451C80AACF00A4ECEE /* DWARFASTParserJava.h */, 4CC7C6511D5299140076FF94 /* DWARFASTParserOCaml.h */, 4CC7C6521D5299140076FF94 /* DWARFASTParserOCaml.cpp */, 260C89B610F57C5600BB2B04 /* DWARFAttribute.h */, 266E829C1B8E542C008FCA06 /* DWARFAttribute.cpp */, 260C89B710F57C5600BB2B04 /* DWARFCompileUnit.cpp */, 260C89B810F57C5600BB2B04 /* DWARFCompileUnit.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 */, 260C89C510F57C5600BB2B04 /* DWARFDebugMacinfo.cpp */, 260C89C610F57C5600BB2B04 /* DWARFDebugMacinfo.h */, 260C89C710F57C5600BB2B04 /* DWARFDebugMacinfoEntry.cpp */, 260C89C810F57C5600BB2B04 /* DWARFDebugMacinfoEntry.h */, 23E77CD61C20F29F007192AD /* DWARFDebugMacro.cpp */, 23E77CD71C20F29F007192AD /* DWARFDebugMacro.h */, 260C89C910F57C5600BB2B04 /* DWARFDebugPubnames.cpp */, 260C89CA10F57C5600BB2B04 /* DWARFDebugPubnames.h */, 260C89CB10F57C5600BB2B04 /* DWARFDebugPubnamesSet.cpp */, 260C89CC10F57C5600BB2B04 /* DWARFDebugPubnamesSet.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 */, 260C89D110F57C5600BB2B04 /* DWARFDIECollection.cpp */, 260C89D210F57C5600BB2B04 /* DWARFDIECollection.h */, 260C89D310F57C5600BB2B04 /* DWARFFormValue.cpp */, 260C89D410F57C5600BB2B04 /* DWARFFormValue.h */, 26A0DA4D140F721D006DA411 /* HashedNameToDIE.h */, 26109B3B1155D70100CC3529 /* LogChannelDWARF.cpp */, 26109B3C1155D70100CC3529 /* LogChannelDWARF.h */, 2618D9EA12406FE600F2B8FE /* NameToDIE.cpp */, 2618D957124056C700F2B8FE /* NameToDIE.h */, 260C89D910F57C5600BB2B04 /* SymbolFileDWARF.cpp */, 260C89DA10F57C5600BB2B04 /* SymbolFileDWARF.h */, 260C89DB10F57C5600BB2B04 /* SymbolFileDWARFDebugMap.cpp */, 260C89DC10F57C5600BB2B04 /* SymbolFileDWARFDebugMap.h */, 26B8B42212EEC52A00A831B2 /* UniqueDWARFASTType.h */, 26B8B42312EEC52A00A831B2 /* UniqueDWARFASTType.cpp */, ); path = DWARF; sourceTree = ""; }; 260C89DD10F57C5600BB2B04 /* Symtab */ = { isa = PBXGroup; children = ( 260C89DE10F57C5600BB2B04 /* SymbolFileSymtab.cpp */, 260C89DF10F57C5600BB2B04 /* SymbolFileSymtab.h */, ); path = Symtab; sourceTree = ""; }; 260C89E010F57C5600BB2B04 /* SymbolVendor */ = { isa = PBXGroup; children = ( 2635878D17822E56004C30BA /* ELF */, 260C89E110F57C5600BB2B04 /* MacOSX */, ); path = SymbolVendor; sourceTree = ""; }; 260C89E110F57C5600BB2B04 /* MacOSX */ = { isa = PBXGroup; children = ( 260C89E210F57C5600BB2B04 /* SymbolVendorMacOSX.cpp */, 260C89E310F57C5600BB2B04 /* SymbolVendorMacOSX.h */, ); path = MacOSX; sourceTree = ""; }; 2611FEEE142D83060017FEA3 /* interface */ = { isa = PBXGroup; children = ( 2611FEEF142D83060017FEA3 /* SBAddress.i */, 254FBBA61A91672800BD6378 /* SBAttachInfo.i */, 2611FEF0142D83060017FEA3 /* SBBlock.i */, 2611FEF1142D83060017FEA3 /* SBBreakpoint.i */, 2611FEF2142D83060017FEA3 /* SBBreakpointLocation.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 */, 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 = ""; }; 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 */, 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 */, 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 */, 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 */, 9A357582116CFDEE00E8ED2F /* SBValueList.h */, 9A35758D116CFE0F00E8ED2F /* SBValueList.cpp */, 94235B9A1A8D5FD800EB2EED /* SBVariablesOptions.h */, 94235B9B1A8D5FF300EB2EED /* SBVariablesOptions.cpp */, B2A58721143119810092BFBA /* SBWatchpoint.h */, B2A58723143119D50092BFBA /* SBWatchpoint.cpp */, 3F81692D1ABB7A40001DA9DF /* SystemInitializerFull.h */, 3F81692A1ABB7A16001DA9DF /* SystemInitializerFull.cpp */, ); name = API; sourceTree = ""; }; 2635878D17822E56004C30BA /* ELF */ = { isa = PBXGroup; children = ( 2635879017822E56004C30BA /* SymbolVendorELF.cpp */, 2635879117822E56004C30BA /* SymbolVendorELF.h */, ); path = ELF; sourceTree = ""; }; 263641141B34AEE200145B2F /* SysV-mips64 */ = { isa = PBXGroup; children = ( 263641151B34AEE200145B2F /* ABISysV_mips64.cpp */, 263641161B34AEE200145B2F /* ABISysV_mips64.h */, ); path = "SysV-mips64"; sourceTree = ""; }; 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 = ""; }; 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 = ""; }; 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 = ""; }; 26579F55126A255E0007C5CB /* darwin-debug */ = { isa = PBXGroup; children = ( 26368A3B126B697600E8659F /* darwin-debug.cpp */, ); name = "darwin-debug"; sourceTree = ""; }; 265E9BE0115C2B8500D0DCCB /* debugserver */ = { isa = PBXGroup; children = ( 265E9BE1115C2BAA00D0DCCB /* debugserver.xcodeproj */, ); name = debugserver; sourceTree = ""; }; 265E9BE2115C2BAA00D0DCCB /* Products */ = { isa = PBXGroup; children = ( 26CE05A0115C31E50022F371 /* debugserver */, 239504C51BDD3FD700963CEA /* debugserver-nonui */, ); name = Products; sourceTree = ""; }; 2665CD0915080846002C8FAE /* install-headers */ = { isa = PBXGroup; children = ( 2665CD0D15080846002C8FAE /* Makefile */, ); name = "install-headers"; path = "tools/install-headers"; sourceTree = ""; }; 2666ADBF1B3CB675001FAFD3 /* Hexagon-DYLD */ = { isa = PBXGroup; children = ( 2666ADC11B3CB675001FAFD3 /* DynamicLoaderHexagonDYLD.cpp */, 2666ADC21B3CB675001FAFD3 /* DynamicLoaderHexagonDYLD.h */, 2666ADC31B3CB675001FAFD3 /* HexagonDYLDRendezvous.cpp */, 2666ADC41B3CB675001FAFD3 /* HexagonDYLDRendezvous.h */, ); path = "Hexagon-DYLD"; sourceTree = ""; }; 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 = ""; }; 2669605F1199F4230075C61A /* Python */ = { isa = PBXGroup; children = ( 266960601199F4230075C61A /* build-swig-Python.sh */, 266960611199F4230075C61A /* edit-swig-python-wrapper-file.py */, 94FE476613FC1DA8001F8475 /* finish-swig-Python-LLDB.sh */, 94E367CC140C4EC4001C7A5A /* modify-python-lldb.py */, 9A48A3A7124AAA5A00922451 /* python-extensions.swig */, 944DC3481774C99000D7D884 /* python-swigsafecast.swig */, 94E367CE140C4EEA001C7A5A /* python-typemaps.swig */, 94005E0313F438DF001EF42D /* python-wrapper.swig */, ); path = Python; sourceTree = ""; }; 266DFE9013FD64D200D0C574 /* OperatingSystem */ = { isa = PBXGroup; children = ( AE8F624519EF3DFC00326B21 /* Go */, 2698699715E6CBD0002415FF /* Python */, ); path = OperatingSystem; sourceTree = ""; }; 267F68461CC02DED0086832B /* SysV-s390x */ = { isa = PBXGroup; children = ( 267F68471CC02DED0086832B /* ABISysV_s390x.cpp */, 267F68481CC02DED0086832B /* ABISysV_s390x.h */, ); path = "SysV-s390x"; sourceTree = ""; }; 2682F168115ED9C800CCFF99 /* Utility */ = { isa = PBXGroup; children = ( 26FA4315130103F400E71120 /* FileSpec.h */, 26FA43171301048600E71120 /* FileSpec.cpp */, 26CF992414428766001E4138 /* AnsiTerminal.h */, 26F996A7119B79C300412154 /* ARM_DWARF_Registers.h */, 264A12FF137252C700875C42 /* ARM64_DWARF_Registers.h */, AFC2DCE81E6E2F2C00283714 /* Baton.cpp */, AFC2DCEE1E6E2FA300283714 /* Baton.h */, 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 */, 9481FE6B1B5F2D9200DED357 /* Either.h */, 26764C9A1E48F4DD008D3573 /* Error.h */, 26764C981E48F4D2008D3573 /* Error.cpp */, AFC2DCE61E6E2ED000283714 /* FastDemangle.cpp */, AFC2DCED1E6E2F9800283714 /* FastDemangle.h */, AFC2DCF21E6E30CF00283714 /* History.cpp */, AFC2DCF41E6E30D800283714 /* History.h */, 4C73152119B7D71700F865A4 /* Iterable.h */, 942829541A89614000521B30 /* JSON.h */, 942829551A89614C00521B30 /* JSON.cpp */, 943BDEFC1AA7B2DE00789CE8 /* LLDBAssert.h */, 943BDEFD1AA7B2F800789CE8 /* LLDBAssert.cpp */, 3F81691C1ABA242B001DA9DF /* NameMatches.h */, 3F8169181ABA2419001DA9DF /* NameMatches.cpp */, 26764C9C1E48F516008D3573 /* RegularExpression.h */, 26764C9F1E48F528008D3573 /* RegularExpression.cpp */, 4CAB257C18EC9DB800BAD33E /* SafeMachO.h */, 26A375841D59487700D6CBDB /* SelectHelper.h */, 26A3757F1D59462700D6CBDB /* SelectHelper.cpp */, 261B5A5211C3F2AD00AABD0A /* SharingPtr.cpp */, 4C2FAE2E135E3A70001EDE44 /* SharedCluster.h */, 261B5A5311C3F2AD00AABD0A /* SharingPtr.h */, 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 */, 94BA8B6E176F8CA0005A91B5 /* Range.h */, 94BA8B6C176F8C9B005A91B5 /* Range.cpp */, 6DEC6F3A1BD66D950091ABA6 /* TaskPool.h */, 6DEC6F381BD66D750091ABA6 /* TaskPool.cpp */, AFF8FF0B1E779D4B003830EF /* TildeExpressionResolver.cpp */, AFF8FF0D1E779D51003830EF /* TildeExpressionResolver.h */, 2654A6911E552F3C00DA1013 /* UriParser.h */, 33064C991A5C7A330033D415 /* UriParser.cpp */, AFC2DCEA1E6E2F7D00283714 /* UserID.cpp */, AFC2DCEC1E6E2F8C00283714 /* UserID.h */, 49CA96F51E6AAC8E00C03FEE /* UUID.h */, 49CA96EA1E6AAC6600C03FEE /* UUID.cpp */, AFC2DCEF1E6E2FD200283714 /* VMRange.cpp */, AFC2DCF11E6E2FDA00283714 /* VMRange.h */, 2654A6921E552F4600DA1013 /* VASPrintf.h */, 2654A68F1E552ED500DA1013 /* VASprintf.cpp */, ); name = Utility; sourceTree = ""; }; 268A683C1321B505000E3FB8 /* Static */ = { isa = PBXGroup; children = ( 268A683E1321B53B000E3FB8 /* DynamicLoaderStatic.h */, 268A683D1321B53B000E3FB8 /* DynamicLoaderStatic.cpp */, ); path = Static; sourceTree = ""; }; 2690CD181A6DC0D000E717C8 /* lldb-mi */ = { isa = PBXGroup; children = ( 2669415B1A6DC2AB0063BE93 /* CMakeLists.txt */, 2669415E1A6DC2AB0063BE93 /* lldb-Info.plist */, 2669415F1A6DC2AB0063BE93 /* Makefile */, 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 = ""; }; 2692BA12136610C100F9E14D /* InstEmulation */ = { isa = PBXGroup; children = ( 2692BA13136610C100F9E14D /* UnwindAssemblyInstEmulation.cpp */, 2692BA14136610C100F9E14D /* UnwindAssemblyInstEmulation.h */, ); path = InstEmulation; sourceTree = ""; }; 2692BA17136611CD00F9E14D /* x86 */ = { isa = PBXGroup; children = ( AF415AE51D949E4400FCE0D4 /* x86AssemblyInspectionEngine.cpp */, AF415AE61D949E4400FCE0D4 /* x86AssemblyInspectionEngine.h */, 263E949D13661AE400E7D1CE /* UnwindAssembly-x86.cpp */, 263E949E13661AE400E7D1CE /* UnwindAssembly-x86.h */, ); path = x86; sourceTree = ""; }; 2694E99814FC0BB30076DE67 /* FreeBSD */ = { isa = PBXGroup; children = ( 2694E99A14FC0BB30076DE67 /* PlatformFreeBSD.cpp */, 2694E99B14FC0BB30076DE67 /* PlatformFreeBSD.h */, ); path = FreeBSD; sourceTree = ""; }; 2694E99F14FC0BBD0076DE67 /* Linux */ = { isa = PBXGroup; children = ( 2694E9A114FC0BBD0076DE67 /* PlatformLinux.cpp */, 2694E9A214FC0BBD0076DE67 /* PlatformLinux.h */, ); path = Linux; sourceTree = ""; }; 2698699715E6CBD0002415FF /* Python */ = { isa = PBXGroup; children = ( 2698699815E6CBD0002415FF /* OperatingSystemPython.cpp */, 2698699915E6CBD0002415FF /* OperatingSystemPython.h */, ); path = Python; sourceTree = ""; }; 26A3B4AB1181454800381BC2 /* BSD-Archive */ = { isa = PBXGroup; children = ( 26A3B4AC1181454800381BC2 /* ObjectContainerBSDArchive.cpp */, 26A3B4AD1181454800381BC2 /* ObjectContainerBSDArchive.h */, ); path = "BSD-Archive"; sourceTree = ""; }; 26A527BC14E24F5F00F3A14A /* mach-core */ = { isa = PBXGroup; children = ( 26A527BD14E24F5F00F3A14A /* ProcessMachCore.cpp */, 26A527BE14E24F5F00F3A14A /* ProcessMachCore.h */, 26A527BF14E24F5F00F3A14A /* ThreadMachCore.cpp */, 26A527C014E24F5F00F3A14A /* ThreadMachCore.h */, ); path = "mach-core"; sourceTree = ""; }; 26AC3F441365F40E0065C7EF /* UnwindAssembly */ = { isa = PBXGroup; children = ( 2692BA12136610C100F9E14D /* InstEmulation */, 2692BA17136611CD00F9E14D /* x86 */, ); path = UnwindAssembly; sourceTree = ""; }; 26B4666E11A2080F00CF6220 /* Utility */ = { isa = PBXGroup; children = ( 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 */, 23059A0519532B96007B8189 /* LinuxSignals.cpp */, 23059A0619532B96007B8189 /* LinuxSignals.h */, 23173F8B192BA93F005C708F /* lldb-x86-register-enums.h */, 26B75B421AD6E29A001F7A57 /* MipsLinuxSignals.cpp */, 26B75B431AD6E29A001F7A57 /* MipsLinuxSignals.h */, AF33B4BC1C1FA441001B28D9 /* NetBSDSignals.cpp */, AF33B4BD1C1FA441001B28D9 /* NetBSDSignals.h */, 26474C9E18D0CAEC0073DEBA /* RegisterContext_mips64.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 */, 267F68551CC02EAE0086832B /* RegisterContextPOSIX_s390x.cpp */, 267F68561CC02EAE0086832B /* RegisterContextPOSIX_s390x.h */, 26474CC618D0CB5B0073DEBA /* RegisterContextPOSIX_x86.cpp */, 26474CC718D0CB5B0073DEBA /* RegisterContextPOSIX_x86.h */, 26474CC818D0CB5B0073DEBA /* RegisterContextPOSIX.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 */, 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 = ""; }; 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 */, 267F684D1CC02E270086832B /* RegisterContextPOSIXCore_s390x.cpp */, 267F684E1CC02E270086832B /* RegisterContextPOSIXCore_s390x.h */, 26BC17A618C7F4CB00D2196D /* RegisterContextPOSIXCore_x86_64.cpp */, 26BC17A718C7F4CB00D2196D /* RegisterContextPOSIXCore_x86_64.h */, 26BC17A818C7F4CB00D2196D /* ThreadElfCore.cpp */, 26BC17A918C7F4CB00D2196D /* ThreadElfCore.h */, ); path = "elf-core"; sourceTree = ""; }; 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 = ""; }; 26BC7C1010F1B34800F91463 /* Core */ = { isa = PBXGroup; children = ( 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 */, 26BC7D5210F1B77400F91463 /* ArchSpec.h */, 26BC7E6B10F1B85900F91463 /* ArchSpec.cpp */, 26BC7D5410F1B77400F91463 /* Broadcaster.h */, 26BC7E6D10F1B85900F91463 /* Broadcaster.cpp */, 26BC7D5510F1B77400F91463 /* ClangForward.h */, 26BC7D5610F1B77400F91463 /* Communication.h */, 26BC7E6E10F1B85900F91463 /* Communication.cpp */, 26BC7D5710F1B77400F91463 /* Connection.h */, 26BC7E6F10F1B85900F91463 /* Connection.cpp */, 263664941140A4C10075843B /* Debugger.h */, 263664921140A4930075843B /* Debugger.cpp */, 26BC7D5E10F1B77400F91463 /* Disassembler.h */, 26BC7E7610F1B85900F91463 /* Disassembler.cpp */, 4C4EB7821E6A4DE7002035C0 /* DumpDataExtractor.h */, 4C4EB77F1E6A4DB8002035C0 /* DumpDataExtractor.cpp */, 26BC7D5F10F1B77400F91463 /* dwarf.h */, 26D9FDC612F784E60003F2EE /* EmulateInstruction.h */, 26D9FDC812F784FD0003F2EE /* EmulateInstruction.cpp */, 26BC7D6110F1B77400F91463 /* Event.h */, 26BC7E7910F1B85900F91463 /* Event.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 */, 26BC7D6710F1B77400F91463 /* Listener.h */, 26BC7E7E10F1B85900F91463 /* Listener.cpp */, 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 */, 26C6886D137880B900407EDF /* RegisterValue.h */, 26C6886E137880C400407EDF /* RegisterValue.cpp */, 26BC7D7410F1B77400F91463 /* Scalar.h */, 26BC7E8D10F1B85900F91463 /* Scalar.cpp */, 26BC7CF910F1B71400F91463 /* SearchFilter.h */, 26BC7E1510F1B83100F91463 /* SearchFilter.cpp */, 26BC7D7510F1B77400F91463 /* Section.h */, 26BC7E8E10F1B85900F91463 /* Section.cpp */, 26BC7D7610F1B77400F91463 /* SourceManager.h */, 26BC7E8F10F1B85900F91463 /* SourceManager.cpp */, 26BC7D7710F1B77400F91463 /* State.h */, 26BC7E9010F1B85900F91463 /* State.cpp */, 26BC7D7810F1B77400F91463 /* STLUtils.h */, 9A4F35111368A54100823F52 /* StreamAsynchronousIO.h */, 9A4F350F1368A51A00823F52 /* StreamAsynchronousIO.cpp */, 2623096E13D0EFFB006381D9 /* StreamBuffer.h */, 26BC7D7A10F1B77400F91463 /* StreamFile.h */, 26BC7E9210F1B85900F91463 /* StreamFile.cpp */, 26F2F8FD1B156678007857DE /* StructuredData.h */, AFEC3361194A8ABA00FF05C6 /* StructuredData.cpp */, 26B167A41123BF5500DC7B4F /* ThreadSafeValue.h */, 263FEDA5112CC1DA00E4C208 /* ThreadSafeSTLMap.h */, 940B01FE1D2D82220058795E /* ThreadSafeSTLVector.h */, 26BC7D7E10F1B77400F91463 /* Timer.h */, 26BC7E9610F1B85900F91463 /* Timer.cpp */, 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 = ""; }; 26BC7C4B10F1B6C100F91463 /* Symbol */ = { isa = PBXGroup; children = ( 3032B1B91CAAA400004BE1AB /* ClangUtil.h */, 3032B1B61CAAA3D1004BE1AB /* ClangUtil.cpp */, 6D0F61411C80AAAA00A4ECEE /* JavaASTContext.cpp */, 6D0F613C1C80AA8900A4ECEE /* DebugMacros.h */, 6D0F613D1C80AA8900A4ECEE /* JavaASTContext.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 */, 26BC7F1610F1B8EC00F91463 /* Declaration.cpp */, 49B01A2D15F67B1700666829 /* DeclVendor.h */, 26BC7C5910F1B6E900F91463 /* DWARFCallFrameInfo.h */, 26BC7F1710F1B8EC00F91463 /* DWARFCallFrameInfo.cpp */, 26BC7C5A10F1B6E900F91463 /* Function.h */, 26BC7F1810F1B8EC00F91463 /* Function.cpp */, 269FF07D12494F7D00225026 /* FuncUnwinders.h */, 961FABB81235DE1600F93A47 /* FuncUnwinders.cpp */, AEEA340F1ACA08A000AB639D /* GoASTContext.h */, AEFFBA7C1AC4835D0087B932 /* GoASTContext.cpp */, 26BC7C5B10F1B6E900F91463 /* LineEntry.h */, 26BC7F1910F1B8EC00F91463 /* LineEntry.cpp */, 26BC7C5C10F1B6E900F91463 /* LineTable.h */, 26BC7F1A10F1B8EC00F91463 /* LineTable.cpp */, 26BC7C5D10F1B6E900F91463 /* ObjectContainer.h */, 26BC7C5E10F1B6E900F91463 /* ObjectFile.h */, 26BC7F4C10F1BC1A00F91463 /* ObjectFile.cpp */, 4CC7C6551D52996C0076FF94 /* OCamlASTContext.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 = ""; }; 26BC7CEB10F1B70800F91463 /* Breakpoint */ = { isa = PBXGroup; children = ( 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 */, 26BC7CF510F1B71400F91463 /* BreakpointOptions.h */, 26BC7E1110F1B83100F91463 /* BreakpointOptions.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 = ""; }; 26BC7D0D10F1B71D00F91463 /* Commands */ = { isa = PBXGroup; children = ( 4CA9637A11B6E99A00780E28 /* CommandObjectApropos.h */, 4CA9637911B6E99A00780E28 /* CommandObjectApropos.cpp */, 499F381E11A5B3F300F5CE02 /* CommandObjectArgs.h */, 499F381F11A5B3F300F5CE02 /* CommandObjectArgs.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 */, 26BC7D2410F1B76300F91463 /* CommandObjectScript.h */, 26BC7E3D10F1B84700F91463 /* CommandObjectScript.cpp */, 26BC7D2710F1B76300F91463 /* CommandObjectSettings.h */, 26BC7E4010F1B84700F91463 /* CommandObjectSettings.cpp */, 26BC7D2910F1B76300F91463 /* CommandObjectSource.h */, 26BC7E4210F1B84700F91463 /* CommandObjectSource.cpp */, 26BC7D2C10F1B76300F91463 /* CommandObjectSyntax.h */, 26BC7E4510F1B84700F91463 /* CommandObjectSyntax.cpp */, 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 = ""; }; 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 */, 49A1CAC31430E8BD00306AC9 /* ExpressionSourceCode.cpp */, 4984BA171B979C08008658D4 /* ExpressionVariable.h */, 4984BA151B979973008658D4 /* ExpressionVariable.cpp */, 4C2479BE1BA39843009C9A7B /* ExpressionParser.h */, 26BC7DC310F1B79500F91463 /* DWARFExpression.h */, 26BC7ED810F1B86700F91463 /* DWARFExpression.cpp */, 49CF9833122C718B007A0B96 /* IRDynamicChecks.h */, 49CF9829122C70BD007A0B96 /* IRDynamicChecks.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 = ""; }; 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 */, 26BC7DD310F1B7D500F91463 /* Endian.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 */, 236124A61986B50E004EFC37 /* IOObject.h */, 267A47F31B14116E0021A5BC /* NativeBreakpoint.h */, 232CB60B191E00CC00EF39FC /* NativeBreakpoint.cpp */, 267A47F41B1411750021A5BC /* NativeBreakpointList.h */, 232CB60D191E00CC00EF39FC /* NativeBreakpointList.cpp */, 267A47F51B14117F0021A5BC /* NativeProcessProtocol.h */, 232CB60F191E00CC00EF39FC /* NativeProcessProtocol.cpp */, 267A47F61B14118F0021A5BC /* NativeRegisterContext.h */, 267A47FA1B1411C40021A5BC /* NativeRegisterContext.cpp */, 267A47F71B14119A0021A5BC /* NativeRegisterContextRegisterInfo.h */, 267A47FC1B1411CC0021A5BC /* NativeRegisterContextRegisterInfo.cpp */, 267A47F81B1411A40021A5BC /* NativeThreadProtocol.h */, 232CB611191E00CC00EF39FC /* NativeThreadProtocol.cpp */, 267A47F91B1411AC0021A5BC /* NativeWatchpointList.h */, 267A47FE1B1411D90021A5BC /* NativeWatchpointList.cpp */, A36FF33D17D8E98800244D40 /* OptionParser.h */, 260A39A519647A3A004B4130 /* Pipe.h */, 3F5E8AF31A40D4A500A73232 /* PipeBase.h */, 26BC7DD610F1B7D500F91463 /* Predicate.h */, 3FDFED2219BA6D55009756A7 /* ProcessRunLock.h */, 2654A68E1E552D2400DA1013 /* PseudoTerminal.h */, 2654A68C1E552D1500DA1013 /* PseudoTerminal.cpp */, 236124A71986B50E004EFC37 /* Socket.h */, 26D7E45B13D5E2F9007FD12B /* SocketAddress.h */, 26D7E45C13D5E30A007FD12B /* SocketAddress.cpp */, 267A47F21B14115A0021A5BC /* SoftwareBreakpoint.h */, 232CB613191E00CC00EF39FC /* SoftwareBreakpoint.cpp */, 2689B0A4113EE3CD00A4AEDB /* Symbols.h */, 268DA871130095D000C9483A /* Terminal.h */, 3FDFED2319BA6D55009756A7 /* ThreadLauncher.h */, 267A48031B1416080021A5BC /* XML.h */, 267A48001B1411E40021A5BC /* XML.cpp */, ); name = Host; sourceTree = ""; }; 26BC7DDF10F1B7E200F91463 /* Interpreter */ = { isa = PBXGroup; children = ( 25420ECE1A64911B009ADBCB /* OptionValueChar.h */, 25420ECC1A6490B8009ADBCB /* OptionValueChar.cpp */, 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 */, 23DDF224196C3EE600BB8417 /* CommandOptionValidators.cpp */, 26BC7DE410F1B7F900F91463 /* CommandReturnObject.h */, 26BC7F0A10F1B8DD00F91463 /* CommandReturnObject.cpp */, 94005E0513F45A1B001EF42D /* embedded_interpreter.py */, 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 */, 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 = ""; }; 26BC7DEF10F1B80200F91463 /* Target */ = { isa = PBXGroup; children = ( 230EC4571D63C3A7008DF59F /* CMakeLists.txt */, 8CF02AE019DCBF3B00B14BE0 /* InstrumentationRuntime.h */, 8CF02ADF19DCBF3B00B14BE0 /* InstrumentationRuntime.cpp */, 8CF02AEE19DD15CF00B14BE0 /* InstrumentationRuntimeStopInfo.h */, 8CF02AED19DD15CF00B14BE0 /* InstrumentationRuntimeStopInfo.cpp */, 3FDFD6C3199C396E009756A7 /* FileAction.h */, 3FDFDDBC199C3A06009756A7 /* FileAction.cpp */, 23EDE3311926843600F6A132 /* NativeRegisterContext.h */, 23EDE3301926839700F6A132 /* NativeRegisterContext.cpp */, 497E7B331188ED300065CCA1 /* ABI.h */, 497E7B9D1188F6690065CCA1 /* ABI.cpp */, 4CB443BB1249920C00C13DC2 /* CPPLanguageRuntime.h */, 4CB443BC1249920C00C13DC2 /* CPPLanguageRuntime.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 */, 233B007A1960A0440090E598 /* ProcessInfo.h */, 233B007B1960C9E60090E598 /* ProcessInfo.cpp */, 233B007E1960CB280090E598 /* ProcessLaunchInfo.cpp */, 233B007919609DB40090E598 /* ProcessLaunchInfo.h */, 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 */, 262173A018395D3800C52091 /* SectionLoadHistory.h */, 262173A218395D4600C52091 /* SectionLoadHistory.cpp */, 2618D78F1240115500F2B8FE /* SectionLoadList.h */, 2618D7911240116900F2B8FE /* SectionLoadList.cpp */, 26BC7DF510F1B81A00F91463 /* StackFrame.h */, 26BC7F3810F1B90C00F91463 /* StackFrame.cpp */, 26BC7DF610F1B81A00F91463 /* StackFrameList.h */, 26BC7F3910F1B90C00F91463 /* StackFrameList.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 = ""; }; 26BC7EE510F1B88100F91463 /* MacOSX */ = { isa = PBXGroup; children = ( 3FDFE56619AF9BB2009756A7 /* Config.h */, 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 */, 26BC7EE810F1B88F00F91463 /* Host.mm */, 3FDFE52B19A2917A009756A7 /* HostInfoMacOSX.mm */, 3FDFE52D19A291AF009756A7 /* HostInfoMacOSX.h */, 3FDFED0519B7C898009756A7 /* HostThreadMacOSX.mm */, 3FDFE56719AF9BB2009756A7 /* HostThreadMacOSX.h */, 2689B0B5113EE47E00A4AEDB /* Symbols.cpp */, ); name = MacOSX; sourceTree = ""; }; 26BF51E91B3C754400016294 /* SysV-hexagon */ = { isa = PBXGroup; children = ( 26BF51EA1B3C754400016294 /* ABISysV_hexagon.cpp */, 26BF51EB1B3C754400016294 /* ABISysV_hexagon.h */, ); path = "SysV-hexagon"; sourceTree = ""; }; 26BF51EE1B3C754400016294 /* SysV-i386 */ = { isa = PBXGroup; children = ( 26BF51EF1B3C754400016294 /* ABISysV_i386.cpp */, 26BF51F01B3C754400016294 /* ABISysV_i386.h */, ); path = "SysV-i386"; sourceTree = ""; }; 26C5577E132575B6008FD8FE /* Platform */ = { isa = PBXGroup; children = ( 6D55BAE61A8CD08C00A70529 /* Android */, 2694E99814FC0BB30076DE67 /* FreeBSD */, 264A97BC133918A30017F0BE /* GDB Server */, 23042D0F1976C9D800621B2C /* Kalimba */, 2694E99F14FC0BBD0076DE67 /* Linux */, 26C5577F132575C8008FD8FE /* MacOSX */, 26EFB6151BFE8D3E00544801 /* NetBSD */, 4CE4EFA51E89998800A80C06 /* OpenBSD */, 9457596415349416005A9070 /* POSIX */, 490A36BA180F0E6F00BA31F8 /* Windows */, ); path = Platform; sourceTree = ""; }; 26C5577F132575C8008FD8FE /* MacOSX */ = { isa = PBXGroup; children = ( 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 */, 9455630C1BEAD0570073F75F /* PlatformiOSSimulatorCoreSimulatorSupport.h */, 9455630D1BEAD0570073F75F /* PlatformiOSSimulatorCoreSimulatorSupport.mm */, 26C5577B132575AD008FD8FE /* PlatformMacOSX.cpp */, 26C5577C132575AD008FD8FE /* PlatformMacOSX.h */, AF3A4AD01EA05C4700B5DEB4 /* PlatformRemoteDarwinDevice.cpp */, AF3A4AD11EA05C4700B5DEB4 /* PlatformRemoteDarwinDevice.h */, AF8AD6331BEC28C400150209 /* PlatformRemoteAppleTV.cpp */, AF8AD6341BEC28C400150209 /* PlatformRemoteAppleTV.h */, AF8AD6351BEC28C400150209 /* PlatformRemoteAppleWatch.cpp */, AF8AD6361BEC28C400150209 /* PlatformRemoteAppleWatch.h */, 2675F6FE1332BE690067997B /* PlatformRemoteiOS.cpp */, 2675F6FF1332BE690067997B /* PlatformRemoteiOS.h */, ); path = MacOSX; sourceTree = ""; }; 26D9FDCA12F785120003F2EE /* Instruction */ = { isa = PBXGroup; children = ( E778E99D1B062D1700247609 /* MIPS */, 26D9FDCB12F785270003F2EE /* ARM */, 264A12F91372522000875C42 /* ARM64 */, 94A5B3941AB9FE5F00A5EE7F /* MIPS64 */, ); path = Instruction; sourceTree = ""; }; 26D9FDCB12F785270003F2EE /* ARM */ = { isa = PBXGroup; children = ( 9A22A15D135E30370024DDC3 /* EmulateInstructionARM.cpp */, 9A22A15E135E30370024DDC3 /* EmulateInstructionARM.h */, 9A22A15F135E30370024DDC3 /* EmulationStateARM.cpp */, 9A22A160135E30370024DDC3 /* EmulationStateARM.h */, ); path = ARM; sourceTree = ""; }; 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 */, ); path = ABI; sourceTree = ""; }; 26DB3E061379E7AD0080DC73 /* MacOSX-arm */ = { isa = PBXGroup; children = ( 26DB3E071379E7AD0080DC73 /* ABIMacOSX_arm.cpp */, 26DB3E081379E7AD0080DC73 /* ABIMacOSX_arm.h */, ); path = "MacOSX-arm"; sourceTree = ""; }; 26DB3E0A1379E7AD0080DC73 /* MacOSX-arm64 */ = { isa = PBXGroup; children = ( 26DB3E0B1379E7AD0080DC73 /* ABIMacOSX_arm64.cpp */, 26DB3E0C1379E7AD0080DC73 /* ABIMacOSX_arm64.h */, ); path = "MacOSX-arm64"; sourceTree = ""; }; 26DB3E0E1379E7AD0080DC73 /* MacOSX-i386 */ = { isa = PBXGroup; children = ( 26DB3E0F1379E7AD0080DC73 /* ABIMacOSX_i386.cpp */, 26DB3E101379E7AD0080DC73 /* ABIMacOSX_i386.h */, ); path = "MacOSX-i386"; sourceTree = ""; }; 26DB3E121379E7AD0080DC73 /* SysV-x86_64 */ = { isa = PBXGroup; children = ( 26DB3E131379E7AD0080DC73 /* ABISysV_x86_64.cpp */, 26DB3E141379E7AD0080DC73 /* ABISysV_x86_64.h */, ); path = "SysV-x86_64"; sourceTree = ""; }; 26E152221419CACA007967D0 /* PECOFF */ = { isa = PBXGroup; children = ( 26E152231419CACA007967D0 /* ObjectFilePECOFF.cpp */, 26E152241419CACA007967D0 /* ObjectFilePECOFF.h */, 26C7C4811BFFEA7E009BD01F /* WindowsMiniDump.cpp */, 26C7C4821BFFEA7E009BD01F /* WindowsMiniDump.h */, ); path = PECOFF; sourceTree = ""; }; 26EFB6151BFE8D3E00544801 /* NetBSD */ = { isa = PBXGroup; children = ( 26EFB6181BFE8D3E00544801 /* PlatformNetBSD.cpp */, 26EFB6191BFE8D3E00544801 /* PlatformNetBSD.h */, ); path = NetBSD; sourceTree = ""; }; 26EFC4C718CFAF0D00865D87 /* JIT */ = { isa = PBXGroup; children = ( 26EFC4CA18CFAF0D00865D87 /* ObjectFileJIT.cpp */, 26EFC4CB18CFAF0D00865D87 /* ObjectFileJIT.h */, ); path = JIT; sourceTree = ""; }; 26F006521B4DD86700B872E5 /* Windows-DYLD */ = { isa = PBXGroup; children = ( 26F006541B4DD86700B872E5 /* DynamicLoaderWindowsDYLD.cpp */, 26F006551B4DD86700B872E5 /* DynamicLoaderWindowsDYLD.h */, ); path = "Windows-DYLD"; sourceTree = ""; }; 26F5C22410F3D950009D5894 /* Tools */ = { isa = PBXGroup; children = ( E769331B1A94D10E00C73337 /* lldb-server */, 942829BA1A89830900521B30 /* argdumper */, 26579F55126A255E0007C5CB /* darwin-debug */, 265E9BE0115C2B8500D0DCCB /* debugserver */, 26F5C22510F3D956009D5894 /* Driver */, 2665CD0915080846002C8FAE /* install-headers */, ); name = Tools; sourceTree = ""; usesTabs = 0; }; 26F5C22510F3D956009D5894 /* Driver */ = { isa = PBXGroup; children = ( 26F5C27210F3D9E4009D5894 /* lldb-Info.plist */, 26F5C27410F3D9E4009D5894 /* Driver.h */, 26F5C27310F3D9E4009D5894 /* Driver.cpp */, ); name = Driver; sourceTree = ""; }; 26F5C32810F3DF7D009D5894 /* Libraries */ = { isa = PBXGroup; children = ( 26F5C39010F3FA26009D5894 /* CoreFoundation.framework */, 265ABF6210F42EE900531910 /* DebugSymbols.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 = ""; usesTabs = 0; }; 26FFC19214FC072100087D58 /* POSIX-DYLD */ = { isa = PBXGroup; children = ( 26FFC19314FC072100087D58 /* AuxVector.cpp */, 26FFC19414FC072100087D58 /* AuxVector.h */, 26FFC19514FC072100087D58 /* DYLDRendezvous.cpp */, 26FFC19614FC072100087D58 /* DYLDRendezvous.h */, 26FFC19714FC072100087D58 /* DynamicLoaderPOSIXDYLD.cpp */, 26FFC19814FC072100087D58 /* DynamicLoaderPOSIXDYLD.h */, ); path = "POSIX-DYLD"; sourceTree = ""; }; 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 = ""; }; 3FBA69DA1B6066D20008F44A /* ScriptInterpreter */ = { isa = PBXGroup; children = ( 3FBA69DC1B6066E90008F44A /* None */, 3FBA69DB1B6066E40008F44A /* Python */, ); name = ScriptInterpreter; sourceTree = ""; }; 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 = ""; }; 3FBA69DC1B6066E90008F44A /* None */ = { isa = PBXGroup; children = ( 3FBA69DD1B6067020008F44A /* ScriptInterpreterNone.cpp */, 3FBA69DE1B6067020008F44A /* ScriptInterpreterNone.h */, ); name = None; sourceTree = ""; }; 3FDFDDC4199D37BE009756A7 /* posix */ = { isa = PBXGroup; children = ( 2579065E1BD0488D00178368 /* DomainSocket.cpp */, 255EFF751AFABA950069F277 /* LockFilePosix.cpp */, - 30DED5DC1B4ECB17004CC508 /* MainLoopPosix.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 = ""; }; 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 = ""; }; 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 = ""; }; 490A36BA180F0E6F00BA31F8 /* Windows */ = { isa = PBXGroup; children = ( 490A36BD180F0E6F00BA31F8 /* PlatformWindows.cpp */, 490A36BE180F0E6F00BA31F8 /* PlatformWindows.h */, ); path = Windows; sourceTree = ""; }; 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 = ""; }; 4984BA0B1B975E9F008658D4 /* ExpressionParser */ = { isa = PBXGroup; children = ( 4984BA0C1B97620B008658D4 /* Clang */, AE44FB371BB35A2E0033EB62 /* Go */, ); name = ExpressionParser; sourceTree = ""; }; 4984BA0C1B97620B008658D4 /* Clang */ = { isa = PBXGroup; children = ( 4C3DA2301CA0BFB800CEB1D4 /* ClangDiagnostic.h */, 4C98D3E0118FB98F00E575D0 /* ClangFunctionCaller.h */, 4C98D3DA118FB96F00E575D0 /* ClangFunctionCaller.cpp */, 26BC7DC010F1B79500F91463 /* ClangExpressionHelper.h */, 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 */, 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 */, 49307AB111DEA4F20081F992 /* IRForTarget.h */, 49307AAD11DEA4D90081F992 /* IRForTarget.cpp */, 4984BA0F1B978C3E008658D4 /* ClangExpressionVariable.h */, 4984BA0E1B978C3E008658D4 /* ClangExpressionVariable.cpp */, ); name = Clang; sourceTree = ""; }; 4CC7C64B1D5298AB0076FF94 /* OCaml */ = { isa = PBXGroup; children = ( 4CC7C64C1D5298E20076FF94 /* OCamlLanguage.h */, 4CC7C64D1D5298E20076FF94 /* OCamlLanguage.cpp */, ); name = OCaml; sourceTree = ""; }; 4CCA643A13B40B82003BDF98 /* LanguageRuntime */ = { isa = PBXGroup; children = ( 6D0F61491C80AAF200A4ECEE /* Java */, AE44FB3B1BB485730033EB62 /* Go */, 49724D961AD6ECFA0033C538 /* RenderScript */, 4CCA643B13B40B82003BDF98 /* CPlusPlus */, 4CCA644013B40B82003BDF98 /* ObjC */, ); path = LanguageRuntime; sourceTree = ""; }; 4CCA643B13B40B82003BDF98 /* CPlusPlus */ = { isa = PBXGroup; children = ( 4CCA643C13B40B82003BDF98 /* ItaniumABI */, ); path = CPlusPlus; sourceTree = ""; }; 4CCA643C13B40B82003BDF98 /* ItaniumABI */ = { isa = PBXGroup; children = ( 4CCA643D13B40B82003BDF98 /* ItaniumABILanguageRuntime.cpp */, 4CCA643E13B40B82003BDF98 /* ItaniumABILanguageRuntime.h */, ); path = ItaniumABI; sourceTree = ""; }; 4CCA644013B40B82003BDF98 /* ObjC */ = { isa = PBXGroup; children = ( 4CCA644113B40B82003BDF98 /* AppleObjCRuntime */, ); path = ObjC; sourceTree = ""; }; 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 = ""; }; 4CE4EFA51E89998800A80C06 /* OpenBSD */ = { isa = PBXGroup; children = ( 4CE4EFA61E8999B000A80C06 /* PlatformOpenBSD.cpp */, 4CE4EFA71E8999B000A80C06 /* PlatformOpenBSD.h */, ); path = OpenBSD; sourceTree = ""; }; 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 */, 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 = ""; }; 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 */, 236124A21986B4E2004EFC37 /* IOObject.cpp */, A36FF33B17D8E94600244D40 /* OptionParser.cpp */, AF37E10917C861F20061E18E /* ProcessRunLock.cpp */, 236124A31986B4E2004EFC37 /* Socket.cpp */, 69A01E1F1236C5D400C660B5 /* Symbols.cpp */, 268DA873130095ED00C9483A /* Terminal.cpp */, 3FDFED2619BA6D96009756A7 /* ThreadLauncher.cpp */, ); name = common; path = source/Host/common; sourceTree = ""; }; 6D0F61491C80AAF200A4ECEE /* Java */ = { isa = PBXGroup; children = ( 6D0F614A1C80AB0400A4ECEE /* JavaLanguageRuntime.cpp */, 6D0F614B1C80AB0400A4ECEE /* JavaLanguageRuntime.h */, ); name = Java; sourceTree = ""; }; 6D0F61501C80AB1400A4ECEE /* Java */ = { isa = PBXGroup; children = ( 6D0F61511C80AB3000A4ECEE /* JavaFormatterFunctions.cpp */, 6D0F61521C80AB3000A4ECEE /* JavaFormatterFunctions.h */, 6D0F61531C80AB3000A4ECEE /* JavaLanguage.cpp */, 6D0F61541C80AB3000A4ECEE /* JavaLanguage.h */, ); name = Java; sourceTree = ""; }; 6D55B29B1A8CCFF000A70529 /* android */ = { isa = PBXGroup; children = ( 6D55BAE21A8CD06000A70529 /* Android.h */, 6D55BAE31A8CD06000A70529 /* Config.h */, 6D55BAE41A8CD06000A70529 /* HostInfoAndroid.h */, 6D55BAE01A8CD03D00A70529 /* HostInfoAndroid.cpp */, ); name = android; sourceTree = ""; }; 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 = ""; }; 8C26C4221C3EA4050031DF7C /* ThreadSanitizer */ = { isa = PBXGroup; children = ( 8C26C4241C3EA4340031DF7C /* ThreadSanitizerRuntime.cpp */, 8C26C4251C3EA4340031DF7C /* ThreadSanitizerRuntime.h */, ); name = ThreadSanitizer; sourceTree = ""; }; 8C2D6A58197A1FB9006989C9 /* MemoryHistory */ = { isa = PBXGroup; children = ( 8C2D6A59197A1FCD006989C9 /* asan */, ); path = MemoryHistory; sourceTree = ""; }; 8C2D6A59197A1FCD006989C9 /* asan */ = { isa = PBXGroup; children = ( 8C2D6A5A197A1FDC006989C9 /* MemoryHistoryASan.cpp */, 8C2D6A5B197A1FDC006989C9 /* MemoryHistoryASan.h */, ); path = asan; sourceTree = ""; }; 8CF02ADD19DCBEC200B14BE0 /* InstrumentationRuntime */ = { isa = PBXGroup; children = ( 8C26C4221C3EA4050031DF7C /* ThreadSanitizer */, 8CF02ADE19DCBEE600B14BE0 /* AddressSanitizer */, ); path = InstrumentationRuntime; sourceTree = ""; }; 8CF02ADE19DCBEE600B14BE0 /* AddressSanitizer */ = { isa = PBXGroup; children = ( 8CF02AE519DCBF8400B14BE0 /* AddressSanitizerRuntime.cpp */, 8CF02AE619DCBF8400B14BE0 /* AddressSanitizerRuntime.h */, ); path = AddressSanitizer; sourceTree = ""; }; 942829BA1A89830900521B30 /* argdumper */ = { isa = PBXGroup; children = ( 940B04D81A8984FF0045D5F7 /* argdumper.cpp */, ); name = argdumper; sourceTree = ""; }; 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 */, 945261B71B9A11E800BF138D /* LibCxxInitializerList.cpp */, 945261B81B9A11E800BF138D /* LibCxxList.cpp */, 945261B91B9A11E800BF138D /* LibCxxMap.cpp */, 945261BA1B9A11E800BF138D /* LibCxxUnorderedMap.cpp */, 945261BB1B9A11E800BF138D /* LibCxxVector.cpp */, 945261BD1B9A11E800BF138D /* LibStdcpp.h */, 945261BC1B9A11E800BF138D /* LibStdcpp.cpp */, ); name = Formatters; sourceTree = ""; }; 9457596415349416005A9070 /* POSIX */ = { isa = PBXGroup; children = ( 945759651534941F005A9070 /* PlatformPOSIX.cpp */, 945759661534941F005A9070 /* PlatformPOSIX.h */, ); name = POSIX; sourceTree = ""; }; 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 = ""; }; 94A5B3941AB9FE5F00A5EE7F /* MIPS64 */ = { isa = PBXGroup; children = ( 94A5B3951AB9FE8300A5EE7F /* EmulateInstructionMIPS64.cpp */, 94A5B3961AB9FE8300A5EE7F /* EmulateInstructionMIPS64.h */, ); name = MIPS64; sourceTree = ""; }; 94B638541B8FABEA004FE1E4 /* Language */ = { isa = PBXGroup; children = ( 6D0F61501C80AB1400A4ECEE /* Java */, 94B6385A1B8FB109004FE1E4 /* CPlusPlus */, AE44FB431BB4BAC20033EB62 /* Go */, 94B638551B8FAC87004FE1E4 /* ObjC */, 94B638601B8FB7BE004FE1E4 /* ObjCPlusPlus */, 4CC7C64B1D5298AB0076FF94 /* OCaml */, ); name = Language; sourceTree = ""; }; 94B638551B8FAC87004FE1E4 /* ObjC */ = { isa = PBXGroup; children = ( 949EED9D1BA74AB6008C63CF /* Formatters */, 94B6385F1B8FB7A2004FE1E4 /* ObjCLanguage.h */, 94B6385E1B8FB7A2004FE1E4 /* ObjCLanguage.cpp */, ); name = ObjC; sourceTree = ""; }; 94B6385A1B8FB109004FE1E4 /* CPlusPlus */ = { isa = PBXGroup; children = ( 945261B01B9A11BE00BF138D /* Formatters */, 94B6385C1B8FB174004FE1E4 /* CPlusPlusLanguage.h */, 94B6385B1B8FB174004FE1E4 /* CPlusPlusLanguage.cpp */, 49F811F01E931B1500F4E163 /* CPlusPlusNameParser.h */, 49F811EF1E931B1500F4E163 /* CPlusPlusNameParser.cpp */, ); name = CPlusPlus; sourceTree = ""; }; 94B638601B8FB7BE004FE1E4 /* ObjCPlusPlus */ = { isa = PBXGroup; children = ( 94B638611B8FB7E9004FE1E4 /* ObjCPlusPlusLanguage.h */, 94B638621B8FB7F1004FE1E4 /* ObjCPlusPlusLanguage.cpp */, ); name = ObjCPlusPlus; sourceTree = ""; }; 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 = ""; }; 9694FA6E1B32AA35005EBB16 /* SysV-mips */ = { isa = PBXGroup; children = ( 9694FA6F1B32AA64005EBB16 /* ABISysV_mips.cpp */, 9694FA701B32AA64005EBB16 /* ABISysV_mips.h */, ); name = "SysV-mips"; sourceTree = ""; }; AE44FB371BB35A2E0033EB62 /* Go */ = { isa = PBXGroup; children = ( AE44FB261BB07DC60033EB62 /* GoAST.h */, AE44FB271BB07DC60033EB62 /* GoLexer.h */, AE44FB2A1BB07DD80033EB62 /* GoLexer.cpp */, AE44FB281BB07DC60033EB62 /* GoParser.h */, AE44FB2B1BB07DD80033EB62 /* GoParser.cpp */, AE44FB291BB07DC60033EB62 /* GoUserExpression.h */, AE44FB2C1BB07DD80033EB62 /* GoUserExpression.cpp */, ); name = Go; sourceTree = ""; }; AE44FB3B1BB485730033EB62 /* Go */ = { isa = PBXGroup; children = ( AE44FB3C1BB4858A0033EB62 /* GoLanguageRuntime.h */, AE44FB3D1BB485960033EB62 /* GoLanguageRuntime.cpp */, ); name = Go; sourceTree = ""; }; AE44FB431BB4BAC20033EB62 /* Go */ = { isa = PBXGroup; children = ( AE44FB491BB4BB1B0033EB62 /* Formatters */, AE44FB461BB4BB090033EB62 /* GoLanguage.h */, AE44FB451BB4BB090033EB62 /* GoLanguage.cpp */, ); name = Go; sourceTree = ""; }; AE44FB491BB4BB1B0033EB62 /* Formatters */ = { isa = PBXGroup; children = ( AE44FB4B1BB4BB540033EB62 /* GoFormatterFunctions.h */, AE44FB4A1BB4BB540033EB62 /* GoFormatterFunctions.cpp */, ); name = Formatters; sourceTree = ""; }; AE8F624519EF3DFC00326B21 /* Go */ = { isa = PBXGroup; children = ( AE8F624719EF3E1E00326B21 /* OperatingSystemGo.cpp */, AE8F624819EF3E1E00326B21 /* OperatingSystemGo.h */, ); name = Go; sourceTree = ""; }; AEC6FF9D1BE97035007882C1 /* Expression */ = { isa = PBXGroup; children = ( 23CB14F31D66CC9B00EDDDE1 /* CMakeLists.txt */, AEC6FF9F1BE970A2007882C1 /* GoParserTest.cpp */, ); path = Expression; sourceTree = ""; }; AF11CB34182CA85A00D9B618 /* SystemRuntime */ = { isa = PBXGroup; children = ( AF11CB35182CA85A00D9B618 /* MacOSX */, ); path = SystemRuntime; sourceTree = ""; }; 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 = ""; }; AF20F7621AF18F5E00751A6E /* SysV-arm */ = { isa = PBXGroup; children = ( AF20F7641AF18F8500751A6E /* ABISysV_arm.cpp */, AF20F7651AF18F8500751A6E /* ABISysV_arm.h */, ); name = "SysV-arm"; sourceTree = ""; }; AF20F7631AF18F6800751A6E /* SysV-arm64 */ = { isa = PBXGroup; children = ( AF20F7681AF18F9000751A6E /* ABISysV_arm64.cpp */, AF20F7691AF18F9000751A6E /* ABISysV_arm64.h */, ); name = "SysV-arm64"; sourceTree = ""; }; AF248A4B1DA71C67000B814D /* InstEmulation */ = { isa = PBXGroup; children = ( AF248A4C1DA71C77000B814D /* TestArm64InstEmulation.cpp */, ); name = InstEmulation; sourceTree = ""; }; AF2BCA6518C7EFDE005B4526 /* JITLoader */ = { isa = PBXGroup; children = ( AF2BCA6718C7EFDE005B4526 /* GDB */, ); path = JITLoader; sourceTree = ""; }; AF2BCA6718C7EFDE005B4526 /* GDB */ = { isa = PBXGroup; children = ( AF2BCA6A18C7EFDE005B4526 /* JITLoaderGDB.h */, AF2BCA6918C7EFDE005B4526 /* JITLoaderGDB.cpp */, ); path = GDB; sourceTree = ""; }; AF6335DF1C87B20A00F7D554 /* PDB */ = { isa = PBXGroup; children = ( 4C562CC21CC07DDD00C52EAC /* PDBASTParser.cpp */, 4C562CC31CC07DDD00C52EAC /* PDBASTParser.h */, AF6335E01C87B21E00F7D554 /* SymbolFilePDB.cpp */, AF6335E11C87B21E00F7D554 /* SymbolFilePDB.h */, ); name = PDB; sourceTree = ""; }; AF77E08B1A033C3E0096C0EA /* SysV-ppc */ = { isa = PBXGroup; children = ( AF77E08D1A033C700096C0EA /* ABISysV_ppc.cpp */, AF77E08E1A033C700096C0EA /* ABISysV_ppc.h */, ); name = "SysV-ppc"; sourceTree = ""; }; AF77E08C1A033C4B0096C0EA /* SysV-ppc64 */ = { isa = PBXGroup; children = ( AF77E0911A033C7F0096C0EA /* ABISysV_ppc64.cpp */, AF77E0921A033C7F0096C0EA /* ABISysV_ppc64.h */, ); name = "SysV-ppc64"; sourceTree = ""; }; AFAFD8081E57E19E0017A14F /* Target */ = { isa = PBXGroup; children = ( AFAFD8091E57E1B90017A14F /* ModuleCacheTest.cpp */, ); name = Target; sourceTree = ""; }; AFEC5FD31D94F9130076A480 /* UnwindAssembly */ = { isa = PBXGroup; children = ( AF248A4B1DA71C67000B814D /* InstEmulation */, AFEC5FD41D94F9270076A480 /* x86 */, ); name = UnwindAssembly; sourceTree = ""; }; AFEC5FD41D94F9270076A480 /* x86 */ = { isa = PBXGroup; children = ( AFEC5FD51D94F9380076A480 /* Testx86AssemblyInspectionEngine.cpp */, ); name = x86; sourceTree = ""; }; 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 */, ); name = "lldb-server"; sourceTree = ""; }; E778E99D1B062D1700247609 /* MIPS */ = { isa = PBXGroup; children = ( E778E99F1B062D1700247609 /* EmulateInstructionMIPS.cpp */, E778E9A01B062D1700247609 /* EmulateInstructionMIPS.h */, ); path = MIPS; sourceTree = ""; }; /* 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 */, 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 */, 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 */, 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 */, AF3A4AD31EA05C4700B5DEB4 /* PlatformRemoteDarwinDevice.h in Headers */, AF33B4BF1C1FA441001B28D9 /* NetBSDSignals.h in Headers */, AF6335E31C87B21E00F7D554 /* SymbolFilePDB.h in Headers */, 267F685A1CC02EBE0086832B /* RegisterInfos_s390x.h in Headers */, 267F68541CC02E920086832B /* RegisterContextLinux_s390x.h in Headers */, 267F68501CC02E270086832B /* RegisterContextPOSIXCore_s390x.h in Headers */, 4984BA181B979C08008658D4 /* ExpressionVariable.h in Headers */, 26C7C4841BFFEA7E009BD01F /* WindowsMiniDump.h in Headers */, 30B38A001CAAA6D7009524E3 /* ClangUtil.h in Headers */, AFD65C821D9B5B2E00D93120 /* RegisterContextMinidump_x86_64.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 */, 238F2BA21D2C835A001FF92A /* SystemRuntime.h in Headers */, 260A63171861008E00FECF8E /* IOHandler.h in Headers */, 267F68581CC02EAE0086832B /* RegisterContextPOSIX_s390x.h in Headers */, 6D0F614F1C80AB0C00A4ECEE /* JavaLanguageRuntime.h in Headers */, AF27AD561D3603EA00CF2833 /* DynamicLoaderDarwin.h in Headers */, AFCB2BBE1BF577F40018B553 /* PythonExceptionState.h in Headers */, 267F684B1CC02DED0086832B /* ABISysV_s390x.h in Headers */, AF8AD6311BEC28A400150209 /* PlatformAppleWatchSimulator.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) --session-file-format fm --results-formatter lldbsuite.test_event.formatter.xunit.XunitFormatter --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"; }; 2687EAC51508110B00DD8C2E /* install-headers */ = { isa = PBXLegacyTarget; buildArgumentsString = "$(ACTION)"; buildConfigurationList = 2687EAC61508110B00DD8C2E /* Build configuration list for PBXLegacyTarget "install-headers" */; buildPhases = ( ); buildToolPath = /usr/bin/make; buildWorkingDirectory = "$(SRCROOT)/tools/install-headers"; dependencies = ( ); name = "install-headers"; passBuildSettingsInEnvironment = 1; productName = "install-headers"; }; /* 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"; }; 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 = ( 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; }; 2690CD161A6DC0D000E717C8 = { CreatedOnToolsVersion = 6.3; }; 942829BF1A89835300521B30 = { CreatedOnToolsVersion = 7.0; }; }; }; buildConfigurationList = 1DEB91EF08733DB70010E9CD /* Build configuration list for PBXProject "lldb" */; compatibilityVersion = "Xcode 3.2"; developmentRegion = English; hasScannedForEncodings = 1; knownRegions = ( en, ); mainGroup = 08FB7794FE84155DC02AAC07 /* lldb */; projectDirPath = ""; projectReferences = ( { ProductGroup = 265E9BE2115C2BAA00D0DCCB /* Products */; ProjectRef = 265E9BE1115C2BAA00D0DCCB /* debugserver.xcodeproj */; }, ); projectRoot = ""; targets = ( 26CEF3B114FD592B007286B2 /* desktop */, 26CEF3A914FD58BF007286B2 /* desktop_no_xpc */, 26CEF3BC14FD596A007286B2 /* ios */, 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 */, 2687EAC51508110B00DD8C2E /* install-headers */, 2690CD161A6DC0D000E717C8 /* lldb-mi */, 942829BF1A89835300521B30 /* lldb-argdumper */, ); }; /* 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}"; }; 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\t/usr/bin/sed -i '' 's/\\(#include\\)[ ]*\"lldb\\/\\(API\\/\\)\\{0,1\\}\\(.*\\)\"/\\1 /1' \"$file\"\n\t/usr/bin/sed -i '' 's| // for assert #include // for uint32_t #include // for PRIx64 #include // for map #include // for va_end #include // for size_t #include // for move #include // for find, pair namespace lldb_private { class CompilerDeclContext; } namespace lldb_private { class VariableList; } using namespace lldb; using namespace lldb_private; // Shared pointers to modules track module lifetimes in // targets and in the global module, but this collection // will track all module objects that are still alive typedef std::vector ModuleCollection; static ModuleCollection &GetModuleCollection() { // This module collection needs to live past any module, so we could either // make it a // shared pointer in each module or just leak is. Since it is only an empty // vector by // the time all the modules have gone away, we just leak it for now. If we // decide this // is a big problem we can introduce a Finalize method that will tear // everything down in // a predictable order. static ModuleCollection *g_module_collection = nullptr; if (g_module_collection == nullptr) g_module_collection = new ModuleCollection(); return *g_module_collection; } std::recursive_mutex &Module::GetAllocationModuleCollectionMutex() { // NOTE: The mutex below must be leaked since the global module list in // the ModuleList class will get torn at some point, and we can't know // if it will tear itself down before the "g_module_collection_mutex" below // will. So we leak a Mutex object below to safeguard against that static std::recursive_mutex *g_module_collection_mutex = nullptr; if (g_module_collection_mutex == nullptr) g_module_collection_mutex = new std::recursive_mutex; // NOTE: known leak return *g_module_collection_mutex; } size_t Module::GetNumberAllocatedModules() { std::lock_guard guard( GetAllocationModuleCollectionMutex()); return GetModuleCollection().size(); } Module *Module::GetAllocatedModuleAtIndex(size_t idx) { std::lock_guard guard( GetAllocationModuleCollectionMutex()); ModuleCollection &modules = GetModuleCollection(); if (idx < modules.size()) return modules[idx]; return nullptr; } #if 0 // These functions help us to determine if modules are still loaded, yet don't require that // you have a command interpreter and can easily be called from an external debugger. namespace lldb { void ClearModuleInfo (void) { const bool mandatory = true; ModuleList::RemoveOrphanSharedModules(mandatory); } void DumpModuleInfo (void) { Mutex::Locker locker (Module::GetAllocationModuleCollectionMutex()); ModuleCollection &modules = GetModuleCollection(); const size_t count = modules.size(); printf ("%s: %" PRIu64 " modules:\n", LLVM_PRETTY_FUNCTION, (uint64_t)count); for (size_t i = 0; i < count; ++i) { StreamString strm; Module *module = modules[i]; const bool in_shared_module_list = ModuleList::ModuleIsInCache (module); module->GetDescription(&strm, eDescriptionLevelFull); printf ("%p: shared = %i, ref_count = %3u, module = %s\n", module, in_shared_module_list, (uint32_t)module->use_count(), strm.GetString().c_str()); } } } #endif Module::Module(const ModuleSpec &module_spec) : m_object_offset(0), m_file_has_changed(false), m_first_file_changed_log(false) { // Scope for locker below... { std::lock_guard guard( GetAllocationModuleCollectionMutex()); GetModuleCollection().push_back(this); } 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(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 ModuleSpecList modules_specs; if (ObjectFile::GetModuleSpecifications(module_spec.GetFileSpec(), 0, 0, modules_specs) == 0) return; // Now make sure that one of the module specifications matches what we just // extract. We might have a module specification that specifies a file // "/usr/lib/dyld" // with UUID XXX, but we might have a local version of "/usr/lib/dyld" that // has // UUID YYY and we don't want those to match. If they don't match, just don't // fill any ivars in so we don't accidentally grab the wrong file later since // they don't match... ModuleSpec matching_module_spec; if (modules_specs.FindMatchingModuleSpec(module_spec, matching_module_spec) == 0) return; if (module_spec.GetFileSpec()) m_mod_time = FileSystem::GetModificationTime(module_spec.GetFileSpec()); else if (matching_module_spec.GetFileSpec()) m_mod_time = FileSystem::GetModificationTime(matching_module_spec.GetFileSpec()); // Copy the architecture from the actual spec if we got one back, else use the // one that was specified if (matching_module_spec.GetArchitecture().IsValid()) m_arch = matching_module_spec.GetArchitecture(); else if (module_spec.GetArchitecture().IsValid()) m_arch = module_spec.GetArchitecture(); // Copy the file spec over and use the specified one (if there was one) so we // don't use a path that might have gotten resolved a path in // 'matching_module_spec' if (module_spec.GetFileSpec()) m_file = module_spec.GetFileSpec(); else if (matching_module_spec.GetFileSpec()) m_file = matching_module_spec.GetFileSpec(); // Copy the platform file spec over if (module_spec.GetPlatformFileSpec()) m_platform_file = module_spec.GetPlatformFileSpec(); else if (matching_module_spec.GetPlatformFileSpec()) m_platform_file = matching_module_spec.GetPlatformFileSpec(); // Copy the symbol file spec over if (module_spec.GetSymbolFileSpec()) m_symfile_spec = module_spec.GetSymbolFileSpec(); else if (matching_module_spec.GetSymbolFileSpec()) m_symfile_spec = matching_module_spec.GetSymbolFileSpec(); // Copy the object name over if (matching_module_spec.GetObjectName()) m_object_name = matching_module_spec.GetObjectName(); else m_object_name = module_spec.GetObjectName(); // Always trust the object offset (file offset) and object modification // time (for mod time in a BSD static archive) of from the matching // module specification m_object_offset = matching_module_spec.GetObjectOffset(); m_object_mod_time = matching_module_spec.GetObjectModificationTime(); } Module::Module(const FileSpec &file_spec, const ArchSpec &arch, const ConstString *object_name, lldb::offset_t object_offset, const llvm::sys::TimePoint<> &object_mod_time) : m_mod_time(FileSystem::GetModificationTime(file_spec)), m_arch(arch), m_file(file_spec), m_object_offset(object_offset), m_object_mod_time(object_mod_time), m_file_has_changed(false), m_first_file_changed_log(false) { // Scope for locker below... { std::lock_guard guard( GetAllocationModuleCollectionMutex()); GetModuleCollection().push_back(this); } if (object_name) m_object_name = *object_name; 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(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() : m_object_offset(0), m_file_has_changed(false), m_first_file_changed_log(false) { std::lock_guard guard( GetAllocationModuleCollectionMutex()); GetModuleCollection().push_back(this); } Module::~Module() { // Lock our module down while we tear everything down to make sure // we don't get any access to the module while it is being destroyed std::lock_guard guard(m_mutex); // Scope for locker below... { std::lock_guard guard( GetAllocationModuleCollectionMutex()); ModuleCollection &modules = GetModuleCollection(); ModuleCollection::iterator end = modules.end(); ModuleCollection::iterator pos = std::find(modules.begin(), end, this); assert(pos != end); modules.erase(pos); } 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(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 // here because symbol files can require the module object file. So we tear // down the symbol file first, then the object file. m_sections_ap.reset(); m_symfile_ap.reset(); m_objfile_sp.reset(); } ObjectFile *Module::GetMemoryObjectFile(const lldb::ProcessSP &process_sp, lldb::addr_t header_addr, Error &error, size_t size_to_read) { if (m_objfile_sp) { error.SetErrorString("object file already exists"); } else { std::lock_guard guard(m_mutex); if (process_sp) { m_did_load_objfile = true; auto data_ap = llvm::make_unique(size_to_read, 0); Error readmem_error; const size_t bytes_read = process_sp->ReadMemory(header_addr, data_ap->GetBytes(), data_ap->GetByteSize(), readmem_error); if (bytes_read == size_to_read) { DataBufferSP data_sp(data_ap.release()); m_objfile_sp = ObjectFile::FindPlugin(shared_from_this(), process_sp, header_addr, data_sp); if (m_objfile_sp) { StreamString s; s.Printf("0x%16.16" PRIx64, header_addr); m_object_name.SetString(s.GetString()); // Once we get the object file, update our module with the object // file's // architecture since it might differ in vendor/os if some parts were // unknown. m_objfile_sp->GetArchitecture(m_arch); } else { error.SetErrorString("unable to find suitable object file plug-in"); } } else { error.SetErrorStringWithFormat("unable to read header from memory: %s", readmem_error.AsCString()); } } else { error.SetErrorString("invalid process"); } } return m_objfile_sp.get(); } const lldb_private::UUID &Module::GetUUID() { if (!m_did_parse_uuid.load()) { std::lock_guard guard(m_mutex); if (!m_did_parse_uuid.load()) { ObjectFile *obj_file = GetObjectFile(); if (obj_file != nullptr) { obj_file->GetUUID(&m_uuid); m_did_parse_uuid = true; } } } return m_uuid; } TypeSystem *Module::GetTypeSystemForLanguage(LanguageType language) { return m_type_system_map.GetTypeSystemForLanguage(language, this, true); } void Module::ParseAllDebugSymbols() { std::lock_guard guard(m_mutex); size_t num_comp_units = GetNumCompileUnits(); if (num_comp_units == 0) return; SymbolContext sc; sc.module_sp = shared_from_this(); SymbolVendor *symbols = GetSymbolVendor(); for (size_t cu_idx = 0; cu_idx < num_comp_units; cu_idx++) { sc.comp_unit = symbols->GetCompileUnitAtIndex(cu_idx).get(); if (sc.comp_unit) { sc.function = nullptr; symbols->ParseVariablesForContext(sc); symbols->ParseCompileUnitFunctions(sc); for (size_t func_idx = 0; (sc.function = sc.comp_unit->GetFunctionAtIndex(func_idx).get()) != nullptr; ++func_idx) { symbols->ParseFunctionBlocks(sc); // Parse the variables for this function and all its blocks symbols->ParseVariablesForContext(sc); } // Parse all types for this compile unit sc.function = nullptr; symbols->ParseTypes(sc); } } } void Module::CalculateSymbolContext(SymbolContext *sc) { sc->module_sp = shared_from_this(); } ModuleSP Module::CalculateSymbolContextModule() { return shared_from_this(); } void Module::DumpSymbolContext(Stream *s) { s->Printf(", Module{%p}", static_cast(this)); } size_t Module::GetNumCompileUnits() { std::lock_guard guard(m_mutex); Timer scoped_timer(LLVM_PRETTY_FUNCTION, "Module::GetNumCompileUnits (module = %p)", static_cast(this)); SymbolVendor *symbols = GetSymbolVendor(); if (symbols) return symbols->GetNumCompileUnits(); return 0; } CompUnitSP Module::GetCompileUnitAtIndex(size_t index) { std::lock_guard guard(m_mutex); size_t num_comp_units = GetNumCompileUnits(); CompUnitSP cu_sp; if (index < num_comp_units) { SymbolVendor *symbols = GetSymbolVendor(); if (symbols) cu_sp = symbols->GetCompileUnitAtIndex(index); } return cu_sp; } bool Module::ResolveFileAddress(lldb::addr_t vm_addr, Address &so_addr) { std::lock_guard guard(m_mutex); Timer scoped_timer(LLVM_PRETTY_FUNCTION, "Module::ResolveFileAddress (vm_addr = 0x%" PRIx64 ")", vm_addr); SectionList *section_list = GetSectionList(); if (section_list) return so_addr.ResolveAddressUsingFileSections(vm_addr, section_list); return false; } uint32_t Module::ResolveSymbolContextForAddress( const Address &so_addr, uint32_t resolve_scope, SymbolContext &sc, bool resolve_tail_call_address) { std::lock_guard guard(m_mutex); uint32_t resolved_flags = 0; // Clear the result symbol context in case we don't find anything, but don't // clear the target sc.Clear(false); // Get the section from the section/offset address. SectionSP section_sp(so_addr.GetSection()); // Make sure the section matches this module before we try and match anything if (section_sp && section_sp->GetModule().get() == this) { // If the section offset based address resolved itself, then this // is the right module. sc.module_sp = shared_from_this(); resolved_flags |= eSymbolContextModule; SymbolVendor *sym_vendor = GetSymbolVendor(); if (!sym_vendor) return resolved_flags; // Resolve the compile unit, function, block, line table or line // entry if requested. if (resolve_scope & eSymbolContextCompUnit || resolve_scope & eSymbolContextFunction || resolve_scope & eSymbolContextBlock || resolve_scope & eSymbolContextLineEntry || resolve_scope & eSymbolContextVariable) { resolved_flags |= sym_vendor->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(); if (symtab && so_addr.IsSectionOffset()) { Symbol *matching_symbol = nullptr; symtab->ForEachSymbolContainingFileAddress( so_addr.GetFileAddress(), [&matching_symbol](Symbol *symbol) -> bool { if (symbol->GetType() != eSymbolTypeInvalid) { matching_symbol = symbol; return false; // Stop iterating } return true; // Keep iterating }); sc.symbol = matching_symbol; if (!sc.symbol && resolve_scope & eSymbolContextFunction && !(resolved_flags & eSymbolContextFunction)) { bool verify_unique = false; // No need to check again since // ResolveSymbolContext failed to find a // symbol at this address. if (ObjectFile *obj_file = sc.module_sp->GetObjectFile()) sc.symbol = obj_file->ResolveSymbolForAddress(so_addr, verify_unique); } if (sc.symbol) { if (sc.symbol->IsSynthetic()) { // We have a synthetic symbol so lets check if the object file // from the symbol file in the symbol vendor is different than // the object file for the module, and if so search its symbol // table to see if we can come up with a better symbol. For example // dSYM 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; } } } } } } resolved_flags |= eSymbolContextSymbol; } } } // For function symbols, so_addr may be off by one. This is a convention // consistent // with FDE row indices in eh_frame sections, but requires extra logic here // to permit // symbol lookup for disassembly and unwind. if (resolve_scope & eSymbolContextSymbol && !(resolved_flags & eSymbolContextSymbol) && resolve_tail_call_address && so_addr.IsSectionOffset()) { Address previous_addr = so_addr; previous_addr.Slide(-1); bool do_resolve_tail_call_address = false; // prevent recursion const uint32_t flags = ResolveSymbolContextForAddress( previous_addr, resolve_scope, sc, do_resolve_tail_call_address); if (flags & eSymbolContextSymbol) { AddressRange addr_range; if (sc.GetAddressRange(eSymbolContextFunction | eSymbolContextSymbol, 0, false, addr_range)) { if (addr_range.GetBaseAddress().GetSection() == so_addr.GetSection()) { // If the requested address is one past the address range of a // function (i.e. a tail call), // or the decremented address is the start of a function (i.e. some // forms of trampoline), // indicate that the symbol has been resolved. if (so_addr.GetOffset() == addr_range.GetBaseAddress().GetOffset() || so_addr.GetOffset() == addr_range.GetBaseAddress().GetOffset() + addr_range.GetByteSize()) { resolved_flags |= flags; } } else { sc.symbol = nullptr; // Don't trust the symbol if the sections didn't match. } } } } } return resolved_flags; } uint32_t Module::ResolveSymbolContextForFilePath(const char *file_path, uint32_t line, bool check_inlines, uint32_t resolve_scope, SymbolContextList &sc_list) { FileSpec file_spec(file_path, false); return ResolveSymbolContextsForFileSpec(file_spec, line, check_inlines, resolve_scope, sc_list); } uint32_t Module::ResolveSymbolContextsForFileSpec(const FileSpec &file_spec, uint32_t line, bool check_inlines, uint32_t resolve_scope, SymbolContextList &sc_list) { std::lock_guard guard(m_mutex); Timer scoped_timer(LLVM_PRETTY_FUNCTION, "Module::ResolveSymbolContextForFilePath (%s:%u, " "check_inlines = %s, resolve_scope = 0x%8.8x)", file_spec.GetPath().c_str(), line, check_inlines ? "yes" : "no", resolve_scope); const uint32_t initial_count = sc_list.GetSize(); SymbolVendor *symbols = GetSymbolVendor(); if (symbols) symbols->ResolveSymbolContext(file_spec, line, check_inlines, resolve_scope, sc_list); return sc_list.GetSize() - initial_count; } size_t Module::FindGlobalVariables(const ConstString &name, const CompilerDeclContext *parent_decl_ctx, bool append, size_t max_matches, VariableList &variables) { SymbolVendor *symbols = GetSymbolVendor(); if (symbols) return symbols->FindGlobalVariables(name, parent_decl_ctx, append, max_matches, variables); return 0; } size_t Module::FindGlobalVariables(const RegularExpression ®ex, bool append, size_t max_matches, VariableList &variables) { SymbolVendor *symbols = GetSymbolVendor(); if (symbols) return symbols->FindGlobalVariables(regex, append, max_matches, variables); return 0; } 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(); 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)) sc_list.Append(sc); } } return sc_list.GetSize() - start_size; } Module::LookupInfo::LookupInfo(const ConstString &name, uint32_t name_type_mask, lldb::LanguageType language) : m_name(name), m_lookup_name(), m_language(language), m_name_type_mask(0), m_match_name_after_lookup(false) { const char *name_cstr = name.GetCString(); llvm::StringRef basename; llvm::StringRef context; if (name_type_mask & eFunctionNameTypeAuto) { if (CPlusPlusLanguage::IsCPPMangledName(name_cstr)) m_name_type_mask = eFunctionNameTypeFull; else if ((language == eLanguageTypeUnknown || Language::LanguageIsObjC(language)) && ObjCLanguage::IsPossibleObjCMethodName(name_cstr)) m_name_type_mask = eFunctionNameTypeFull; else if (Language::LanguageIsC(language)) { m_name_type_mask = eFunctionNameTypeFull; } else { if ((language == eLanguageTypeUnknown || Language::LanguageIsObjC(language)) && ObjCLanguage::IsPossibleObjCSelector(name_cstr)) m_name_type_mask |= eFunctionNameTypeSelector; CPlusPlusLanguage::MethodName cpp_method(name); basename = cpp_method.GetBasename(); if (basename.empty()) { if (CPlusPlusLanguage::ExtractContextAndIdentifier(name_cstr, context, basename)) m_name_type_mask |= (eFunctionNameTypeMethod | eFunctionNameTypeBase); else m_name_type_mask |= eFunctionNameTypeFull; } else { m_name_type_mask |= (eFunctionNameTypeMethod | eFunctionNameTypeBase); } } } else { m_name_type_mask = name_type_mask; if (name_type_mask & eFunctionNameTypeMethod || name_type_mask & eFunctionNameTypeBase) { // If they've asked for a CPP method or function name and it can't be // that, we don't // even need to search for CPP methods or names. CPlusPlusLanguage::MethodName cpp_method(name); if (cpp_method.IsValid()) { basename = cpp_method.GetBasename(); if (!cpp_method.GetQualifiers().empty()) { // There is a "const" or other qualifier following the end of the // function parens, // this can't be a eFunctionNameTypeBase m_name_type_mask &= ~(eFunctionNameTypeBase); if (m_name_type_mask == eFunctionNameTypeNone) return; } } else { // If the CPP method parser didn't manage to chop this up, try to fill // in the base name if we can. // If a::b::c is passed in, we need to just look up "c", and then we'll // filter the result later. CPlusPlusLanguage::ExtractContextAndIdentifier(name_cstr, context, basename); } } if (name_type_mask & eFunctionNameTypeSelector) { if (!ObjCLanguage::IsPossibleObjCSelector(name_cstr)) { m_name_type_mask &= ~(eFunctionNameTypeSelector); if (m_name_type_mask == eFunctionNameTypeNone) return; } } // Still try and get a basename in case someone specifies a name type mask // of eFunctionNameTypeFull and a name like "A::func" if (basename.empty()) { if (name_type_mask & eFunctionNameTypeFull && !CPlusPlusLanguage::IsCPPMangledName(name_cstr)) { CPlusPlusLanguage::MethodName cpp_method(name); basename = cpp_method.GetBasename(); if (basename.empty()) CPlusPlusLanguage::ExtractContextAndIdentifier(name_cstr, context, basename); } } } if (!basename.empty()) { // The name supplied was a partial C++ path like "a::count". In this case we // want to do a // lookup on the basename "count" and then make sure any matching results // contain "a::count" // so that it would match "b::a::count" and "a::count". This is why we set // "match_name_after_lookup" // to true m_lookup_name.SetString(basename); m_match_name_after_lookup = true; } else { // The name is already correct, just use the exact name as supplied, and we // won't need // to check if any matches contain "name" m_lookup_name = name; m_match_name_after_lookup = false; } } void Module::LookupInfo::Prune(SymbolContextList &sc_list, size_t start_idx) const { if (m_match_name_after_lookup && m_name) { SymbolContext sc; size_t i = start_idx; while (i < sc_list.GetSize()) { if (!sc_list.GetContextAtIndex(i, sc)) break; ConstString full_name(sc.GetFunctionName()); if (full_name && ::strstr(full_name.GetCString(), m_name.GetCString()) == nullptr) { sc_list.RemoveContextAtIndex(i); } else { ++i; } } } // If we have only full name matches we might have tried to set breakpoint on // "func" and specified eFunctionNameTypeFull, but we might have found // "a::func()", "a::b::func()", "c::func()", "func()" and "func". Only // "func()" and "func" should end up matching. if (m_name_type_mask == eFunctionNameTypeFull) { SymbolContext sc; size_t i = start_idx; while (i < sc_list.GetSize()) { if (!sc_list.GetContextAtIndex(i, sc)) break; // Make sure the mangled and demangled names don't match before we try // to pull anything out ConstString mangled_name(sc.GetFunctionName(Mangled::ePreferMangled)); ConstString full_name(sc.GetFunctionName()); if (mangled_name != m_name && full_name != m_name) { CPlusPlusLanguage::MethodName cpp_method(full_name); if (cpp_method.IsValid()) { if (cpp_method.GetContext().empty()) { if (cpp_method.GetBasename().compare(m_name.GetStringRef()) != 0) { sc_list.RemoveContextAtIndex(i); continue; } } else { std::string qualified_name; llvm::StringRef anon_prefix("(anonymous namespace)"); if (cpp_method.GetContext() == anon_prefix) qualified_name = cpp_method.GetBasename().str(); else qualified_name = cpp_method.GetScopeQualifiedName(); if (qualified_name.compare(m_name.GetCString()) != 0) { sc_list.RemoveContextAtIndex(i); continue; } } } } ++i; } } } size_t Module::FindFunctions(const ConstString &name, const CompilerDeclContext *parent_decl_ctx, uint32_t name_type_mask, bool include_symbols, bool include_inlines, bool append, SymbolContextList &sc_list) { if (!append) sc_list.Clear(); const size_t old_size = sc_list.GetSize(); // Find all the functions (not symbols, but debug information functions... SymbolVendor *symbols = GetSymbolVendor(); if (name_type_mask & eFunctionNameTypeAuto) { LookupInfo lookup_info(name, name_type_mask, eLanguageTypeUnknown); if (symbols) { symbols->FindFunctions(lookup_info.GetLookupName(), parent_decl_ctx, lookup_info.GetNameTypeMask(), include_inlines, append, sc_list); // Now check our symbol table for symbols that are code symbols if // requested if (include_symbols) { Symtab *symtab = symbols->GetSymtab(); if (symtab) symtab->FindFunctionSymbols(lookup_info.GetLookupName(), lookup_info.GetNameTypeMask(), sc_list); } } const size_t new_size = sc_list.GetSize(); if (old_size < new_size) lookup_info.Prune(sc_list, old_size); } else { if (symbols) { symbols->FindFunctions(name, parent_decl_ctx, name_type_mask, include_inlines, append, sc_list); // Now check our symbol table for symbols that are code symbols if // requested if (include_symbols) { Symtab *symtab = symbols->GetSymtab(); if (symtab) symtab->FindFunctionSymbols(name, name_type_mask, sc_list); } } } return sc_list.GetSize() - old_size; } size_t Module::FindFunctions(const RegularExpression ®ex, bool include_symbols, bool include_inlines, bool append, SymbolContextList &sc_list) { if (!append) sc_list.Clear(); const size_t start_size = sc_list.GetSize(); SymbolVendor *symbols = GetSymbolVendor(); if (symbols) { symbols->FindFunctions(regex, include_inlines, append, sc_list); // Now check our symbol table for symbols that are code symbols if requested if (include_symbols) { Symtab *symtab = symbols->GetSymtab(); if (symtab) { std::vector symbol_indexes; symtab->AppendSymbolIndexesMatchingRegExAndType( regex, eSymbolTypeAny, Symtab::eDebugAny, Symtab::eVisibilityAny, symbol_indexes); const size_t num_matches = symbol_indexes.size(); if (num_matches) { SymbolContext sc(this); const size_t end_functions_added_index = sc_list.GetSize(); size_t num_functions_added_to_sc_list = end_functions_added_index - start_size; if (num_functions_added_to_sc_list == 0) { // No functions were added, just symbols, so we can just append them for (size_t i = 0; i < num_matches; ++i) { sc.symbol = symtab->SymbolAtIndex(symbol_indexes[i]); SymbolType sym_type = sc.symbol->GetType(); if (sc.symbol && (sym_type == eSymbolTypeCode || sym_type == eSymbolTypeResolver)) sc_list.Append(sc); } } else { typedef std::map FileAddrToIndexMap; FileAddrToIndexMap file_addr_to_index; for (size_t i = start_size; i < end_functions_added_index; ++i) { const SymbolContext &sc = sc_list[i]; if (sc.block) continue; file_addr_to_index[sc.function->GetAddressRange() .GetBaseAddress() .GetFileAddress()] = i; } FileAddrToIndexMap::const_iterator end = file_addr_to_index.end(); // Functions were added so we need to merge symbols into any // existing function symbol contexts for (size_t i = start_size; i < num_matches; ++i) { sc.symbol = symtab->SymbolAtIndex(symbol_indexes[i]); SymbolType sym_type = sc.symbol->GetType(); if (sc.symbol && sc.symbol->ValueIsAddress() && (sym_type == eSymbolTypeCode || sym_type == eSymbolTypeResolver)) { FileAddrToIndexMap::const_iterator pos = file_addr_to_index.find( sc.symbol->GetAddressRef().GetFileAddress()); if (pos == end) sc_list.Append(sc); else sc_list[pos->second].symbol = sc.symbol; } } } } } } } return sc_list.GetSize() - start_size; } void Module::FindAddressesForLine(const lldb::TargetSP target_sp, const FileSpec &file, uint32_t line, Function *function, std::vector
&output_local, std::vector
&output_extern) { SearchFilterByModule filter(target_sp, m_file); AddressResolverFileLine resolver(file, line, true); resolver.ResolveAddress(filter); for (size_t n = 0; n < resolver.GetNumberOfAddresses(); n++) { Address addr = resolver.GetAddressRangeAtIndex(n).GetBaseAddress(); Function *f = addr.CalculateSymbolContextFunction(); if (f && f == function) output_local.push_back(addr); else output_extern.push_back(addr); } } size_t Module::FindTypes_Impl( const SymbolContext &sc, const ConstString &name, const CompilerDeclContext *parent_decl_ctx, bool append, size_t max_matches, llvm::DenseSet &searched_symbol_files, TypeMap &types) { Timer scoped_timer(LLVM_PRETTY_FUNCTION, LLVM_PRETTY_FUNCTION); if (!sc.module_sp || sc.module_sp.get() == this) { SymbolVendor *symbols = GetSymbolVendor(); if (symbols) return symbols->FindTypes(sc, name, parent_decl_ctx, append, max_matches, searched_symbol_files, types); } return 0; } size_t Module::FindTypesInNamespace(const SymbolContext &sc, const ConstString &type_name, const CompilerDeclContext *parent_decl_ctx, size_t max_matches, TypeList &type_list) { const bool append = true; TypeMap types_map; llvm::DenseSet searched_symbol_files; size_t num_types = FindTypes_Impl(sc, type_name, parent_decl_ctx, append, max_matches, searched_symbol_files, types_map); if (num_types > 0) sc.SortTypeList(types_map, type_list); return num_types; } lldb::TypeSP Module::FindFirstType(const SymbolContext &sc, const ConstString &name, bool exact_match) { TypeList type_list; llvm::DenseSet searched_symbol_files; const size_t num_matches = FindTypes(sc, name, exact_match, 1, searched_symbol_files, type_list); if (num_matches) return type_list.GetTypeAtIndex(0); return TypeSP(); } size_t Module::FindTypes( const SymbolContext &sc, const ConstString &name, bool exact_match, size_t max_matches, llvm::DenseSet &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; if (Type::GetTypeScopeAndBasename(type_name_cstr, type_scope, type_basename, type_class)) { // Check if "name" starts with "::" which means the qualified type starts // from the root namespace and implies and exact match. The typenames we // get back from clang do not start with "::" so we need to strip this off // in order to get the qualified names to match exact_match = type_scope.consume_front("::"); ConstString type_basename_const_str(type_basename); if (FindTypes_Impl(sc, type_basename_const_str, nullptr, append, max_matches, searched_symbol_files, typesmap)) { 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) { // The "type_name_cstr" will have been modified if we have a valid type // class // prefix (like "struct", "class", "union", "typedef" etc). FindTypes_Impl(sc, ConstString(type_basename), nullptr, append, max_matches, searched_symbol_files, typesmap); typesmap.RemoveMismatchedTypes(type_class); num_matches = typesmap.GetSize(); } else { num_matches = FindTypes_Impl(sc, name, nullptr, append, max_matches, searched_symbol_files, typesmap); } } if (num_matches > 0) 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()) { std::lock_guard guard(m_mutex); if (!m_did_load_symbol_vendor.load() && can_create) { ObjectFile *obj_file = GetObjectFile(); if (obj_file != nullptr) { Timer scoped_timer(LLVM_PRETTY_FUNCTION, LLVM_PRETTY_FUNCTION); m_symfile_ap.reset( SymbolVendor::FindPlugin(shared_from_this(), feedback_strm)); m_did_load_symbol_vendor = true; } } } return m_symfile_ap.get(); } void Module::SetFileSpecAndObjectName(const FileSpec &file, const ConstString &object_name) { // Container objects whose paths do not specify a file directly can call // this function to correct the file and object names. m_file = file; m_mod_time = FileSystem::GetModificationTime(file); m_object_name = object_name; } const ArchSpec &Module::GetArchitecture() const { return m_arch; } std::string Module::GetSpecificationDescription() const { std::string spec(GetFileSpec().GetPath()); if (m_object_name) { spec += '('; spec += m_object_name.GetCString(); spec += ')'; } return spec; } void Module::GetDescription(Stream *s, lldb::DescriptionLevel level) { std::lock_guard guard(m_mutex); if (level >= eDescriptionLevelFull) { if (m_arch.IsValid()) s->Printf("(%s) ", m_arch.GetArchitectureName()); } if (level == eDescriptionLevelBrief) { const char *filename = m_file.GetFilename().GetCString(); if (filename) s->PutCString(filename); } else { char path[PATH_MAX]; if (m_file.GetPath(path, sizeof(path))) s->PutCString(path); } const char *object_name = m_object_name.GetCString(); if (object_name) s->Printf("(%s)", object_name); } void Module::ReportError(const char *format, ...) { if (format && format[0]) { StreamString strm; strm.PutCString("error: "); GetDescription(&strm, lldb::eDescriptionLevelBrief); strm.PutChar(' '); va_list args; va_start(args, format); strm.PrintfVarArg(format, args); va_end(args); const int format_len = strlen(format); if (format_len > 0) { const char last_char = format[format_len - 1]; if (last_char != '\n' || last_char != '\r') strm.EOL(); } Host::SystemLog(Host::eSystemLogError, "%s", strm.GetData()); } } bool Module::FileHasChanged() const { if (!m_file_has_changed) m_file_has_changed = (FileSystem::GetModificationTime(m_file) != m_mod_time); return m_file_has_changed; } void Module::ReportErrorIfModifyDetected(const char *format, ...) { if (!m_first_file_changed_log) { if (FileHasChanged()) { m_first_file_changed_log = true; if (format) { StreamString strm; strm.PutCString("error: the object file "); GetDescription(&strm, lldb::eDescriptionLevelFull); strm.PutCString(" has been modified\n"); va_list args; va_start(args, format); strm.PrintfVarArg(format, args); va_end(args); const int format_len = strlen(format); if (format_len > 0) { const char last_char = format[format_len - 1]; if (last_char != '\n' || last_char != '\r') strm.EOL(); } strm.PutCString("The debug session should be aborted as the original " "debug information has been overwritten.\n"); Host::SystemLog(Host::eSystemLogError, "%s", strm.GetData()); } } } } void Module::ReportWarning(const char *format, ...) { if (format && format[0]) { StreamString strm; strm.PutCString("warning: "); GetDescription(&strm, lldb::eDescriptionLevelFull); strm.PutChar(' '); va_list args; va_start(args, format); strm.PrintfVarArg(format, args); va_end(args); const int format_len = strlen(format); if (format_len > 0) { const char last_char = format[format_len - 1]; if (last_char != '\n' || last_char != '\r') strm.EOL(); } Host::SystemLog(Host::eSystemLogWarning, "%s", strm.GetData()); } } void Module::LogMessage(Log *log, const char *format, ...) { if (log != nullptr) { StreamString log_message; GetDescription(&log_message, lldb::eDescriptionLevelFull); log_message.PutCString(": "); va_list args; va_start(args, format); log_message.PrintfVarArg(format, args); va_end(args); log->PutCString(log_message.GetData()); } } void Module::LogMessageVerboseBacktrace(Log *log, const char *format, ...) { if (log != nullptr) { StreamString log_message; GetDescription(&log_message, lldb::eDescriptionLevelFull); log_message.PutCString(": "); va_list args; va_start(args, format); log_message.PrintfVarArg(format, args); va_end(args); if (log->GetVerbose()) { std::string back_trace; llvm::raw_string_ostream stream(back_trace); llvm::sys::PrintStackTrace(stream); log_message.PutCString(back_trace); } log->PutCString(log_message.GetData()); } } void Module::Dump(Stream *s) { std::lock_guard guard(m_mutex); // s->Printf("%.*p: ", (int)sizeof(void*) * 2, this); s->Indent(); s->Printf("Module %s%s%s%s\n", m_file.GetPath().c_str(), m_object_name ? "(" : "", m_object_name ? m_object_name.GetCString() : "", m_object_name ? ")" : ""); s->IndentMore(); ObjectFile *objfile = GetObjectFile(); if (objfile) objfile->Dump(s); SymbolVendor *symbols = GetSymbolVendor(); if (symbols) symbols->Dump(s); s->IndentLess(); } TypeList *Module::GetTypeList() { SymbolVendor *symbols = GetSymbolVendor(); if (symbols) return &symbols->GetTypeList(); return nullptr; } const ConstString &Module::GetObjectName() const { return m_object_name; } ObjectFile *Module::GetObjectFile() { if (!m_did_load_objfile.load()) { std::lock_guard guard(m_mutex); if (!m_did_load_objfile.load()) { Timer scoped_timer(LLVM_PRETTY_FUNCTION, "Module::GetObjectFile () module = %s", GetFileSpec().GetFilename().AsCString("")); DataBufferSP data_sp; lldb::offset_t data_offset = 0; const lldb::offset_t file_size = m_file.GetByteSize(); if (file_size > m_object_offset) { m_did_load_objfile = true; m_objfile_sp = ObjectFile::FindPlugin( shared_from_this(), &m_file, m_object_offset, file_size - m_object_offset, data_sp, data_offset); if (m_objfile_sp) { // Once we get the object file, update our module with the object // file's // architecture since it might differ in vendor/os if some parts were // unknown. But since the matching arch might already be more // specific // than the generic COFF architecture, only merge in those values that // overwrite unspecified unknown values. ArchSpec new_arch; m_objfile_sp->GetArchitecture(new_arch); m_arch.MergeFrom(new_arch); } else { ReportError("failed to load objfile for %s", GetFileSpec().GetPath().c_str()); } } } } return m_objfile_sp.get(); } SectionList *Module::GetSectionList() { // Populate m_unified_sections_ap with sections from objfile. if (!m_sections_ap) { ObjectFile *obj_file = GetObjectFile(); if (obj_file != nullptr) obj_file->CreateSections(*GetUnifiedSectionList()); } return m_sections_ap.get(); } void Module::SectionFileAddressesChanged() { ObjectFile *obj_file = GetObjectFile(); if (obj_file) obj_file->SectionFileAddressesChanged(); SymbolVendor *sym_vendor = GetSymbolVendor(); if (sym_vendor != nullptr) sym_vendor->SectionFileAddressesChanged(); } SectionList *Module::GetUnifiedSectionList() { // Populate m_unified_sections_ap with sections from objfile. if (!m_sections_ap) m_sections_ap = llvm::make_unique(); return m_sections_ap.get(); } const Symbol *Module::FindFirstSymbolWithNameAndType(const ConstString &name, SymbolType symbol_type) { Timer scoped_timer( LLVM_PRETTY_FUNCTION, "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); } return nullptr; } void Module::SymbolIndicesToSymbolContextList( Symtab *symtab, std::vector &symbol_indexes, SymbolContextList &sc_list) { // No need to protect this call using m_mutex all other method calls are // already thread safe. size_t num_indices = symbol_indexes.size(); if (num_indices > 0) { SymbolContext sc; CalculateSymbolContext(&sc); for (size_t i = 0; i < num_indices; i++) { sc.symbol = symtab->SymbolAtIndex(symbol_indexes[i]); if (sc.symbol) sc_list.Append(sc); } } } size_t Module::FindFunctionSymbols(const ConstString &name, uint32_t name_type_mask, SymbolContextList &sc_list) { Timer scoped_timer(LLVM_PRETTY_FUNCTION, "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; } size_t Module::FindSymbolsWithNameAndType(const ConstString &name, SymbolType symbol_type, SymbolContextList &sc_list) { // No need to protect this call using m_mutex all other method calls are // already thread safe. Timer scoped_timer( LLVM_PRETTY_FUNCTION, "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 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 ®ex, SymbolType symbol_type, SymbolContextList &sc_list) { // No need to protect this call using m_mutex all other method calls are // already thread safe. Timer scoped_timer( LLVM_PRETTY_FUNCTION, "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 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 guard(m_mutex); + SymbolVendor * sym_vendor = GetSymbolVendor(); + if (!sym_vendor) { + return; + } + // Prime the symbol file first, since it adds symbols to the symbol table. + if (SymbolFile *symbol_file = sym_vendor->GetSymbolFile()) { + symbol_file->PreloadSymbols(); + } + // Now we can prime the symbol table. + if (Symtab * symtab = sym_vendor->GetSymtab()) { + symtab->PreloadSymbols(); + } +} + void Module::SetSymbolFileFileSpec(const FileSpec &file) { if (!file.Exists()) return; if (m_symfile_ap) { // Remove any sections in the unified section list that come from the // current symbol vendor. SectionList *section_list = GetSectionList(); SymbolFile *symbol_file = m_symfile_ap->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 // isn't // the same as the module's objfile before we remove any sections for // it... if (obj_file) { // Check to make sure we aren't trying to specify the file we already // have if (obj_file->GetFileSpec() == file) { // We are being told to add the exact same file that we already have // we don't have to do anything. return; } // Cleare the current symtab as we are going to replace it with a new // one obj_file->ClearSymtab(); // The symbol file might be a directory bundle ("/tmp/a.out.dSYM") // instead // of a full path to the symbol file within the bundle // ("/tmp/a.out.dSYM/Contents/Resources/DWARF/a.out"). So we need to // check this if (llvm::sys::fs::is_directory(file.GetPath())) { std::string new_path(file.GetPath()); std::string old_path(obj_file->GetFileSpec().GetPath()); if (old_path.find(new_path) == 0) { // We specified the same bundle as the symbol file that we already // have return; } } if (obj_file != m_objfile_sp.get()) { size_t num_sections = section_list->GetNumSections(0); for (size_t idx = num_sections; idx > 0; --idx) { lldb::SectionSP section_sp( section_list->GetSectionAtIndex(idx - 1)); if (section_sp->GetObjectFile() == obj_file) { section_list->DeleteSection(idx - 1); } } } } } // Keep all old symbol files around in case there are any lingering type // references in // any SBValue objects that might have been handed out. m_old_symfiles.push_back(std::move(m_symfile_ap)); } m_symfile_spec = file; m_symfile_ap.reset(); m_did_load_symbol_vendor = false; } bool Module::IsExecutable() { if (GetObjectFile() == nullptr) return false; else return GetObjectFile()->IsExecutable(); } bool Module::IsLoadedInTarget(Target *target) { ObjectFile *obj_file = GetObjectFile(); if (obj_file) { SectionList *sections = GetSectionList(); if (sections != nullptr) { size_t num_sections = sections->GetSize(); for (size_t sect_idx = 0; sect_idx < num_sections; sect_idx++) { SectionSP section_sp = sections->GetSectionAtIndex(sect_idx); if (section_sp->GetLoadBaseAddress(target) != LLDB_INVALID_ADDRESS) { return true; } } } } return false; } bool Module::LoadScriptingResourceInTarget(Target *target, Error &error, Stream *feedback_stream) { if (!target) { error.SetErrorString("invalid destination Target"); return false; } LoadScriptFromSymFile should_load = target->TargetProperties::GetLoadScriptFromSymbolFile(); if (should_load == eLoadScriptFromSymFileFalse) return false; Debugger &debugger = target->GetDebugger(); const ScriptLanguage script_language = debugger.GetScriptLanguage(); if (script_language != eScriptLanguageNone) { PlatformSP platform_sp(target->GetPlatform()); if (!platform_sp) { error.SetErrorString("invalid Platform"); return false; } FileSpecList file_specs = platform_sp->LocateExecutableScriptingResources( target, *this, feedback_stream); const uint32_t num_specs = file_specs.GetSize(); if (num_specs) { ScriptInterpreter *script_interpreter = debugger.GetCommandInterpreter().GetScriptInterpreter(); if (script_interpreter) { for (uint32_t i = 0; i < num_specs; ++i) { FileSpec scripting_fspec(file_specs.GetFileSpecAtIndex(i)); if (scripting_fspec && scripting_fspec.Exists()) { if (should_load == eLoadScriptFromSymFileWarn) { if (feedback_stream) feedback_stream->Printf( "warning: '%s' contains a debug script. To run this script " "in " "this debug session:\n\n command script import " "\"%s\"\n\n" "To run all discovered debug scripts in this session:\n\n" " settings set target.load-script-from-symbol-file " "true\n", GetFileSpec().GetFileNameStrippingExtension().GetCString(), scripting_fspec.GetPath().c_str()); return false; } StreamString scripting_stream; scripting_fspec.Dump(&scripting_stream); const bool can_reload = true; const bool init_lldb_globals = false; bool did_load = script_interpreter->LoadScriptingModule( scripting_stream.GetData(), can_reload, init_lldb_globals, error); if (!did_load) return false; } } } else { error.SetErrorString("invalid ScriptInterpreter"); return false; } } } return true; } bool Module::SetArchitecture(const ArchSpec &new_arch) { if (!m_arch.IsValid()) { m_arch = new_arch; return true; } return m_arch.IsCompatibleMatch(new_arch); } bool Module::SetLoadAddress(Target &target, lldb::addr_t value, bool value_is_offset, bool &changed) { ObjectFile *object_file = GetObjectFile(); if (object_file != nullptr) { changed = object_file->SetLoadAddress(target, value, value_is_offset); return true; } else { changed = false; } return false; } bool Module::MatchesModuleSpec(const ModuleSpec &module_ref) { const UUID &uuid = module_ref.GetUUID(); if (uuid.IsValid()) { // If the UUID matches, then nothing more needs to match... return (uuid == GetUUID()); } 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; } 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; } const ArchSpec &arch = module_ref.GetArchitecture(); if (arch.IsValid()) { if (!m_arch.IsCompatibleMatch(arch)) return false; } const ConstString &object_name = module_ref.GetObjectName(); if (object_name) { if (object_name != GetObjectName()) return false; } return true; } bool Module::FindSourceFile(const FileSpec &orig_spec, FileSpec &new_spec) const { std::lock_guard guard(m_mutex); return m_source_mappings.FindFile(orig_spec, new_spec); } bool Module::RemapSourceFile(llvm::StringRef path, std::string &new_path) const { std::lock_guard guard(m_mutex); return m_source_mappings.RemapPath(path, new_path); } uint32_t Module::GetVersion(uint32_t *versions, uint32_t num_versions) { ObjectFile *obj_file = GetObjectFile(); if (obj_file) return obj_file->GetVersion(versions, num_versions); if (versions != nullptr && num_versions != 0) { for (uint32_t i = 0; i < num_versions; ++i) versions[i] = LLDB_INVALID_MODULE_VERSION; } return 0; } ModuleSP Module::CreateJITModule(const lldb::ObjectFileJITDelegateSP &delegate_sp) { if (delegate_sp) { // Must create a module and place it into a shared pointer before // we can create an object file since it has a std::weak_ptr back // to the module, so we need to control the creation carefully in // this static function ModuleSP module_sp(new Module()); module_sp->m_objfile_sp = std::make_shared(module_sp, delegate_sp); if (module_sp->m_objfile_sp) { // Once we get the object file, update our module with the object file's // architecture since it might differ in vendor/os if some parts were // unknown. module_sp->m_objfile_sp->GetArchitecture(module_sp->m_arch); } return module_sp; } return ModuleSP(); } bool Module::GetIsDynamicLinkEditor() { ObjectFile *obj_file = GetObjectFile(); if (obj_file) return obj_file->GetIsDynamicLinkEditor(); return false; } Error Module::LoadInMemory(Target &target, bool set_pc) { return m_objfile_sp->LoadInMemory(target, set_pc); } Index: vendor/lldb/dist/source/Host/CMakeLists.txt =================================================================== --- vendor/lldb/dist/source/Host/CMakeLists.txt (revision 317691) +++ vendor/lldb/dist/source/Host/CMakeLists.txt (revision 317692) @@ -1,180 +1,180 @@ macro(add_host_subdirectory group) list(APPEND HOST_SOURCES ${ARGN}) source_group(${group} FILES ${ARGN}) endmacro() add_host_subdirectory(common common/File.cpp common/FileCache.cpp common/FileSystem.cpp common/GetOptInc.cpp common/Host.cpp common/HostInfoBase.cpp common/HostNativeThreadBase.cpp common/HostProcess.cpp common/HostThread.cpp common/IOObject.cpp common/LockFileBase.cpp + common/MainLoop.cpp common/MonitoringProcessLauncher.cpp common/NativeBreakpoint.cpp common/NativeBreakpointList.cpp common/NativeWatchpointList.cpp common/NativeProcessProtocol.cpp common/NativeRegisterContext.cpp common/NativeThreadProtocol.cpp common/OptionParser.cpp common/PipeBase.cpp common/ProcessRunLock.cpp common/PseudoTerminal.cpp common/Socket.cpp common/SocketAddress.cpp common/SoftwareBreakpoint.cpp common/StringConvert.cpp common/Symbols.cpp common/TCPSocket.cpp common/Terminal.cpp common/ThreadLauncher.cpp common/XML.cpp common/UDPSocket.cpp ) # Keep track of whether we want to provide a define for the # Python's architecture-specific lib path (i.e. where a # Python lldb module would go). set (get_python_libdir 0) if (NOT LLDB_DISABLE_LIBEDIT) add_host_subdirectory(common common/Editline.cpp ) endif() add_host_subdirectory(posix posix/ConnectionFileDescriptorPosix.cpp ) if(NOT LLDB_DISABLE_PYTHON) list(APPEND LLDB_PLUGINS lldbPluginScriptInterpreterPython) endif() if (CMAKE_SYSTEM_NAME MATCHES "Windows") add_host_subdirectory(windows windows/ConnectionGenericFileWindows.cpp windows/EditLineWin.cpp windows/FileSystem.cpp windows/Host.cpp windows/HostInfoWindows.cpp windows/HostProcessWindows.cpp windows/HostThreadWindows.cpp windows/LockFileWindows.cpp windows/PipeWindows.cpp windows/ProcessLauncherWindows.cpp windows/ProcessRunLock.cpp windows/Windows.cpp ) else() if (NOT LLDB_DISABLE_PYTHON) # We'll grab the arch-specific python libdir on POSIX systems. set (get_python_libdir 1) endif() add_host_subdirectory(posix posix/DomainSocket.cpp posix/FileSystem.cpp posix/HostInfoPosix.cpp posix/HostProcessPosix.cpp posix/HostThreadPosix.cpp posix/LockFilePosix.cpp - posix/MainLoopPosix.cpp posix/PipePosix.cpp posix/ProcessLauncherPosixFork.cpp ) if (NOT (CMAKE_SYSTEM_NAME MATCHES "Android")) add_host_subdirectory(posix posix/ProcessLauncherPosix.cpp ) endif() if (CMAKE_SYSTEM_NAME MATCHES "Darwin") include_directories(SYSTEM ${LIBXML2_INCLUDE_DIR}) add_host_subdirectory(macosx macosx/Host.mm macosx/HostInfoMacOSX.mm macosx/HostThreadMacOSX.mm macosx/Symbols.cpp macosx/cfcpp/CFCBundle.cpp macosx/cfcpp/CFCData.cpp macosx/cfcpp/CFCMutableArray.cpp macosx/cfcpp/CFCMutableDictionary.cpp macosx/cfcpp/CFCMutableSet.cpp macosx/cfcpp/CFCString.cpp ) elseif (CMAKE_SYSTEM_NAME MATCHES "Linux|Android") add_host_subdirectory(linux linux/AbstractSocket.cpp linux/Host.cpp linux/HostInfoLinux.cpp linux/LibcGlue.cpp linux/Support.cpp ) if (CMAKE_SYSTEM_NAME MATCHES "Android") add_host_subdirectory(android android/HostInfoAndroid.cpp android/LibcGlue.cpp ) endif() elseif (CMAKE_SYSTEM_NAME MATCHES "FreeBSD") add_host_subdirectory(freebsd freebsd/Host.cpp freebsd/HostInfoFreeBSD.cpp ) elseif (CMAKE_SYSTEM_NAME MATCHES "NetBSD") add_host_subdirectory(netbsd netbsd/Host.cpp netbsd/HostInfoNetBSD.cpp ) elseif (CMAKE_SYSTEM_NAME MATCHES "OpenBSD") add_host_subdirectory(openbsd openbsd/Host.cpp openbsd/HostInfoOpenBSD.cpp ) endif() endif() if (${get_python_libdir}) # 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() endif() if (CMAKE_SYSTEM_NAME MATCHES "NetBSD") set(EXTRA_LIBS kvm) endif () add_lldb_library(lldbHost ${HOST_SOURCES} LINK_LIBS lldbCore lldbInterpreter lldbSymbol lldbTarget lldbUtility ${LLDB_PLUGINS} ${EXTRA_LIBS} LINK_COMPONENTS Support ) Index: vendor/lldb/dist/source/Host/common/MainLoop.cpp =================================================================== --- vendor/lldb/dist/source/Host/common/MainLoop.cpp (nonexistent) +++ vendor/lldb/dist/source/Host/common/MainLoop.cpp (revision 317692) @@ -0,0 +1,382 @@ +//===-- MainLoop.cpp --------------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "llvm/Config/llvm-config.h" + +#include "lldb/Host/MainLoop.h" +#include "lldb/Utility/Error.h" +#include +#include +#include +#include +#include +#include + +#if HAVE_SYS_EVENT_H +#include +#elif defined(LLVM_ON_WIN32) +#include +#else +#include +#endif + +#ifdef LLVM_ON_WIN32 +#define POLL WSAPoll +#else +#define POLL poll +#endif + +#ifdef __ANDROID__ +#define FORCE_PSELECT +#endif + +#if SIGNAL_POLLING_UNSUPPORTED +#ifdef LLVM_ON_WIN32 +typedef int sigset_t; +typedef int siginfo_t; +#endif + +int ppoll(struct pollfd *fds, size_t nfds, const struct timespec *timeout_ts, + const sigset_t *) { + int timeout = + (timeout_ts == nullptr) + ? -1 + : (timeout_ts->tv_sec * 1000 + timeout_ts->tv_nsec / 1000000); + return POLL(fds, nfds, timeout); +} + +#endif + +using namespace lldb; +using namespace lldb_private; + +static sig_atomic_t g_signal_flags[NSIG]; + +static void SignalHandler(int signo, siginfo_t *info, void *) { + assert(signo < NSIG); + g_signal_flags[signo] = 1; +} + +class MainLoop::RunImpl { +public: + // TODO: Use llvm::Expected + static std::unique_ptr Create(MainLoop &loop, Error &error); + ~RunImpl(); + + Error Poll(); + + template void ForEachReadFD(F &&f); + template void ForEachSignal(F &&f); + +private: + MainLoop &loop; + +#if HAVE_SYS_EVENT_H + int queue_id; + std::vector in_events; + struct kevent out_events[4]; + int num_events = -1; + + RunImpl(MainLoop &loop, int queue_id) : loop(loop), queue_id(queue_id) { + in_events.reserve(loop.m_read_fds.size() + loop.m_signals.size()); + } +#else + std::vector signals; +#ifdef FORCE_PSELECT + fd_set read_fd_set; +#else + std::vector read_fds; +#endif + + RunImpl(MainLoop &loop) : loop(loop) { + signals.reserve(loop.m_signals.size()); + } + + sigset_t get_sigmask(); +#endif +}; + +#if HAVE_SYS_EVENT_H +MainLoop::RunImpl::~RunImpl() { + int r = close(queue_id); + assert(r == 0); + (void)r; +} +std::unique_ptr MainLoop::RunImpl::Create(MainLoop &loop, Error &error) +{ + error.Clear(); + int queue_id = kqueue(); + if(queue_id < 0) { + error = Error(errno, eErrorTypePOSIX); + return nullptr; + } + return std::unique_ptr(new RunImpl(loop, queue_id)); +} + +Error MainLoop::RunImpl::Poll() { + in_events.resize(loop.m_read_fds.size() + loop.m_signals.size()); + unsigned i = 0; + for (auto &fd : loop.m_read_fds) + EV_SET(&in_events[i++], fd.first, EVFILT_READ, EV_ADD, 0, 0, 0); + + for (const auto &sig : loop.m_signals) + EV_SET(&in_events[i++], sig.first, EVFILT_SIGNAL, EV_ADD, 0, 0, 0); + + num_events = kevent(queue_id, in_events.data(), in_events.size(), out_events, + llvm::array_lengthof(out_events), nullptr); + + if (num_events < 0) + return Error("kevent() failed with error %d\n", num_events); + return Error(); +} + +template void MainLoop::RunImpl::ForEachReadFD(F &&f) { + assert(num_events >= 0); + for (int i = 0; i < num_events; ++i) { + f(out_events[i].ident); + if (loop.m_terminate_request) + return; + } +} +template void MainLoop::RunImpl::ForEachSignal(F && f) {} +#else +MainLoop::RunImpl::~RunImpl() {} +std::unique_ptr MainLoop::RunImpl::Create(MainLoop &loop, Error &error) +{ + error.Clear(); + return std::unique_ptr(new RunImpl(loop)); +} + +sigset_t MainLoop::RunImpl::get_sigmask() { +#if SIGNAL_POLLING_UNSUPPORTED + return 0; +#else + sigset_t sigmask; + int ret = pthread_sigmask(SIG_SETMASK, nullptr, &sigmask); + assert(ret == 0); + (void) ret; + + for (const auto &sig : loop.m_signals) { + signals.push_back(sig.first); + sigdelset(&sigmask, sig.first); + } + return sigmask; +#endif +} + +#ifdef FORCE_PSELECT +Error MainLoop::RunImpl::Poll() { + signals.clear(); + + FD_ZERO(&read_fd_set); + int nfds = 0; + for (const auto &fd : loop.m_read_fds) { + FD_SET(fd.first, &read_fd_set); + nfds = std::max(nfds, fd.first + 1); + } + + sigset_t sigmask = get_sigmask(); + if (pselect(nfds, &read_fd_set, nullptr, nullptr, nullptr, &sigmask) == -1 && + errno != EINTR) + return Error(errno, eErrorTypePOSIX); + + return Error(); +} + +template void MainLoop::RunImpl::ForEachReadFD(F &&f) { + for (const auto &fd : loop.m_read_fds) { + if(!FD_ISSET(fd.first, &read_fd_set)) + continue; + + f(fd.first); + if (loop.m_terminate_request) + return; + } +} +#else +Error MainLoop::RunImpl::Poll() { + signals.clear(); + read_fds.clear(); + + sigset_t sigmask = get_sigmask(); + + for (const auto &fd : loop.m_read_fds) { + struct pollfd pfd; + pfd.fd = fd.first; + pfd.events = POLLIN; + pfd.revents = 0; + read_fds.push_back(pfd); + } + + if (ppoll(read_fds.data(), read_fds.size(), nullptr, &sigmask) == -1 && + errno != EINTR) + return Error(errno, eErrorTypePOSIX); + + return Error(); +} + +template void MainLoop::RunImpl::ForEachReadFD(F &&f) { + for (const auto &fd : read_fds) { + if ((fd.revents & POLLIN) == 0) + continue; + + f(fd.fd); + if (loop.m_terminate_request) + return; + } +} +#endif + +template void MainLoop::RunImpl::ForEachSignal(F &&f) { + for (int sig : signals) { + if (g_signal_flags[sig] == 0) + continue; // No signal + g_signal_flags[sig] = 0; + f(sig); + + if (loop.m_terminate_request) + return; + } +} +#endif + +MainLoop::~MainLoop() { + assert(m_read_fds.size() == 0); + assert(m_signals.size() == 0); +} + +MainLoop::ReadHandleUP +MainLoop::RegisterReadObject(const IOObjectSP &object_sp, + const Callback &callback, Error &error) { +#ifdef LLVM_ON_WIN32 + if (object_sp->GetFdType() != IOObject:: eFDTypeSocket) { + error.SetErrorString("MainLoop: non-socket types unsupported on Windows"); + return nullptr; + } +#endif + if (!object_sp || !object_sp->IsValid()) { + error.SetErrorString("IO object is not valid."); + return nullptr; + } + + const bool inserted = + m_read_fds.insert({object_sp->GetWaitableHandle(), callback}).second; + if (!inserted) { + error.SetErrorStringWithFormat("File descriptor %d already monitored.", + object_sp->GetWaitableHandle()); + return nullptr; + } + + return CreateReadHandle(object_sp); +} + +// We shall block the signal, then install the signal handler. The signal will +// be unblocked in +// the Run() function to check for signal delivery. +MainLoop::SignalHandleUP +MainLoop::RegisterSignal(int signo, const Callback &callback, + Error &error) { +#ifdef SIGNAL_POLLING_UNSUPPORTED + error.SetErrorString("Signal polling is not supported on this platform."); + return nullptr; +#else + if (m_signals.find(signo) != m_signals.end()) { + error.SetErrorStringWithFormat("Signal %d already monitored.", signo); + return nullptr; + } + + SignalInfo info; + info.callback = callback; + struct sigaction new_action; + new_action.sa_sigaction = &SignalHandler; + new_action.sa_flags = SA_SIGINFO; + sigemptyset(&new_action.sa_mask); + sigaddset(&new_action.sa_mask, signo); + + sigset_t old_set; + if (int ret = pthread_sigmask(SIG_BLOCK, &new_action.sa_mask, &old_set)) { + error.SetErrorStringWithFormat("pthread_sigmask failed with error %d\n", + ret); + return nullptr; + } + + info.was_blocked = sigismember(&old_set, signo); + if (sigaction(signo, &new_action, &info.old_action) == -1) { + error.SetErrorToErrno(); + if (!info.was_blocked) + pthread_sigmask(SIG_UNBLOCK, &new_action.sa_mask, nullptr); + return nullptr; + } + + m_signals.insert({signo, info}); + g_signal_flags[signo] = 0; + + return SignalHandleUP(new SignalHandle(*this, signo)); +#endif +} + +void MainLoop::UnregisterReadObject(IOObject::WaitableHandle handle) { + bool erased = m_read_fds.erase(handle); + UNUSED_IF_ASSERT_DISABLED(erased); + assert(erased); +} + +void MainLoop::UnregisterSignal(int signo) { +#if SIGNAL_POLLING_UNSUPPORTED + Error("Signal polling is not supported on this platform."); +#else + // We undo the actions of RegisterSignal on a best-effort basis. + auto it = m_signals.find(signo); + assert(it != m_signals.end()); + + sigaction(signo, &it->second.old_action, nullptr); + + sigset_t set; + sigemptyset(&set); + sigaddset(&set, signo); + pthread_sigmask(it->second.was_blocked ? SIG_BLOCK : SIG_UNBLOCK, &set, + nullptr); + + m_signals.erase(it); +#endif +} + +Error MainLoop::Run() { + m_terminate_request = false; + + Error error; + auto impl = RunImpl::Create(*this, error); + if (!impl) + return error; + + // run until termination or until we run out of things to listen to + while (!m_terminate_request && (!m_read_fds.empty() || !m_signals.empty())) { + + error = impl->Poll(); + if (error.Fail()) + return error; + + impl->ForEachSignal([&](int sig) { + auto it = m_signals.find(sig); + if (it != m_signals.end()) + it->second.callback(*this); // Do the work + }); + if (m_terminate_request) + return Error(); + + impl->ForEachReadFD([&](int fd) { + auto it = m_read_fds.find(fd); + if (it != m_read_fds.end()) + it->second(*this); // Do the work + }); + if (m_terminate_request) + return Error(); + } + return Error(); +} Property changes on: vendor/lldb/dist/source/Host/common/MainLoop.cpp ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: vendor/lldb/dist/source/Host/common/Socket.cpp =================================================================== --- vendor/lldb/dist/source/Host/common/Socket.cpp (revision 317691) +++ vendor/lldb/dist/source/Host/common/Socket.cpp (revision 317692) @@ -1,451 +1,463 @@ //===-- Socket.cpp ----------------------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #include "lldb/Host/Socket.h" #include "lldb/Host/Config.h" #include "lldb/Host/Host.h" #include "lldb/Host/SocketAddress.h" #include "lldb/Host/StringConvert.h" #include "lldb/Host/common/TCPSocket.h" #include "lldb/Host/common/UDPSocket.h" #include "lldb/Utility/Log.h" #include "lldb/Utility/RegularExpression.h" +#include "llvm/ADT/STLExtras.h" + #ifndef LLDB_DISABLE_POSIX #include "lldb/Host/posix/DomainSocket.h" #include #include #include #include #include #include #endif #ifdef __linux__ #include "lldb/Host/linux/AbstractSocket.h" #endif #ifdef __ANDROID__ #include #include #include #include #include #include #include #endif // __ANDROID__ using namespace lldb; using namespace lldb_private; #if defined(_WIN32) typedef const char *set_socket_option_arg_type; typedef char *get_socket_option_arg_type; const NativeSocket Socket::kInvalidSocketValue = INVALID_SOCKET; #else // #if defined(_WIN32) typedef const void *set_socket_option_arg_type; typedef void *get_socket_option_arg_type; const NativeSocket Socket::kInvalidSocketValue = -1; #endif // #if defined(_WIN32) namespace { bool IsInterrupted() { #if defined(_WIN32) return ::WSAGetLastError() == WSAEINTR; #else return errno == EINTR; #endif } } -Socket::Socket(NativeSocket socket, SocketProtocol protocol, bool should_close) +Socket::Socket(SocketProtocol protocol, bool should_close, + bool child_processes_inherit) : IOObject(eFDTypeSocket, should_close), m_protocol(protocol), - m_socket(socket) {} + m_socket(kInvalidSocketValue), + m_child_processes_inherit(child_processes_inherit) {} Socket::~Socket() { Close(); } std::unique_ptr Socket::Create(const SocketProtocol protocol, bool child_processes_inherit, Error &error) { error.Clear(); std::unique_ptr socket_up; switch (protocol) { case ProtocolTcp: - socket_up.reset(new TCPSocket(child_processes_inherit, error)); + socket_up = + llvm::make_unique(true, child_processes_inherit); break; case ProtocolUdp: - socket_up.reset(new UDPSocket(child_processes_inherit, error)); + socket_up = + llvm::make_unique(true, child_processes_inherit); break; case ProtocolUnixDomain: #ifndef LLDB_DISABLE_POSIX - socket_up.reset(new DomainSocket(child_processes_inherit, error)); + socket_up = + llvm::make_unique(true, child_processes_inherit); #else error.SetErrorString( "Unix domain sockets are not supported on this platform."); #endif break; case ProtocolUnixAbstract: #ifdef __linux__ - socket_up.reset(new AbstractSocket(child_processes_inherit, error)); + socket_up = + llvm::make_unique(child_processes_inherit); #else error.SetErrorString( "Abstract domain sockets are not supported on this platform."); #endif break; } if (error.Fail()) socket_up.reset(); return socket_up; } Error 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.data()); Error error; std::unique_ptr connect_socket( Create(ProtocolTcp, child_processes_inherit, error)); if (error.Fail()) return error; error = connect_socket->Connect(host_and_port); if (error.Success()) socket = connect_socket.release(); return error; } Error Socket::TcpListen(llvm::StringRef host_and_port, bool child_processes_inherit, Socket *&socket, Predicate *predicate, int backlog) { Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_CONNECTION)); if (log) log->Printf("Socket::%s (%s)", __FUNCTION__, host_and_port.data()); Error error; std::string host_str; std::string port_str; int32_t port = INT32_MIN; if (!DecodeHostAndPort(host_and_port, host_str, port_str, port, &error)) return error; std::unique_ptr listen_socket( - new TCPSocket(child_processes_inherit, error)); + new TCPSocket(true, child_processes_inherit)); if (error.Fail()) return error; error = listen_socket->Listen(host_and_port, backlog); if (error.Success()) { // We were asked to listen on port zero which means we // must now read the actual port that was given to us // as port zero is a special code for "find an open port // for me". if (port == 0) port = listen_socket->GetLocalPortNumber(); // Set the port predicate since when doing a listen://: // it often needs to accept the incoming connection which is a blocking // system call. Allowing access to the bound port using a predicate allows // us to wait for the port predicate to be set to a non-zero value from // another thread in an efficient manor. if (predicate) predicate->SetValue(port, eBroadcastAlways); socket = listen_socket.release(); } return error; } Error 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.data()); return UDPSocket::Connect(host_and_port, child_processes_inherit, socket); } Error Socket::UnixDomainConnect(llvm::StringRef name, bool child_processes_inherit, Socket *&socket) { Error error; std::unique_ptr connect_socket( Create(ProtocolUnixDomain, child_processes_inherit, error)); if (error.Fail()) return error; error = connect_socket->Connect(name); if (error.Success()) socket = connect_socket.release(); return error; } Error Socket::UnixDomainAccept(llvm::StringRef name, bool child_processes_inherit, Socket *&socket) { Error error; std::unique_ptr listen_socket( Create(ProtocolUnixDomain, child_processes_inherit, error)); if (error.Fail()) return error; error = listen_socket->Listen(name, 5); if (error.Fail()) return error; - error = listen_socket->Accept(name, child_processes_inherit, socket); + error = listen_socket->Accept(socket); return error; } Error Socket::UnixAbstractConnect(llvm::StringRef name, bool child_processes_inherit, Socket *&socket) { Error error; std::unique_ptr connect_socket( Create(ProtocolUnixAbstract, child_processes_inherit, error)); if (error.Fail()) return error; error = connect_socket->Connect(name); if (error.Success()) socket = connect_socket.release(); return error; } Error Socket::UnixAbstractAccept(llvm::StringRef name, bool child_processes_inherit, Socket *&socket) { Error error; std::unique_ptr listen_socket( Create(ProtocolUnixAbstract, child_processes_inherit, error)); if (error.Fail()) return error; error = listen_socket->Listen(name, 5); if (error.Fail()) return error; - error = listen_socket->Accept(name, child_processes_inherit, socket); + error = listen_socket->Accept(socket); return error; } bool Socket::DecodeHostAndPort(llvm::StringRef host_and_port, std::string &host_str, std::string &port_str, int32_t &port, Error *error_ptr) { - static RegularExpression g_regex(llvm::StringRef("([^:]+):([0-9]+)")); + static RegularExpression g_regex( + llvm::StringRef("([^:]+|\\[[0-9a-fA-F:]+.*\\]):([0-9]+)")); RegularExpression::Match regex_match(2); if (g_regex.Execute(host_and_port, ®ex_match)) { if (regex_match.GetMatchAtIndex(host_and_port.data(), 1, host_str) && regex_match.GetMatchAtIndex(host_and_port.data(), 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 if (error_ptr) error_ptr->SetErrorStringWithFormat( "invalid host:port specification: '%s'", host_and_port.data()); return false; } } // If this was unsuccessful, then check if it's simply a signed 32-bit // integer, representing // a port with an empty host. host_str.clear(); port_str.clear(); bool ok = false; port = StringConvert::ToUInt32(host_and_port.data(), UINT32_MAX, 10, &ok); if (ok && port < UINT16_MAX) { port_str = host_and_port; if (error_ptr) error_ptr->Clear(); return true; } if (error_ptr) error_ptr->SetErrorStringWithFormat("invalid host:port specification: '%s'", host_and_port.data()); return false; } IOObject::WaitableHandle Socket::GetWaitableHandle() { // TODO: On Windows, use WSAEventSelect return m_socket; } Error Socket::Read(void *buf, size_t &num_bytes) { Error error; int bytes_received = 0; do { bytes_received = ::recv(m_socket, static_cast(buf), num_bytes, 0); } while (bytes_received < 0 && IsInterrupted()); if (bytes_received < 0) { SetLastError(error); num_bytes = 0; } else num_bytes = bytes_received; 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(this), static_cast(m_socket), buf, static_cast(num_bytes), static_cast(bytes_received), error.AsCString()); } return error; } Error Socket::Write(const void *buf, size_t &num_bytes) { Error error; int bytes_sent = 0; do { bytes_sent = Send(buf, num_bytes); } while (bytes_sent < 0 && IsInterrupted()); if (bytes_sent < 0) { SetLastError(error); num_bytes = 0; } else num_bytes = bytes_sent; 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(this), static_cast(m_socket), buf, static_cast(num_bytes), static_cast(bytes_sent), error.AsCString()); } return error; } Error Socket::PreDisconnect() { Error error; return error; } Error Socket::Close() { Error error; if (!IsValid() || !m_should_close_fd) return error; Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_CONNECTION)); if (log) log->Printf("%p Socket::Close (fd = %i)", static_cast(this), m_socket); #if defined(_WIN32) bool success = !!closesocket(m_socket); #else bool success = !!::close(m_socket); #endif // A reference to a FD was passed in, set it to an invalid value m_socket = kInvalidSocketValue; if (!success) { SetLastError(error); } return error; } int Socket::GetOption(int level, int option_name, int &option_value) { get_socket_option_arg_type option_value_p = reinterpret_cast(&option_value); socklen_t option_value_size = sizeof(int); return ::getsockopt(m_socket, level, option_name, option_value_p, &option_value_size); } int Socket::SetOption(int level, int option_name, int option_value) { set_socket_option_arg_type option_value_p = reinterpret_cast(&option_value); return ::setsockopt(m_socket, level, option_name, option_value_p, sizeof(option_value)); } size_t Socket::Send(const void *buf, const size_t num_bytes) { return ::send(m_socket, static_cast(buf), num_bytes, 0); } void Socket::SetLastError(Error &error) { #if defined(_WIN32) error.SetError(::WSAGetLastError(), lldb::eErrorTypeWin32); #else error.SetErrorToErrno(); #endif } NativeSocket Socket::CreateSocket(const int domain, const int type, const int protocol, bool child_processes_inherit, Error &error) { error.Clear(); - auto socketType = type; + auto socket_type = type; #ifdef SOCK_CLOEXEC if (!child_processes_inherit) - socketType |= SOCK_CLOEXEC; + socket_type |= SOCK_CLOEXEC; #endif - auto sock = ::socket(domain, socketType, protocol); + auto sock = ::socket(domain, socket_type, protocol); if (sock == kInvalidSocketValue) SetLastError(error); return sock; } NativeSocket Socket::AcceptSocket(NativeSocket sockfd, struct sockaddr *addr, socklen_t *addrlen, bool child_processes_inherit, Error &error) { error.Clear(); #if defined(ANDROID_USE_ACCEPT_WORKAROUND) // Hack: // This enables static linking lldb-server to an API 21 libc, but still having // it run on older devices. It is necessary because API 21 libc's // implementation of accept() uses the accept4 syscall(), which is not // available in older kernels. Using an older libc would fix this issue, but // introduce other ones, as the old libraries were quite buggy. int fd = syscall(__NR_accept, sockfd, addr, addrlen); if (fd >= 0 && !child_processes_inherit) { int flags = ::fcntl(fd, F_GETFD); if (flags != -1 && ::fcntl(fd, F_SETFD, flags | FD_CLOEXEC) != -1) return fd; SetLastError(error); close(fd); } return fd; #elif defined(SOCK_CLOEXEC) int flags = 0; if (!child_processes_inherit) { flags |= SOCK_CLOEXEC; } NativeSocket fd = ::accept4(sockfd, addr, addrlen, flags); #else NativeSocket fd = ::accept(sockfd, addr, addrlen); #endif if (fd == kInvalidSocketValue) SetLastError(error); return fd; } Index: vendor/lldb/dist/source/Host/common/SocketAddress.cpp =================================================================== --- vendor/lldb/dist/source/Host/common/SocketAddress.cpp (revision 317691) +++ vendor/lldb/dist/source/Host/common/SocketAddress.cpp (revision 317692) @@ -1,331 +1,338 @@ //===-- SocketAddress.cpp ---------------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// +// +// Note: This file is used on Darwin by debugserver, so it needs to remain as +// self contained as possible, and devoid of references to LLVM unless +// there is compelling reason. +// +//===----------------------------------------------------------------------===// #if defined(_MSC_VER) #define _WINSOCK_DEPRECATED_NO_WARNINGS #endif #include "lldb/Host/SocketAddress.h" #include #include // C Includes #if !defined(_WIN32) #include #endif #include #include // C++ Includes // Other libraries and framework includes // Project includes #include "lldb/Host/PosixApi.h" // WindowsXP needs an inet_ntop implementation #ifdef _WIN32 #ifndef INET6_ADDRSTRLEN // might not be defined in older Windows SDKs #define INET6_ADDRSTRLEN 46 #endif // TODO: implement shortened form "::" for runs of zeros const char *inet_ntop(int af, const void *src, char *dst, socklen_t size) { if (size == 0) { return nullptr; } switch (af) { case AF_INET: { { const char *formatted = inet_ntoa(*static_cast(src)); if (formatted && strlen(formatted) < static_cast(size)) { return ::strcpy(dst, formatted); } } return nullptr; case AF_INET6: { char tmp[INET6_ADDRSTRLEN] = {0}; const uint16_t *src16 = static_cast(src); int full_size = ::snprintf( tmp, sizeof(tmp), "%x:%x:%x:%x:%x:%x:%x:%x", ntohs(src16[0]), ntohs(src16[1]), ntohs(src16[2]), ntohs(src16[3]), ntohs(src16[4]), ntohs(src16[5]), ntohs(src16[6]), ntohs(src16[7])); if (full_size < static_cast(size)) { return ::strcpy(dst, tmp); } return nullptr; } } } return nullptr; } #endif using namespace lldb_private; //---------------------------------------------------------------------- // SocketAddress constructor //---------------------------------------------------------------------- SocketAddress::SocketAddress() { Clear(); } SocketAddress::SocketAddress(const struct sockaddr &s) { m_socket_addr.sa = s; } SocketAddress::SocketAddress(const struct sockaddr_in &s) { m_socket_addr.sa_ipv4 = s; } SocketAddress::SocketAddress(const struct sockaddr_in6 &s) { m_socket_addr.sa_ipv6 = s; } SocketAddress::SocketAddress(const struct sockaddr_storage &s) { m_socket_addr.sa_storage = s; } SocketAddress::SocketAddress(const struct addrinfo *addr_info) { *this = addr_info; } //---------------------------------------------------------------------- // SocketAddress copy constructor //---------------------------------------------------------------------- SocketAddress::SocketAddress(const SocketAddress &rhs) : m_socket_addr(rhs.m_socket_addr) {} //---------------------------------------------------------------------- // Destructor //---------------------------------------------------------------------- SocketAddress::~SocketAddress() {} void SocketAddress::Clear() { memset(&m_socket_addr, 0, sizeof(m_socket_addr)); } bool SocketAddress::IsValid() const { return GetLength() != 0; } static socklen_t GetFamilyLength(sa_family_t family) { switch (family) { case AF_INET: return sizeof(struct sockaddr_in); case AF_INET6: return sizeof(struct sockaddr_in6); } assert(0 && "Unsupported address family"); return 0; } socklen_t SocketAddress::GetLength() const { #if defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__) return m_socket_addr.sa.sa_len; #else return GetFamilyLength(GetFamily()); #endif } socklen_t SocketAddress::GetMaxLength() { return sizeof(sockaddr_t); } sa_family_t SocketAddress::GetFamily() const { return m_socket_addr.sa.sa_family; } void SocketAddress::SetFamily(sa_family_t family) { m_socket_addr.sa.sa_family = family; #if defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__) m_socket_addr.sa.sa_len = GetFamilyLength(family); #endif } std::string SocketAddress::GetIPAddress() const { char str[INET6_ADDRSTRLEN] = {0}; switch (GetFamily()) { case AF_INET: if (inet_ntop(GetFamily(), &m_socket_addr.sa_ipv4.sin_addr, str, sizeof(str))) return str; break; case AF_INET6: if (inet_ntop(GetFamily(), &m_socket_addr.sa_ipv6.sin6_addr, str, sizeof(str))) return str; break; } return ""; } uint16_t SocketAddress::GetPort() const { switch (GetFamily()) { case AF_INET: return ntohs(m_socket_addr.sa_ipv4.sin_port); case AF_INET6: return ntohs(m_socket_addr.sa_ipv6.sin6_port); } return 0; } bool SocketAddress::SetPort(uint16_t port) { switch (GetFamily()) { case AF_INET: m_socket_addr.sa_ipv4.sin_port = htons(port); return true; case AF_INET6: m_socket_addr.sa_ipv6.sin6_port = htons(port); return true; } return false; } //---------------------------------------------------------------------- // 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(); if (addr_info && addr_info->ai_addr && addr_info->ai_addrlen > 0 && addr_info->ai_addrlen <= sizeof m_socket_addr) { ::memcpy(&m_socket_addr, addr_info->ai_addr, addr_info->ai_addrlen); } return *this; } const SocketAddress &SocketAddress::operator=(const struct sockaddr &s) { m_socket_addr.sa = s; return *this; } const SocketAddress &SocketAddress::operator=(const struct sockaddr_in &s) { m_socket_addr.sa_ipv4 = s; return *this; } const SocketAddress &SocketAddress::operator=(const struct sockaddr_in6 &s) { m_socket_addr.sa_ipv6 = s; return *this; } const SocketAddress &SocketAddress:: operator=(const struct sockaddr_storage &s) { m_socket_addr.sa_storage = s; return *this; } bool SocketAddress::getaddrinfo(const char *host, const char *service, int ai_family, int ai_socktype, int ai_protocol, int ai_flags) { Clear(); - auto addresses = GetAddressInfo(host, service, ai_family, ai_socktype, ai_protocol, ai_flags); + auto addresses = GetAddressInfo(host, service, ai_family, ai_socktype, + ai_protocol, ai_flags); if (!addresses.empty()) *this = addresses[0]; return IsValid(); } std::vector SocketAddress::GetAddressInfo(const char *hostname, const char *servname, int ai_family, int ai_socktype, int ai_protocol, int ai_flags) { std::vector addr_list; struct addrinfo hints; memset(&hints, 0, sizeof(hints)); hints.ai_family = ai_family; hints.ai_socktype = ai_socktype; hints.ai_protocol = ai_protocol; hints.ai_flags = ai_flags; struct addrinfo *service_info_list = NULL; int err = ::getaddrinfo(hostname, servname, &hints, &service_info_list); if (err == 0 && service_info_list) { for (struct addrinfo *service_ptr = service_info_list; service_ptr != NULL; service_ptr = service_ptr->ai_next) { addr_list.emplace_back(SocketAddress(service_ptr)); } } if (service_info_list) ::freeaddrinfo(service_info_list); return addr_list; } bool SocketAddress::SetToLocalhost(sa_family_t family, uint16_t port) { switch (family) { case AF_INET: SetFamily(AF_INET); if (SetPort(port)) { m_socket_addr.sa_ipv4.sin_addr.s_addr = htonl(INADDR_LOOPBACK); return true; } break; case AF_INET6: SetFamily(AF_INET6); if (SetPort(port)) { m_socket_addr.sa_ipv6.sin6_addr = in6addr_loopback; return true; } break; } Clear(); return false; } bool SocketAddress::SetToAnyAddress(sa_family_t family, uint16_t port) { switch (family) { case AF_INET: SetFamily(AF_INET); if (SetPort(port)) { m_socket_addr.sa_ipv4.sin_addr.s_addr = htonl(INADDR_ANY); return true; } break; case AF_INET6: SetFamily(AF_INET6); if (SetPort(port)) { m_socket_addr.sa_ipv6.sin6_addr = in6addr_any; return true; } break; } Clear(); return false; } bool SocketAddress::IsAnyAddr() const { return (GetFamily() == AF_INET) ? m_socket_addr.sa_ipv4.sin_addr.s_addr == htonl(INADDR_ANY) : 0 == memcmp(&m_socket_addr.sa_ipv6.sin6_addr, &in6addr_any, 16); } bool SocketAddress::operator==(const SocketAddress &rhs) const { if (GetFamily() != rhs.GetFamily()) return false; if (GetLength() != rhs.GetLength()) return false; switch (GetFamily()) { case AF_INET: return m_socket_addr.sa_ipv4.sin_addr.s_addr == rhs.m_socket_addr.sa_ipv4.sin_addr.s_addr; case AF_INET6: return 0 == memcmp(&m_socket_addr.sa_ipv6.sin6_addr, &rhs.m_socket_addr.sa_ipv6.sin6_addr, 16); } return false; } bool SocketAddress::operator!=(const SocketAddress &rhs) const { return !(*this == rhs); } Index: vendor/lldb/dist/source/Host/common/TCPSocket.cpp =================================================================== --- vendor/lldb/dist/source/Host/common/TCPSocket.cpp (revision 317691) +++ vendor/lldb/dist/source/Host/common/TCPSocket.cpp (revision 317692) @@ -1,260 +1,296 @@ //===-- TCPSocket.cpp -------------------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #if defined(_MSC_VER) #define _WINSOCK_DEPRECATED_NO_WARNINGS #endif #include "lldb/Host/common/TCPSocket.h" #include "lldb/Host/Config.h" +#include "lldb/Host/MainLoop.h" #include "lldb/Utility/Log.h" +#include "llvm/Config/llvm-config.h" +#include "llvm/Support/raw_ostream.h" + #ifndef LLDB_DISABLE_POSIX #include #include #include #endif +#if defined(LLVM_ON_WIN32) +#include +#endif + +#ifdef LLVM_ON_WIN32 +#define CLOSE_SOCKET closesocket +typedef const char *set_socket_option_arg_type; +#else +#define CLOSE_SOCKET ::close +typedef const void *set_socket_option_arg_type; +#endif + using namespace lldb; using namespace lldb_private; namespace { - -const int kDomain = AF_INET; const int kType = SOCK_STREAM; } -TCPSocket::TCPSocket(NativeSocket socket, bool should_close) - : Socket(socket, ProtocolTcp, should_close) {} +TCPSocket::TCPSocket(bool should_close, bool child_processes_inherit) + : Socket(ProtocolTcp, should_close, child_processes_inherit) {} -TCPSocket::TCPSocket(bool child_processes_inherit, Error &error) - : TCPSocket(CreateSocket(kDomain, kType, IPPROTO_TCP, - child_processes_inherit, error), - true) {} +TCPSocket::TCPSocket(NativeSocket socket, const TCPSocket &listen_socket) + : Socket(ProtocolTcp, listen_socket.m_should_close_fd, + listen_socket.m_child_processes_inherit) { + m_socket = socket; +} +TCPSocket::TCPSocket(NativeSocket socket, bool should_close, + bool child_processes_inherit) + : Socket(ProtocolTcp, should_close, child_processes_inherit) { + m_socket = socket; +} + +TCPSocket::~TCPSocket() { CloseListenSockets(); } + +bool TCPSocket::IsValid() const { + return m_socket != kInvalidSocketValue || m_listen_sockets.size() != 0; +} + // Return the port number that is being used by the socket. uint16_t TCPSocket::GetLocalPortNumber() const { if (m_socket != kInvalidSocketValue) { SocketAddress sock_addr; socklen_t sock_addr_len = sock_addr.GetMaxLength(); if (::getsockname(m_socket, sock_addr, &sock_addr_len) == 0) return sock_addr.GetPort(); + } else if (!m_listen_sockets.empty()) { + SocketAddress sock_addr; + socklen_t sock_addr_len = sock_addr.GetMaxLength(); + if (::getsockname(m_listen_sockets.begin()->first, sock_addr, + &sock_addr_len) == 0) + return sock_addr.GetPort(); } return 0; } std::string TCPSocket::GetLocalIPAddress() const { // We bound to port zero, so we need to figure out which port we actually // bound to if (m_socket != kInvalidSocketValue) { SocketAddress sock_addr; socklen_t sock_addr_len = sock_addr.GetMaxLength(); if (::getsockname(m_socket, sock_addr, &sock_addr_len) == 0) return sock_addr.GetIPAddress(); } return ""; } uint16_t TCPSocket::GetRemotePortNumber() const { if (m_socket != kInvalidSocketValue) { SocketAddress sock_addr; socklen_t sock_addr_len = sock_addr.GetMaxLength(); if (::getpeername(m_socket, sock_addr, &sock_addr_len) == 0) return sock_addr.GetPort(); } return 0; } std::string TCPSocket::GetRemoteIPAddress() const { // We bound to port zero, so we need to figure out which port we actually // bound to if (m_socket != kInvalidSocketValue) { SocketAddress sock_addr; socklen_t sock_addr_len = sock_addr.GetMaxLength(); if (::getpeername(m_socket, sock_addr, &sock_addr_len) == 0) return sock_addr.GetIPAddress(); } return ""; } +Error TCPSocket::CreateSocket(int domain) { + Error error; + if (IsValid()) + error = Close(); + if (error.Fail()) + return error; + m_socket = Socket::CreateSocket(domain, kType, IPPROTO_TCP, + m_child_processes_inherit, error); + return error; +} + Error TCPSocket::Connect(llvm::StringRef name) { - if (m_socket == kInvalidSocketValue) - return Error("Invalid socket"); Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_COMMUNICATION)); if (log) log->Printf("TCPSocket::%s (host/port = %s)", __FUNCTION__, name.data()); Error error; std::string host_str; std::string port_str; int32_t port = INT32_MIN; if (!DecodeHostAndPort(name, host_str, port_str, port, &error)) return error; - struct sockaddr_in sa; - ::memset(&sa, 0, sizeof(sa)); - sa.sin_family = kDomain; - sa.sin_port = htons(port); + auto addresses = lldb_private::SocketAddress::GetAddressInfo( + host_str.c_str(), NULL, AF_UNSPEC, SOCK_STREAM, IPPROTO_TCP); + for (auto address : addresses) { + error = CreateSocket(address.GetFamily()); + if (error.Fail()) + continue; - int inet_pton_result = ::inet_pton(kDomain, host_str.c_str(), &sa.sin_addr); + address.SetPort(port); - if (inet_pton_result <= 0) { - struct hostent *host_entry = gethostbyname(host_str.c_str()); - if (host_entry) - host_str = ::inet_ntoa(*(struct in_addr *)*host_entry->h_addr_list); - inet_pton_result = ::inet_pton(kDomain, host_str.c_str(), &sa.sin_addr); - if (inet_pton_result <= 0) { - if (inet_pton_result == -1) - SetLastError(error); - else - error.SetErrorStringWithFormat("invalid host string: '%s'", - host_str.c_str()); - - return error; + if (-1 == ::connect(GetNativeSocket(), &address.sockaddr(), + address.GetLength())) { + CLOSE_SOCKET(GetNativeSocket()); + continue; } - } - if (-1 == - ::connect(GetNativeSocket(), (const struct sockaddr *)&sa, sizeof(sa))) { - SetLastError(error); + SetOptionNoDelay(); + + error.Clear(); return error; } - // Keep our TCP packets coming without any delays. - SetOptionNoDelay(); - error.Clear(); + error.SetErrorString("Failed to connect port"); return error; } Error TCPSocket::Listen(llvm::StringRef name, int backlog) { - Error error; - - // enable local address reuse - SetOptionReuseAddress(); - Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_CONNECTION)); if (log) log->Printf("TCPSocket::%s (%s)", __FUNCTION__, name.data()); + Error error; std::string host_str; std::string port_str; int32_t port = INT32_MIN; if (!DecodeHostAndPort(name, host_str, port_str, port, &error)) return error; - SocketAddress bind_addr; + if (host_str == "*") + host_str = "0.0.0.0"; + auto addresses = lldb_private::SocketAddress::GetAddressInfo( + host_str.c_str(), NULL, AF_UNSPEC, SOCK_STREAM, IPPROTO_TCP); + for (auto address : addresses) { + int fd = Socket::CreateSocket(address.GetFamily(), kType, IPPROTO_TCP, + m_child_processes_inherit, error); + if (error.Fail()) { + error.Clear(); + continue; + } - // Only bind to the loopback address if we are expecting a connection from - // localhost to avoid any firewall issues. - const bool bind_addr_success = (host_str == "127.0.0.1") - ? bind_addr.SetToLocalhost(kDomain, port) - : bind_addr.SetToAnyAddress(kDomain, port); + // enable local address reuse + int option_value = 1; + set_socket_option_arg_type option_value_p = + reinterpret_cast(&option_value); + ::setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, option_value_p, + sizeof(option_value)); - if (!bind_addr_success) { - error.SetErrorString("Failed to bind port"); - return error; - } + address.SetPort(port); - int err = ::bind(GetNativeSocket(), bind_addr, bind_addr.GetLength()); - if (err != -1) - err = ::listen(GetNativeSocket(), backlog); + int err = ::bind(fd, &address.sockaddr(), address.GetLength()); + if (-1 != err) + err = ::listen(fd, backlog); - if (err == -1) - SetLastError(error); + if (-1 == err) { + CLOSE_SOCKET(fd); + continue; + } + if (port == 0) { + socklen_t sa_len = address.GetLength(); + if (getsockname(fd, &address.sockaddr(), &sa_len) == 0) + port = address.GetPort(); + } + m_listen_sockets[fd] = address; + } + + if (m_listen_sockets.size() == 0) + error.SetErrorString("Failed to connect port"); return error; } -Error TCPSocket::Accept(llvm::StringRef name, bool child_processes_inherit, - Socket *&conn_socket) { +void TCPSocket::CloseListenSockets() { + for (auto socket : m_listen_sockets) + CLOSE_SOCKET(socket.first); + m_listen_sockets.clear(); +} + +Error TCPSocket::Accept(Socket *&conn_socket) { Error error; - std::string host_str; - std::string port_str; - int32_t port; - if (!DecodeHostAndPort(name, host_str, port_str, port, &error)) + if (m_listen_sockets.size() == 0) { + error.SetErrorString("No open listening sockets!"); return error; + } - const sa_family_t family = kDomain; - const int socktype = kType; - const int protocol = IPPROTO_TCP; - SocketAddress listen_addr; - if (host_str.empty()) - listen_addr.SetToLocalhost(family, port); - else if (host_str.compare("*") == 0) - listen_addr.SetToAnyAddress(family, port); - else { - if (!listen_addr.getaddrinfo(host_str.c_str(), port_str.c_str(), family, - socktype, protocol)) { - error.SetErrorStringWithFormat("unable to resolve hostname '%s'", - host_str.c_str()); + int sock = -1; + int listen_sock = -1; + lldb_private::SocketAddress AcceptAddr; + MainLoop accept_loop; + std::vector handles; + for (auto socket : m_listen_sockets) { + auto fd = socket.first; + auto inherit = this->m_child_processes_inherit; + auto io_sp = IOObjectSP(new TCPSocket(socket.first, false, inherit)); + handles.emplace_back(accept_loop.RegisterReadObject( + io_sp, [fd, inherit, &sock, &AcceptAddr, &error, + &listen_sock](MainLoopBase &loop) { + socklen_t sa_len = AcceptAddr.GetMaxLength(); + sock = AcceptSocket(fd, &AcceptAddr.sockaddr(), &sa_len, inherit, + error); + listen_sock = fd; + loop.RequestTermination(); + }, error)); + if (error.Fail()) return error; - } } bool accept_connection = false; std::unique_ptr accepted_socket; - // Loop until we are happy with our connection while (!accept_connection) { - struct sockaddr_in accept_addr; - ::memset(&accept_addr, 0, sizeof accept_addr); -#if !(defined(__linux__) || defined(_WIN32)) - accept_addr.sin_len = sizeof accept_addr; -#endif - socklen_t accept_addr_len = sizeof accept_addr; - - int sock = AcceptSocket(GetNativeSocket(), (struct sockaddr *)&accept_addr, - &accept_addr_len, child_processes_inherit, error); - + accept_loop.Run(); + if (error.Fail()) - break; + return error; - bool is_same_addr = true; -#if !(defined(__linux__) || (defined(_WIN32))) - is_same_addr = (accept_addr_len == listen_addr.sockaddr_in().sin_len); -#endif - if (is_same_addr) - is_same_addr = (accept_addr.sin_addr.s_addr == - listen_addr.sockaddr_in().sin_addr.s_addr); - - if (is_same_addr || - (listen_addr.sockaddr_in().sin_addr.s_addr == INADDR_ANY)) { - accept_connection = true; - accepted_socket.reset(new TCPSocket(sock, true)); - } else { - const uint8_t *accept_ip = (const uint8_t *)&accept_addr.sin_addr.s_addr; - const uint8_t *listen_ip = - (const uint8_t *)&listen_addr.sockaddr_in().sin_addr.s_addr; - ::fprintf(stderr, "error: rejecting incoming connection from %u.%u.%u.%u " - "(expecting %u.%u.%u.%u)\n", - accept_ip[0], accept_ip[1], accept_ip[2], accept_ip[3], - listen_ip[0], listen_ip[1], listen_ip[2], listen_ip[3]); - accepted_socket.reset(); + lldb_private::SocketAddress &AddrIn = m_listen_sockets[listen_sock]; + if (!AddrIn.IsAnyAddr() && AcceptAddr != AddrIn) { + CLOSE_SOCKET(sock); + llvm::errs() << llvm::formatv( + "error: rejecting incoming connection from {0} (expecting {1})", + AcceptAddr.GetIPAddress(), AddrIn.GetIPAddress()); + continue; } + accept_connection = true; + accepted_socket.reset(new TCPSocket(sock, *this)); } if (!accepted_socket) return error; // Keep our TCP packets coming without any delays. accepted_socket->SetOptionNoDelay(); error.Clear(); conn_socket = accepted_socket.release(); return error; } int TCPSocket::SetOptionNoDelay() { return SetOption(IPPROTO_TCP, TCP_NODELAY, 1); } int TCPSocket::SetOptionReuseAddress() { return SetOption(SOL_SOCKET, SO_REUSEADDR, 1); } Index: vendor/lldb/dist/source/Host/common/UDPSocket.cpp =================================================================== --- vendor/lldb/dist/source/Host/common/UDPSocket.cpp (revision 317691) +++ vendor/lldb/dist/source/Host/common/UDPSocket.cpp (revision 317692) @@ -1,137 +1,151 @@ //===-- UDPSocket.cpp -------------------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #include "lldb/Host/common/UDPSocket.h" #include "lldb/Host/Config.h" #include "lldb/Utility/Log.h" #ifndef LLDB_DISABLE_POSIX #include #include #endif #include using namespace lldb; using namespace lldb_private; namespace { const int kDomain = AF_INET; const int kType = SOCK_DGRAM; static const char *g_not_supported_error = "Not supported"; -} +} // namespace -UDPSocket::UDPSocket(NativeSocket socket) : Socket(socket, ProtocolUdp, true) {} +UDPSocket::UDPSocket(bool should_close, bool child_processes_inherit) + : Socket(ProtocolUdp, should_close, child_processes_inherit) {} -UDPSocket::UDPSocket(bool child_processes_inherit, Error &error) - : UDPSocket( - CreateSocket(kDomain, kType, 0, child_processes_inherit, error)) {} +UDPSocket::UDPSocket(NativeSocket socket, const UDPSocket &listen_socket) + : Socket(ProtocolUdp, listen_socket.m_should_close_fd, + listen_socket.m_child_processes_inherit) { + m_socket = socket; +} size_t UDPSocket::Send(const void *buf, const size_t num_bytes) { return ::sendto(m_socket, static_cast(buf), num_bytes, 0, m_sockaddr, m_sockaddr.GetLength()); } Error UDPSocket::Connect(llvm::StringRef name) { - return Error("%s", g_not_supported_error); -} - -Error UDPSocket::Listen(llvm::StringRef name, int backlog) { - return Error("%s", g_not_supported_error); -} - -Error UDPSocket::Accept(llvm::StringRef name, bool child_processes_inherit, - Socket *&socket) { - return Error("%s", g_not_supported_error); -} - -Error UDPSocket::Connect(llvm::StringRef name, bool child_processes_inherit, - Socket *&socket) { - std::unique_ptr final_socket; - Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_CONNECTION)); if (log) log->Printf("UDPSocket::%s (host/port = %s)", __FUNCTION__, name.data()); Error error; + if (error.Fail()) + return error; + std::string host_str; std::string port_str; int32_t port = INT32_MIN; if (!DecodeHostAndPort(name, host_str, port_str, port, &error)) return error; // At this point we have setup the receive port, now we need to // setup the UDP send socket struct addrinfo hints; struct addrinfo *service_info_list = nullptr; ::memset(&hints, 0, sizeof(hints)); hints.ai_family = kDomain; hints.ai_socktype = kType; int err = ::getaddrinfo(host_str.c_str(), port_str.c_str(), &hints, &service_info_list); if (err != 0) { error.SetErrorStringWithFormat( #if defined(_MSC_VER) && defined(UNICODE) "getaddrinfo(%s, %s, &hints, &info) returned error %i (%S)", #else "getaddrinfo(%s, %s, &hints, &info) returned error %i (%s)", #endif host_str.c_str(), port_str.c_str(), err, gai_strerror(err)); return error; } for (struct addrinfo *service_info_ptr = service_info_list; service_info_ptr != nullptr; service_info_ptr = service_info_ptr->ai_next) { - auto send_fd = CreateSocket( + m_socket = Socket::CreateSocket( service_info_ptr->ai_family, service_info_ptr->ai_socktype, - service_info_ptr->ai_protocol, child_processes_inherit, error); + service_info_ptr->ai_protocol, m_child_processes_inherit, error); if (error.Success()) { - final_socket.reset(new UDPSocket(send_fd)); - final_socket->m_sockaddr = service_info_ptr; + m_sockaddr = service_info_ptr; break; } else continue; } ::freeaddrinfo(service_info_list); - if (!final_socket) + if (IsValid()) return error; SocketAddress bind_addr; // Only bind to the loopback address if we are expecting a connection from // localhost to avoid any firewall issues. - const bool bind_addr_success = (host_str == "127.0.0.1" || host_str == "localhost") - ? bind_addr.SetToLocalhost(kDomain, port) - : bind_addr.SetToAnyAddress(kDomain, port); + const bool bind_addr_success = + (host_str == "127.0.0.1" || host_str == "localhost") + ? bind_addr.SetToLocalhost(kDomain, port) + : bind_addr.SetToAnyAddress(kDomain, port); if (!bind_addr_success) { error.SetErrorString("Failed to get hostspec to bind for"); return error; } bind_addr.SetPort(0); // Let the source port # be determined dynamically - err = ::bind(final_socket->GetNativeSocket(), bind_addr, bind_addr.GetLength()); + err = ::bind(m_socket, bind_addr, bind_addr.GetLength()); - struct sockaddr_in source_info; - socklen_t address_len = sizeof (struct sockaddr_in); - err = ::getsockname(final_socket->GetNativeSocket(), (struct sockaddr *) &source_info, &address_len); - - socket = final_socket.release(); error.Clear(); + return error; +} + +Error UDPSocket::Listen(llvm::StringRef name, int backlog) { + return Error("%s", g_not_supported_error); +} + +Error UDPSocket::Accept(Socket *&socket) { + return Error("%s", g_not_supported_error); +} + +Error UDPSocket::CreateSocket() { + Error error; + if (IsValid()) + error = Close(); + if (error.Fail()) + return error; + m_socket = + Socket::CreateSocket(kDomain, kType, 0, m_child_processes_inherit, error); + return error; +} + +Error UDPSocket::Connect(llvm::StringRef name, bool child_processes_inherit, + Socket *&socket) { + std::unique_ptr final_socket( + new UDPSocket(true, child_processes_inherit)); + Error error = final_socket->Connect(name); + if (!error.Fail()) + socket = final_socket.release(); return error; } Index: vendor/lldb/dist/source/Host/linux/AbstractSocket.cpp =================================================================== --- vendor/lldb/dist/source/Host/linux/AbstractSocket.cpp (revision 317691) +++ vendor/lldb/dist/source/Host/linux/AbstractSocket.cpp (revision 317692) @@ -1,22 +1,22 @@ //===-- AbstractSocket.cpp --------------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #include "lldb/Host/linux/AbstractSocket.h" #include "llvm/ADT/StringRef.h" using namespace lldb; using namespace lldb_private; -AbstractSocket::AbstractSocket(bool child_processes_inherit, Error &error) - : DomainSocket(ProtocolUnixAbstract, child_processes_inherit, error) {} +AbstractSocket::AbstractSocket(bool child_processes_inherit) + : DomainSocket(ProtocolUnixAbstract, child_processes_inherit) {} size_t AbstractSocket::GetNameOffset() const { return 1; } void AbstractSocket::DeleteSocketFile(llvm::StringRef name) {} Index: vendor/lldb/dist/source/Host/posix/MainLoopPosix.cpp =================================================================== --- vendor/lldb/dist/source/Host/posix/MainLoopPosix.cpp (revision 317691) +++ vendor/lldb/dist/source/Host/posix/MainLoopPosix.cpp (nonexistent) @@ -1,182 +0,0 @@ -//===-- MainLoopPosix.cpp ---------------------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#include "lldb/Host/posix/MainLoopPosix.h" -#include "lldb/Utility/Error.h" -#include -#include -#include -#include -#include -#include - -using namespace lldb; -using namespace lldb_private; - -static sig_atomic_t g_signal_flags[NSIG]; - -static void SignalHandler(int signo, siginfo_t *info, void *) { - assert(signo < NSIG); - g_signal_flags[signo] = 1; -} - -MainLoopPosix::~MainLoopPosix() { - assert(m_read_fds.size() == 0); - assert(m_signals.size() == 0); -} - -MainLoopPosix::ReadHandleUP -MainLoopPosix::RegisterReadObject(const IOObjectSP &object_sp, - const Callback &callback, Error &error) { - if (!object_sp || !object_sp->IsValid()) { - error.SetErrorString("IO object is not valid."); - return nullptr; - } - - const bool inserted = - m_read_fds.insert({object_sp->GetWaitableHandle(), callback}).second; - if (!inserted) { - error.SetErrorStringWithFormat("File descriptor %d already monitored.", - object_sp->GetWaitableHandle()); - return nullptr; - } - - return CreateReadHandle(object_sp); -} - -// We shall block the signal, then install the signal handler. The signal will -// be unblocked in -// the Run() function to check for signal delivery. -MainLoopPosix::SignalHandleUP -MainLoopPosix::RegisterSignal(int signo, const Callback &callback, - Error &error) { - if (m_signals.find(signo) != m_signals.end()) { - error.SetErrorStringWithFormat("Signal %d already monitored.", signo); - return nullptr; - } - - SignalInfo info; - info.callback = callback; - struct sigaction new_action; - new_action.sa_sigaction = &SignalHandler; - new_action.sa_flags = SA_SIGINFO; - sigemptyset(&new_action.sa_mask); - sigaddset(&new_action.sa_mask, signo); - - sigset_t old_set; - if (int ret = pthread_sigmask(SIG_BLOCK, &new_action.sa_mask, &old_set)) { - error.SetErrorStringWithFormat("pthread_sigmask failed with error %d\n", - ret); - return nullptr; - } - - info.was_blocked = sigismember(&old_set, signo); - if (sigaction(signo, &new_action, &info.old_action) == -1) { - error.SetErrorToErrno(); - if (!info.was_blocked) - pthread_sigmask(SIG_UNBLOCK, &new_action.sa_mask, nullptr); - return nullptr; - } - - m_signals.insert({signo, info}); - g_signal_flags[signo] = 0; - - return SignalHandleUP(new SignalHandle(*this, signo)); -} - -void MainLoopPosix::UnregisterReadObject(IOObject::WaitableHandle handle) { - bool erased = m_read_fds.erase(handle); - UNUSED_IF_ASSERT_DISABLED(erased); - assert(erased); -} - -void MainLoopPosix::UnregisterSignal(int signo) { - // We undo the actions of RegisterSignal on a best-effort basis. - auto it = m_signals.find(signo); - assert(it != m_signals.end()); - - sigaction(signo, &it->second.old_action, nullptr); - - sigset_t set; - sigemptyset(&set); - sigaddset(&set, signo); - pthread_sigmask(it->second.was_blocked ? SIG_BLOCK : SIG_UNBLOCK, &set, - nullptr); - - m_signals.erase(it); -} - -Error MainLoopPosix::Run() { - std::vector signals; - sigset_t sigmask; - std::vector read_fds; - fd_set read_fd_set; - m_terminate_request = false; - - // run until termination or until we run out of things to listen to - while (!m_terminate_request && (!m_read_fds.empty() || !m_signals.empty())) { - // To avoid problems with callbacks changing the things we're supposed to - // listen to, we - // will store the *real* list of events separately. - signals.clear(); - read_fds.clear(); - FD_ZERO(&read_fd_set); - int nfds = 0; - - if (int ret = pthread_sigmask(SIG_SETMASK, nullptr, &sigmask)) - return Error("pthread_sigmask failed with error %d\n", ret); - - for (const auto &fd : m_read_fds) { - read_fds.push_back(fd.first); - FD_SET(fd.first, &read_fd_set); - nfds = std::max(nfds, fd.first + 1); - } - - for (const auto &sig : m_signals) { - signals.push_back(sig.first); - sigdelset(&sigmask, sig.first); - } - - if (pselect(nfds, &read_fd_set, nullptr, nullptr, nullptr, &sigmask) == - -1 && - errno != EINTR) - return Error(errno, eErrorTypePOSIX); - - for (int sig : signals) { - if (g_signal_flags[sig] == 0) - continue; // No signal - g_signal_flags[sig] = 0; - - auto it = m_signals.find(sig); - if (it == m_signals.end()) - continue; // Signal must have gotten unregistered in the meantime - - it->second.callback(*this); // Do the work - - if (m_terminate_request) - return Error(); - } - - for (int fd : read_fds) { - if (!FD_ISSET(fd, &read_fd_set)) - continue; // Not ready - - auto it = m_read_fds.find(fd); - if (it == m_read_fds.end()) - continue; // File descriptor must have gotten unregistered in the - // meantime - - it->second(*this); // Do the work - - if (m_terminate_request) - return Error(); - } - } - return Error(); -} Property changes on: vendor/lldb/dist/source/Host/posix/MainLoopPosix.cpp ___________________________________________________________________ Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: vendor/lldb/dist/source/Host/posix/ConnectionFileDescriptorPosix.cpp =================================================================== --- vendor/lldb/dist/source/Host/posix/ConnectionFileDescriptorPosix.cpp (revision 317691) +++ vendor/lldb/dist/source/Host/posix/ConnectionFileDescriptorPosix.cpp (revision 317692) @@ -1,793 +1,793 @@ //===-- ConnectionFileDescriptorPosix.cpp -----------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #if defined(__APPLE__) // Enable this special support for Apple builds where we can have unlimited // select bounds. We tried switching to poll() and kqueue and we were panicing // the kernel, so we have to stick with select for now. #define _DARWIN_UNLIMITED_SELECT #endif #include "lldb/Host/posix/ConnectionFileDescriptorPosix.h" #include "lldb/Host/Config.h" #include "lldb/Host/IOObject.h" #include "lldb/Host/Socket.h" #include "lldb/Host/SocketAddress.h" #include "lldb/Utility/SelectHelper.h" // C Includes #include #include #include #include #include #ifndef LLDB_DISABLE_POSIX #include #endif // C++ Includes #include // Other libraries and framework includes #include "llvm/Support/ErrorHandling.h" #if defined(__APPLE__) #include "llvm/ADT/SmallVector.h" #endif // Project includes #include "lldb/Core/Communication.h" #include "lldb/Core/Timer.h" #include "lldb/Host/Host.h" #include "lldb/Host/Socket.h" #include "lldb/Host/common/TCPSocket.h" #include "lldb/Utility/Log.h" #include "lldb/Utility/StreamString.h" using namespace lldb; using namespace lldb_private; const char *ConnectionFileDescriptor::LISTEN_SCHEME = "listen"; const char *ConnectionFileDescriptor::ACCEPT_SCHEME = "accept"; const char *ConnectionFileDescriptor::UNIX_ACCEPT_SCHEME = "unix-accept"; const char *ConnectionFileDescriptor::CONNECT_SCHEME = "connect"; const char *ConnectionFileDescriptor::TCP_CONNECT_SCHEME = "tcp-connect"; const char *ConnectionFileDescriptor::UDP_SCHEME = "udp"; const char *ConnectionFileDescriptor::UNIX_CONNECT_SCHEME = "unix-connect"; const char *ConnectionFileDescriptor::UNIX_ABSTRACT_CONNECT_SCHEME = "unix-abstract-connect"; const char *ConnectionFileDescriptor::FD_SCHEME = "fd"; const char *ConnectionFileDescriptor::FILE_SCHEME = "file"; namespace { llvm::Optional GetURLAddress(llvm::StringRef url, llvm::StringRef scheme) { if (!url.consume_front(scheme)) return llvm::None; if (!url.consume_front("://")) return llvm::None; return url; } } ConnectionFileDescriptor::ConnectionFileDescriptor(bool child_processes_inherit) : Connection(), m_pipe(), m_mutex(), m_shutting_down(false), m_waiting_for_accept(false), 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(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.reset(new File(fd, owns_fd)); m_read_sp.reset(new File(fd, 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(this), fd, owns_fd); OpenCommandPipe(); } ConnectionFileDescriptor::ConnectionFileDescriptor(Socket *socket) : Connection(), m_pipe(), m_mutex(), m_shutting_down(false), m_waiting_for_accept(false), m_child_processes_inherit(false) { InitializeSocket(socket); } ConnectionFileDescriptor::~ConnectionFileDescriptor() { Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_CONNECTION | LIBLLDB_LOG_OBJECT)); if (log) log->Printf("%p ConnectionFileDescriptor::~ConnectionFileDescriptor ()", static_cast(this)); Disconnect(NULL); CloseCommandPipe(); } void ConnectionFileDescriptor::OpenCommandPipe() { CloseCommandPipe(); Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_CONNECTION)); // Make the command file descriptor here: Error 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(this), result.AsCString()); } else { if (log) log->Printf("%p ConnectionFileDescriptor::OpenCommandPipe() - success " "readfd=%d writefd=%d", static_cast(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(this)); m_pipe.Close(); } bool ConnectionFileDescriptor::IsConnected() const { return (m_read_sp && m_read_sp->IsValid()) || (m_write_sp && m_write_sp->IsValid()); } ConnectionStatus ConnectionFileDescriptor::Connect(llvm::StringRef path, Error *error_ptr) { std::lock_guard guard(m_mutex); Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_CONNECTION)); if (log) log->Printf("%p ConnectionFileDescriptor::Connect (url = '%s')", static_cast(this), path.str().c_str()); OpenCommandPipe(); if (!path.empty()) { llvm::Optional addr; if ((addr = GetURLAddress(path, LISTEN_SCHEME))) { // listen://HOST:PORT return SocketListenAndAccept(*addr, error_ptr); } else if ((addr = GetURLAddress(path, ACCEPT_SCHEME))) { // unix://SOCKNAME return NamedSocketAccept(*addr, error_ptr); } else if ((addr = GetURLAddress(path, UNIX_ACCEPT_SCHEME))) { // unix://SOCKNAME return NamedSocketAccept(*addr, error_ptr); } else if ((addr = GetURLAddress(path, CONNECT_SCHEME))) { return ConnectTCP(*addr, error_ptr); } else if ((addr = GetURLAddress(path, TCP_CONNECT_SCHEME))) { return ConnectTCP(*addr, error_ptr); } else if ((addr = GetURLAddress(path, UDP_SCHEME))) { return ConnectUDP(*addr, error_ptr); } else if ((addr = GetURLAddress(path, UNIX_CONNECT_SCHEME))) { // unix-connect://SOCKNAME return NamedSocketConnect(*addr, error_ptr); } else if ((addr = GetURLAddress(path, UNIX_ABSTRACT_CONNECT_SCHEME))) { // unix-abstract-connect://SOCKNAME return UnixAbstractSocketConnect(*addr, error_ptr); } #ifndef LLDB_DISABLE_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). int fd = -1; if (!addr->getAsInteger(0, fd)) { // We have what looks to be a valid file descriptor, but we // should make sure it is. We currently are doing this by trying to // get the flags from the file descriptor and making sure it // isn't a bad fd. errno = 0; int flags = ::fcntl(fd, F_GETFL, 0); if (flags == -1 || errno == EBADF) { if (error_ptr) error_ptr->SetErrorStringWithFormat("stale file descriptor: %s", path.str().c_str()); m_read_sp.reset(); m_write_sp.reset(); return eConnectionStatusError; } else { // Don't take ownership of a file descriptor that gets passed // to us since someone else opened the file descriptor and // handed it to us. // TODO: Since are using a URL to open connection we should // eventually parse options using the web standard where we // have "fd://123?opt1=value;opt2=value" and we can have an // option be "owns=1" or "owns=0" or something like this to // allow us to specify this. For now, we assume we must // assume we don't own it. std::unique_ptr tcp_socket; - tcp_socket.reset(new TCPSocket(fd, false)); + tcp_socket.reset(new TCPSocket(fd, false, false)); // Try and get a socket option from this file descriptor to // see if this is a socket and set m_is_socket accordingly. int resuse; bool is_socket = !!tcp_socket->GetOption(SOL_SOCKET, SO_REUSEADDR, resuse); if (is_socket) { m_read_sp = std::move(tcp_socket); m_write_sp = m_read_sp; } else { m_read_sp.reset(new File(fd, false)); m_write_sp.reset(new File(fd, false)); } m_uri = *addr; return eConnectionStatusSuccess; } } if (error_ptr) error_ptr->SetErrorStringWithFormat("invalid file descriptor: \"%s\"", path.str().c_str()); m_read_sp.reset(); m_write_sp.reset(); return eConnectionStatusError; } else if ((addr = GetURLAddress(path, FILE_SCHEME))) { std::string addr_str = addr->str(); // file:///PATH int fd = -1; do { fd = ::open(addr_str.c_str(), O_RDWR); } while (fd == -1 && errno == EINTR); if (fd == -1) { if (error_ptr) error_ptr->SetErrorToErrno(); return eConnectionStatusError; } if (::isatty(fd)) { // Set up serial terminal emulation struct termios options; ::tcgetattr(fd, &options); // Set port speed to maximum ::cfsetospeed(&options, B115200); ::cfsetispeed(&options, B115200); // Raw input, disable echo and signals options.c_lflag &= ~(ICANON | ECHO | ECHOE | ISIG); // Make sure only one character is needed to return from a read options.c_cc[VMIN] = 1; options.c_cc[VTIME] = 0; ::tcsetattr(fd, TCSANOW, &options); } int flags = ::fcntl(fd, F_GETFL, 0); if (flags >= 0) { if ((flags & O_NONBLOCK) == 0) { flags |= O_NONBLOCK; ::fcntl(fd, F_SETFL, flags); } } m_read_sp.reset(new File(fd, true)); m_write_sp.reset(new File(fd, false)); return eConnectionStatusSuccess; } #endif if (error_ptr) error_ptr->SetErrorStringWithFormat("unsupported connection URL: '%s'", path.str().c_str()); return eConnectionStatusError; } if (error_ptr) error_ptr->SetErrorString("invalid connect arguments"); return eConnectionStatusError; } bool ConnectionFileDescriptor::InterruptRead() { size_t bytes_written = 0; Error result = m_pipe.Write("i", 1, bytes_written); return result.Success(); } ConnectionStatus ConnectionFileDescriptor::Disconnect(Error *error_ptr) { Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_CONNECTION)); if (log) log->Printf("%p ConnectionFileDescriptor::Disconnect ()", static_cast(this)); ConnectionStatus status = eConnectionStatusSuccess; if (!IsConnected()) { if (log) log->Printf( "%p ConnectionFileDescriptor::Disconnect(): Nothing to disconnect", static_cast(this)); return eConnectionStatusSuccess; } if (m_read_sp && m_read_sp->IsValid() && m_read_sp->GetFdType() == IOObject::eFDTypeSocket) static_cast(*m_read_sp).PreDisconnect(); // Try to get the ConnectionFileDescriptor's mutex. If we fail, that is quite // likely // because somebody is doing a blocking read on our file 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 locker(m_mutex, std::defer_lock); if (!locker.try_lock()) { if (m_pipe.CanWrite()) { size_t bytes_written = 0; Error 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(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(this)); } locker.lock(); } Error error = m_read_sp->Close(); Error error2 = m_write_sp->Close(); if (error.Fail() || error2.Fail()) status = eConnectionStatusError; if (error_ptr) *error_ptr = error.Fail() ? error : error2; // Close any pipes we were using for async interrupts m_pipe.Close(); m_uri.clear(); m_shutting_down = false; return status; } size_t ConnectionFileDescriptor::Read(void *dst, size_t dst_len, const Timeout &timeout, ConnectionStatus &status, Error *error_ptr) { Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_CONNECTION)); std::unique_lock 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(this)); if (error_ptr) error_ptr->SetErrorString("failed to get the connection lock for read."); status = eConnectionStatusTimedOut; return 0; } if (m_shutting_down) { status = eConnectionStatusError; return 0; } status = BytesAvailable(timeout, error_ptr); if (status != eConnectionStatusSuccess) return 0; Error error; size_t bytes_read = dst_len; 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(this), static_cast(m_read_sp->GetWaitableHandle()), static_cast(dst), static_cast(dst_len), static_cast(bytes_read), error.AsCString()); } if (bytes_read == 0) { error.Clear(); // End-of-file. Do not automatically close; pass along for // the end-of-file handlers. status = eConnectionStatusEndOfFile; } if (error_ptr) *error_ptr = error; if (error.Fail()) { uint32_t error_value = error.GetError(); switch (error_value) { case EAGAIN: // The file was marked for non-blocking I/O, and no data were // ready to be read. if (m_read_sp->GetFdType() == IOObject::eFDTypeSocket) status = eConnectionStatusTimedOut; else status = eConnectionStatusSuccess; return 0; case EFAULT: // Buf points outside the allocated address space. case EINTR: // A read from a slow device was interrupted before any data // arrived by the delivery of a signal. case EINVAL: // The pointer associated with fildes was negative. case EIO: // An I/O error occurred while reading from the file system. // The process group is orphaned. // The file is a regular file, nbyte is greater than 0, // the starting position is before the end-of-file, and // the starting position is greater than or equal to the // offset maximum established for the open file // descriptor associated with fildes. case EISDIR: // An attempt is made to read a directory. case ENOBUFS: // An attempt to allocate a memory buffer fails. case ENOMEM: // Insufficient memory is available. status = eConnectionStatusError; break; // Break to close.... case ENOENT: // no such file or directory case EBADF: // fildes is not a valid file or socket descriptor open for // reading. case ENXIO: // An action is requested of a device that does not exist.. // A requested action cannot be performed by the device. case ECONNRESET: // The connection is closed by the peer during a read // attempt on a socket. case ENOTCONN: // A read is attempted on an unconnected socket. status = eConnectionStatusLostConnection; break; // Break to close.... case ETIMEDOUT: // A transmission timeout occurs during a read attempt on a // socket. status = eConnectionStatusTimedOut; return 0; default: if (log) log->Printf( "%p ConnectionFileDescriptor::Read (), unexpected error: %s", static_cast(this), strerror(error_value)); status = eConnectionStatusError; break; // Break to close.... } return 0; } return bytes_read; } size_t ConnectionFileDescriptor::Write(const void *src, size_t src_len, ConnectionStatus &status, Error *error_ptr) { Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_CONNECTION)); if (log) log->Printf( "%p ConnectionFileDescriptor::Write (src = %p, src_len = %" PRIu64 ")", static_cast(this), static_cast(src), static_cast(src_len)); if (!IsConnected()) { if (error_ptr) error_ptr->SetErrorString("not connected"); status = eConnectionStatusNoConnection; return 0; } Error 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(this), static_cast(m_write_sp->GetWaitableHandle()), static_cast(src), static_cast(src_len), static_cast(bytes_sent), error.AsCString()); } if (error_ptr) *error_ptr = error; if (error.Fail()) { switch (error.GetError()) { case EAGAIN: case EINTR: status = eConnectionStatusSuccess; return 0; case ECONNRESET: // The connection is closed by the peer during a read // attempt on a socket. case ENOTCONN: // A read is attempted on an unconnected socket. status = eConnectionStatusLostConnection; break; // Break to close.... default: status = eConnectionStatusError; break; // Break to close.... } return 0; } status = eConnectionStatusSuccess; return bytes_sent; } std::string ConnectionFileDescriptor::GetURI() { return m_uri; } // This ConnectionFileDescriptor::BytesAvailable() uses select() via // SelectHelper // // PROS: // - select is consistent across most unix platforms // - The Apple specific version allows for unlimited fds in the fd_sets by // setting the _DARWIN_UNLIMITED_SELECT define prior to including the // required header files. // CONS: // - on non-Apple platforms, only supports file descriptors up to FD_SETSIZE. // This implementation will assert if it runs into that hard limit to let // users know that another ConnectionFileDescriptor::BytesAvailable() should // be used or a new version of ConnectionFileDescriptor::BytesAvailable() // should be written for the system that is running into the limitations. ConnectionStatus ConnectionFileDescriptor::BytesAvailable(const Timeout &timeout, Error *error_ptr) { // Don't need to take the mutex here separately since we are only called from // Read. If we // ever get used more generally we will need to lock here as well. Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_CONNECTION)); LLDB_LOG(log, "this = {0}, timeout = {1}", this, timeout); // Make a copy of the file descriptors to make sure we don't // have another thread change these values out from under us // and cause problems in the loop below where like in FS_SET() const IOObject::WaitableHandle handle = m_read_sp->GetWaitableHandle(); const int pipe_fd = m_pipe.GetReadFileDescriptor(); if (handle != IOObject::kInvalidHandleValue) { SelectHelper select_helper; if (timeout) select_helper.SetTimeout(*timeout); select_helper.FDSetRead(handle); #if defined(_MSC_VER) // 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 an error. const bool have_pipe_fd = false; #else const bool have_pipe_fd = pipe_fd >= 0; #endif if (have_pipe_fd) select_helper.FDSetRead(pipe_fd); while (handle == m_read_sp->GetWaitableHandle()) { Error error = select_helper.Select(); if (error_ptr) *error_ptr = error; if (error.Fail()) { switch (error.GetError()) { case EBADF: // One of the descriptor sets specified an invalid // descriptor. return eConnectionStatusLostConnection; case EINVAL: // The specified time limit is invalid. One of its // components is negative or too large. default: // Other unknown error return eConnectionStatusError; case ETIMEDOUT: return eConnectionStatusTimedOut; case EAGAIN: // The kernel was (perhaps temporarily) unable to // allocate the requested number of file descriptors, // or we have non-blocking IO case EINTR: // A signal was delivered before the time limit // expired and before any of the selected events // occurred. break; // Lets keep reading to until we timeout } } else { if (select_helper.FDIsSetRead(handle)) return eConnectionStatusSuccess; if (select_helper.FDIsSetRead(pipe_fd)) { // There is an interrupt or exit command in the command pipe // Read the data from that pipe: char buffer[1]; ssize_t bytes_read; do { bytes_read = ::read(pipe_fd, buffer, sizeof(buffer)); } while (bytes_read < 0 && errno == EINTR); switch (buffer[0]) { case 'q': if (log) log->Printf("%p ConnectionFileDescriptor::BytesAvailable() " "got data: %c from the command channel.", static_cast(this), buffer[0]); return eConnectionStatusEndOfFile; case 'i': // Interrupt the current read return eConnectionStatusInterrupted; } } } } } if (error_ptr) error_ptr->SetErrorString("not connected"); return eConnectionStatusLostConnection; } ConnectionStatus ConnectionFileDescriptor::NamedSocketAccept(llvm::StringRef socket_name, Error *error_ptr) { Socket *socket = nullptr; Error error = Socket::UnixDomainAccept(socket_name, m_child_processes_inherit, socket); if (error_ptr) *error_ptr = error; m_write_sp.reset(socket); m_read_sp = m_write_sp; if (error.Fail()) { return eConnectionStatusError; } m_uri.assign(socket_name); return eConnectionStatusSuccess; } ConnectionStatus ConnectionFileDescriptor::NamedSocketConnect(llvm::StringRef socket_name, Error *error_ptr) { Socket *socket = nullptr; Error error = Socket::UnixDomainConnect(socket_name, m_child_processes_inherit, socket); if (error_ptr) *error_ptr = error; m_write_sp.reset(socket); m_read_sp = m_write_sp; if (error.Fail()) { return eConnectionStatusError; } m_uri.assign(socket_name); return eConnectionStatusSuccess; } lldb::ConnectionStatus ConnectionFileDescriptor::UnixAbstractSocketConnect(llvm::StringRef socket_name, Error *error_ptr) { Socket *socket = nullptr; Error error = Socket::UnixAbstractConnect(socket_name, m_child_processes_inherit, socket); if (error_ptr) *error_ptr = error; m_write_sp.reset(socket); m_read_sp = m_write_sp; if (error.Fail()) { return eConnectionStatusError; } m_uri.assign(socket_name); return eConnectionStatusSuccess; } ConnectionStatus ConnectionFileDescriptor::SocketListenAndAccept(llvm::StringRef s, Error *error_ptr) { m_port_predicate.SetValue(0, eBroadcastNever); Socket *socket = nullptr; m_waiting_for_accept = true; Error error = Socket::TcpListen(s, m_child_processes_inherit, socket, &m_port_predicate); if (error_ptr) *error_ptr = error; if (error.Fail()) return eConnectionStatusError; std::unique_ptr listening_socket_up; listening_socket_up.reset(socket); socket = nullptr; - error = listening_socket_up->Accept(s, m_child_processes_inherit, socket); + error = listening_socket_up->Accept(socket); listening_socket_up.reset(); if (error_ptr) *error_ptr = error; if (error.Fail()) return eConnectionStatusError; InitializeSocket(socket); return eConnectionStatusSuccess; } ConnectionStatus ConnectionFileDescriptor::ConnectTCP(llvm::StringRef s, Error *error_ptr) { Socket *socket = nullptr; Error error = Socket::TcpConnect(s, m_child_processes_inherit, socket); if (error_ptr) *error_ptr = error; m_write_sp.reset(socket); m_read_sp = m_write_sp; if (error.Fail()) { return eConnectionStatusError; } m_uri.assign(s); return eConnectionStatusSuccess; } ConnectionStatus ConnectionFileDescriptor::ConnectUDP(llvm::StringRef s, Error *error_ptr) { Socket *socket = nullptr; Error error = Socket::UdpConnect(s, m_child_processes_inherit, socket); if (error_ptr) *error_ptr = error; m_write_sp.reset(socket); m_read_sp = m_write_sp; if (error.Fail()) { return eConnectionStatusError; } m_uri.assign(s); return eConnectionStatusSuccess; } uint16_t ConnectionFileDescriptor::GetListeningPort(uint32_t timeout_sec) { uint16_t bound_port = 0; if (timeout_sec == UINT32_MAX) m_port_predicate.WaitForValueNotEqualTo(0, bound_port); else m_port_predicate.WaitForValueNotEqualTo(0, bound_port, std::chrono::seconds(timeout_sec)); return bound_port; } bool ConnectionFileDescriptor::GetChildProcessesInherit() const { return m_child_processes_inherit; } void ConnectionFileDescriptor::SetChildProcessesInherit( bool child_processes_inherit) { m_child_processes_inherit = child_processes_inherit; } void ConnectionFileDescriptor::InitializeSocket(Socket *socket) { assert(socket->GetSocketProtocol() == Socket::ProtocolTcp); TCPSocket *tcp_socket = static_cast(socket); m_write_sp.reset(socket); m_read_sp = m_write_sp; StreamString strm; strm.Printf("connect://%s:%u", tcp_socket->GetRemoteIPAddress().c_str(), tcp_socket->GetRemotePortNumber()); m_uri = strm.GetString(); } Index: vendor/lldb/dist/source/Host/posix/DomainSocket.cpp =================================================================== --- vendor/lldb/dist/source/Host/posix/DomainSocket.cpp (revision 317691) +++ vendor/lldb/dist/source/Host/posix/DomainSocket.cpp (revision 317692) @@ -1,120 +1,127 @@ //===-- DomainSocket.cpp ----------------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #include "lldb/Host/posix/DomainSocket.h" #include "llvm/Support/FileSystem.h" #include #include #include using namespace lldb; using namespace lldb_private; #ifdef __ANDROID__ // Android does not have SUN_LEN #ifndef SUN_LEN #define SUN_LEN(ptr) \ (offsetof(struct sockaddr_un, sun_path) + strlen((ptr)->sun_path)) #endif #endif // #ifdef __ANDROID__ namespace { const int kDomain = AF_UNIX; const int kType = SOCK_STREAM; bool SetSockAddr(llvm::StringRef name, const size_t name_offset, sockaddr_un *saddr_un, socklen_t &saddr_un_len) { if (name.size() + name_offset > sizeof(saddr_un->sun_path)) return false; memset(saddr_un, 0, sizeof(*saddr_un)); saddr_un->sun_family = kDomain; memcpy(saddr_un->sun_path + name_offset, name.data(), name.size()); // For domain sockets we can use SUN_LEN in order to calculate size of // sockaddr_un, but for abstract sockets we have to calculate size manually // because of leading null symbol. if (name_offset == 0) saddr_un_len = SUN_LEN(saddr_un); else saddr_un_len = offsetof(struct sockaddr_un, sun_path) + name_offset + name.size(); #if defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__) saddr_un->sun_len = saddr_un_len; #endif return true; } -} +} // namespace -DomainSocket::DomainSocket(NativeSocket socket) - : Socket(socket, ProtocolUnixDomain, true) {} +DomainSocket::DomainSocket(bool should_close, bool child_processes_inherit) + : Socket(ProtocolUnixDomain, should_close, child_processes_inherit) {} -DomainSocket::DomainSocket(bool child_processes_inherit, Error &error) - : DomainSocket( - CreateSocket(kDomain, kType, 0, child_processes_inherit, error)) {} - DomainSocket::DomainSocket(SocketProtocol protocol, - bool child_processes_inherit, Error &error) - : Socket(CreateSocket(kDomain, kType, 0, child_processes_inherit, error), - protocol, true) {} + bool child_processes_inherit) + : Socket(protocol, true, child_processes_inherit) {} +DomainSocket::DomainSocket(NativeSocket socket, + const DomainSocket &listen_socket) + : Socket(ProtocolUnixDomain, listen_socket.m_should_close_fd, + listen_socket.m_child_processes_inherit) { + m_socket = socket; +} + Error DomainSocket::Connect(llvm::StringRef name) { sockaddr_un saddr_un; socklen_t saddr_un_len; if (!SetSockAddr(name, GetNameOffset(), &saddr_un, saddr_un_len)) return Error("Failed to set socket address"); Error error; + m_socket = CreateSocket(kDomain, kType, 0, m_child_processes_inherit, error); + if (error.Fail()) + return error; if (::connect(GetNativeSocket(), (struct sockaddr *)&saddr_un, saddr_un_len) < 0) SetLastError(error); return error; } Error DomainSocket::Listen(llvm::StringRef name, int backlog) { sockaddr_un saddr_un; socklen_t saddr_un_len; if (!SetSockAddr(name, GetNameOffset(), &saddr_un, saddr_un_len)) return Error("Failed to set socket address"); DeleteSocketFile(name); Error error; + m_socket = CreateSocket(kDomain, kType, 0, m_child_processes_inherit, error); + if (error.Fail()) + return error; if (::bind(GetNativeSocket(), (struct sockaddr *)&saddr_un, saddr_un_len) == 0) if (::listen(GetNativeSocket(), backlog) == 0) return error; SetLastError(error); return error; } -Error DomainSocket::Accept(llvm::StringRef name, bool child_processes_inherit, - Socket *&socket) { +Error DomainSocket::Accept(Socket *&socket) { Error error; auto conn_fd = AcceptSocket(GetNativeSocket(), nullptr, nullptr, - child_processes_inherit, error); + m_child_processes_inherit, error); if (error.Success()) - socket = new DomainSocket(conn_fd); + socket = new DomainSocket(conn_fd, *this); return error; } size_t DomainSocket::GetNameOffset() const { return 0; } void DomainSocket::DeleteSocketFile(llvm::StringRef name) { llvm::sys::fs::remove(name); } Index: vendor/lldb/dist/source/Interpreter/CommandInterpreter.cpp =================================================================== --- vendor/lldb/dist/source/Interpreter/CommandInterpreter.cpp (revision 317691) +++ vendor/lldb/dist/source/Interpreter/CommandInterpreter.cpp (revision 317692) @@ -1,3076 +1,3076 @@ //===-- CommandInterpreter.cpp ----------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #include #include #include #include "CommandObjectScript.h" #include "lldb/Interpreter/CommandObjectRegexCommand.h" #include "../Commands/CommandObjectApropos.h" #include "../Commands/CommandObjectArgs.h" #include "../Commands/CommandObjectBreakpoint.h" #include "../Commands/CommandObjectBugreport.h" #include "../Commands/CommandObjectCommands.h" #include "../Commands/CommandObjectDisassemble.h" #include "../Commands/CommandObjectExpression.h" #include "../Commands/CommandObjectFrame.h" #include "../Commands/CommandObjectGUI.h" #include "../Commands/CommandObjectHelp.h" #include "../Commands/CommandObjectLanguage.h" #include "../Commands/CommandObjectLog.h" #include "../Commands/CommandObjectMemory.h" #include "../Commands/CommandObjectPlatform.h" #include "../Commands/CommandObjectPlugin.h" #include "../Commands/CommandObjectProcess.h" #include "../Commands/CommandObjectQuit.h" #include "../Commands/CommandObjectRegister.h" #include "../Commands/CommandObjectSettings.h" #include "../Commands/CommandObjectSource.h" #include "../Commands/CommandObjectSyntax.h" #include "../Commands/CommandObjectTarget.h" #include "../Commands/CommandObjectThread.h" #include "../Commands/CommandObjectType.h" #include "../Commands/CommandObjectVersion.h" #include "../Commands/CommandObjectWatchpoint.h" #include "lldb/Core/Debugger.h" #include "lldb/Core/PluginManager.h" #include "lldb/Core/State.h" #include "lldb/Core/StreamFile.h" #include "lldb/Core/Timer.h" #include "lldb/Utility/Log.h" #include "lldb/Utility/Stream.h" #ifndef LLDB_DISABLE_LIBEDIT #include "lldb/Host/Editline.h" #endif #include "lldb/Host/Host.h" #include "lldb/Host/HostInfo.h" #include "lldb/Interpreter/Args.h" #include "lldb/Interpreter/CommandCompletions.h" #include "lldb/Interpreter/CommandInterpreter.h" #include "lldb/Interpreter/CommandReturnObject.h" #include "lldb/Interpreter/OptionValueProperties.h" #include "lldb/Interpreter/Options.h" #include "lldb/Interpreter/Property.h" #include "lldb/Target/Process.h" #include "lldb/Target/TargetList.h" #include "lldb/Target/Thread.h" #include "lldb/Utility/CleanUp.h" #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/SmallString.h" #include "llvm/Support/Path.h" #include "llvm/Support/PrettyStackTrace.h" using namespace lldb; using namespace lldb_private; static const char *k_white_space = " \t\v"; static PropertyDefinition g_properties[] = { {"expand-regex-aliases", OptionValue::eTypeBoolean, true, false, nullptr, nullptr, "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, true, true, nullptr, nullptr, "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, true, true, nullptr, nullptr, "If true, LLDB will stop running a 'command source' " "script upon encountering an error."}, {"space-repl-prompts", OptionValue::eTypeBoolean, true, false, nullptr, nullptr, "If true, blank lines will be printed between between REPL submissions."}, {nullptr, OptionValue::eTypeInvalid, true, 0, nullptr, nullptr, nullptr}}; enum { ePropertyExpandRegexAliases = 0, ePropertyPromptOnQuit = 1, ePropertyStopCmdSourceOnError = 2, eSpaceReplPrompts = 3 }; ConstString &CommandInterpreter::GetStaticBroadcasterClass() { static ConstString class_name("lldb.commandInterpreter"); return class_name; } CommandInterpreter::CommandInterpreter(Debugger &debugger, ScriptLanguage script_language, bool synchronous_execution) : Broadcaster(debugger.GetBroadcasterManager(), CommandInterpreter::GetStaticBroadcasterClass().AsCString()), Properties(OptionValuePropertiesSP( new OptionValueProperties(ConstString("interpreter")))), IOHandlerDelegate(IOHandlerDelegate::Completion::LLDBCommand), m_debugger(debugger), m_synchronous_execution(synchronous_execution), m_skip_lldbinit_files(false), m_skip_app_init_files(false), m_script_interpreter_sp(), m_command_io_handler_sp(), m_comment_char('#'), m_batch_command_mode(false), m_truncation_warning(eNoTruncation), m_command_source_depth(0), m_num_errors(0), m_quit_requested(false), m_stopped_for_crash(false) { debugger.SetScriptLanguage(script_language); SetEventName(eBroadcastBitThreadShouldExit, "thread-should-exit"); SetEventName(eBroadcastBitResetPrompt, "reset-prompt"); SetEventName(eBroadcastBitQuitCommandReceived, "quit"); CheckInWithManager(); m_collection_sp->Initialize(g_properties); } bool CommandInterpreter::GetExpandRegexAliases() const { const uint32_t idx = ePropertyExpandRegexAliases; return m_collection_sp->GetPropertyAtIndexAsBoolean( nullptr, idx, g_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); } void CommandInterpreter::SetPromptOnQuit(bool b) { const uint32_t idx = ePropertyPromptOnQuit; m_collection_sp->SetPropertyAtIndexAsBoolean(nullptr, idx, b); } void CommandInterpreter::ResolveCommand(const char *command_line, CommandReturnObject &result) { std::string command = command_line; if (ResolveCommandImpl(command, result) != nullptr) { result.AppendMessageWithFormat("%s", command.c_str()); result.SetStatus(eReturnStatusSuccessFinishResult); } } bool CommandInterpreter::GetStopCmdSourceOnError() const { const uint32_t idx = ePropertyStopCmdSourceOnError; return m_collection_sp->GetPropertyAtIndexAsBoolean( nullptr, idx, g_properties[idx].default_uint_value != 0); } bool CommandInterpreter::GetSpaceReplPrompts() const { const uint32_t idx = eSpaceReplPrompts; return m_collection_sp->GetPropertyAtIndexAsBoolean( nullptr, idx, g_properties[idx].default_uint_value != 0); } void CommandInterpreter::Initialize() { Timer scoped_timer(LLVM_PRETTY_FUNCTION, LLVM_PRETTY_FUNCTION); CommandReturnObject result; LoadCommandDictionary(); // An alias arguments vector to reuse - reset it before use... OptionArgVectorSP alias_arguments_vector_sp(new OptionArgVector); // Set up some initial aliases. CommandObjectSP cmd_obj_sp = GetCommandSPExact("quit", false); if (cmd_obj_sp) { AddAlias("q", cmd_obj_sp); AddAlias("exit", cmd_obj_sp); } cmd_obj_sp = GetCommandSPExact("_regexp-attach", false); if (cmd_obj_sp) AddAlias("attach", cmd_obj_sp)->SetSyntax(cmd_obj_sp->GetSyntax()); cmd_obj_sp = GetCommandSPExact("process detach", false); if (cmd_obj_sp) { AddAlias("detach", cmd_obj_sp); } cmd_obj_sp = GetCommandSPExact("process continue", false); if (cmd_obj_sp) { AddAlias("c", cmd_obj_sp); AddAlias("continue", cmd_obj_sp); } cmd_obj_sp = GetCommandSPExact("_regexp-break", false); if (cmd_obj_sp) AddAlias("b", cmd_obj_sp)->SetSyntax(cmd_obj_sp->GetSyntax()); cmd_obj_sp = GetCommandSPExact("_regexp-tbreak", false); if (cmd_obj_sp) AddAlias("tbreak", cmd_obj_sp)->SetSyntax(cmd_obj_sp->GetSyntax()); cmd_obj_sp = GetCommandSPExact("thread step-inst", false); if (cmd_obj_sp) { AddAlias("stepi", cmd_obj_sp); AddAlias("si", cmd_obj_sp); } cmd_obj_sp = GetCommandSPExact("thread step-inst-over", false); if (cmd_obj_sp) { AddAlias("nexti", cmd_obj_sp); AddAlias("ni", cmd_obj_sp); } cmd_obj_sp = GetCommandSPExact("thread step-in", false); if (cmd_obj_sp) { AddAlias("s", cmd_obj_sp); AddAlias("step", cmd_obj_sp); CommandAlias *sif_alias = AddAlias( "sif", cmd_obj_sp, "--end-linenumber block --step-in-target %1"); if (sif_alias) { sif_alias->SetHelp("Step through the current block, stopping if you step " "directly into a function whose name matches the " "TargetFunctionName."); sif_alias->SetSyntax("sif "); } } cmd_obj_sp = GetCommandSPExact("thread step-over", false); if (cmd_obj_sp) { AddAlias("n", cmd_obj_sp); AddAlias("next", cmd_obj_sp); } cmd_obj_sp = GetCommandSPExact("thread step-out", false); if (cmd_obj_sp) { AddAlias("finish", cmd_obj_sp); } cmd_obj_sp = GetCommandSPExact("frame select", false); if (cmd_obj_sp) { AddAlias("f", cmd_obj_sp); } cmd_obj_sp = GetCommandSPExact("thread select", false); if (cmd_obj_sp) { AddAlias("t", cmd_obj_sp); } cmd_obj_sp = GetCommandSPExact("_regexp-jump", false); if (cmd_obj_sp) { AddAlias("j", cmd_obj_sp)->SetSyntax(cmd_obj_sp->GetSyntax()); AddAlias("jump", cmd_obj_sp)->SetSyntax(cmd_obj_sp->GetSyntax()); } cmd_obj_sp = GetCommandSPExact("_regexp-list", false); if (cmd_obj_sp) { AddAlias("l", cmd_obj_sp)->SetSyntax(cmd_obj_sp->GetSyntax()); AddAlias("list", cmd_obj_sp)->SetSyntax(cmd_obj_sp->GetSyntax()); } cmd_obj_sp = GetCommandSPExact("_regexp-env", false); if (cmd_obj_sp) AddAlias("env", cmd_obj_sp)->SetSyntax(cmd_obj_sp->GetSyntax()); cmd_obj_sp = GetCommandSPExact("memory read", false); if (cmd_obj_sp) AddAlias("x", cmd_obj_sp); cmd_obj_sp = GetCommandSPExact("_regexp-up", false); if (cmd_obj_sp) AddAlias("up", cmd_obj_sp)->SetSyntax(cmd_obj_sp->GetSyntax()); cmd_obj_sp = GetCommandSPExact("_regexp-down", false); if (cmd_obj_sp) AddAlias("down", cmd_obj_sp)->SetSyntax(cmd_obj_sp->GetSyntax()); cmd_obj_sp = GetCommandSPExact("_regexp-display", false); if (cmd_obj_sp) AddAlias("display", cmd_obj_sp)->SetSyntax(cmd_obj_sp->GetSyntax()); cmd_obj_sp = GetCommandSPExact("disassemble", false); if (cmd_obj_sp) AddAlias("dis", cmd_obj_sp); cmd_obj_sp = GetCommandSPExact("disassemble", false); if (cmd_obj_sp) AddAlias("di", cmd_obj_sp); cmd_obj_sp = GetCommandSPExact("_regexp-undisplay", false); if (cmd_obj_sp) AddAlias("undisplay", cmd_obj_sp)->SetSyntax(cmd_obj_sp->GetSyntax()); cmd_obj_sp = GetCommandSPExact("_regexp-bt", false); if (cmd_obj_sp) AddAlias("bt", cmd_obj_sp)->SetSyntax(cmd_obj_sp->GetSyntax()); cmd_obj_sp = GetCommandSPExact("target create", false); if (cmd_obj_sp) AddAlias("file", cmd_obj_sp); cmd_obj_sp = GetCommandSPExact("target modules", false); if (cmd_obj_sp) AddAlias("image", cmd_obj_sp); alias_arguments_vector_sp.reset(new OptionArgVector); cmd_obj_sp = GetCommandSPExact("expression", false); if (cmd_obj_sp) { AddAlias("p", cmd_obj_sp, "--")->SetHelpLong(""); AddAlias("print", cmd_obj_sp, "--")->SetHelpLong(""); AddAlias("call", cmd_obj_sp, "--")->SetHelpLong(""); if (auto po = AddAlias("po", cmd_obj_sp, "-O --")) { po->SetHelp("Evaluate an expression on the current thread. Displays any " "returned value with formatting " "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(""); } cmd_obj_sp = GetCommandSPExact("process kill", false); if (cmd_obj_sp) { AddAlias("kill", cmd_obj_sp); } cmd_obj_sp = GetCommandSPExact("process launch", false); if (cmd_obj_sp) { alias_arguments_vector_sp.reset(new OptionArgVector); #if defined(__arm__) || defined(__arm64__) || defined(__aarch64__) AddAlias("r", cmd_obj_sp, "--"); AddAlias("run", cmd_obj_sp, "--"); #else #if defined(__APPLE__) std::string shell_option; shell_option.append("--shell-expand-args"); shell_option.append(" true"); shell_option.append(" --"); AddAlias("r", cmd_obj_sp, "--shell-expand-args true --"); AddAlias("run", cmd_obj_sp, "--shell-expand-args true --"); #else StreamString defaultshell; defaultshell.Printf("--shell=%s --", HostInfo::GetDefaultShell().GetPath().c_str()); AddAlias("r", cmd_obj_sp, defaultshell.GetString()); AddAlias("run", cmd_obj_sp, defaultshell.GetString()); #endif #endif } cmd_obj_sp = GetCommandSPExact("target symbols add", false); if (cmd_obj_sp) { AddAlias("add-dsym", cmd_obj_sp); } cmd_obj_sp = GetCommandSPExact("breakpoint set", false); if (cmd_obj_sp) { AddAlias("rbreak", cmd_obj_sp, "--func-regex %1"); } } void CommandInterpreter::Clear() { m_command_io_handler_sp.reset(); if (m_script_interpreter_sp) m_script_interpreter_sp->Clear(); } const char *CommandInterpreter::ProcessEmbeddedScriptCommands(const char *arg) { // This function has not yet been implemented. // Look for any embedded script command // If found, // get interpreter object from the command dictionary, // call execute_one_command on it, // get the results as a string, // substitute that string for current stuff. return arg; } void CommandInterpreter::LoadCommandDictionary() { Timer scoped_timer(LLVM_PRETTY_FUNCTION, LLVM_PRETTY_FUNCTION); lldb::ScriptLanguage script_language = m_debugger.GetScriptLanguage(); 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"] = CommandObjectSP(new CommandObjectDisassemble(*this)); m_command_dict["expression"] = CommandObjectSP(new CommandObjectExpression(*this)); m_command_dict["frame"] = CommandObjectSP(new CommandObjectMultiwordFrame(*this)); m_command_dict["gui"] = CommandObjectSP(new CommandObjectGUI(*this)); m_command_dict["help"] = CommandObjectSP(new CommandObjectHelp(*this)); m_command_dict["log"] = CommandObjectSP(new CommandObjectLog(*this)); m_command_dict["memory"] = CommandObjectSP(new CommandObjectMemory(*this)); m_command_dict["platform"] = CommandObjectSP(new CommandObjectPlatform(*this)); m_command_dict["plugin"] = CommandObjectSP(new CommandObjectPlugin(*this)); m_command_dict["process"] = CommandObjectSP(new CommandObjectMultiwordProcess(*this)); m_command_dict["quit"] = CommandObjectSP(new CommandObjectQuit(*this)); m_command_dict["register"] = CommandObjectSP(new CommandObjectRegister(*this)); m_command_dict["script"] = CommandObjectSP(new CommandObjectScript(*this, script_language)); m_command_dict["settings"] = CommandObjectSP(new CommandObjectMultiwordSettings(*this)); m_command_dict["source"] = CommandObjectSP(new CommandObjectMultiwordSource(*this)); m_command_dict["target"] = CommandObjectSP(new CommandObjectMultiwordTarget(*this)); m_command_dict["thread"] = CommandObjectSP(new CommandObjectMultiwordThread(*this)); m_command_dict["type"] = CommandObjectSP(new CommandObjectType(*this)); m_command_dict["version"] = CommandObjectSP(new CommandObjectVersion(*this)); m_command_dict["watchpoint"] = CommandObjectSP(new CommandObjectMultiwordWatchpoint(*this)); m_command_dict["language"] = CommandObjectSP(new CommandObjectLanguage(*this)); const char *break_regexes[][2] = { {"^(.*[^[:space:]])[[:space:]]*:[[:space:]]*([[:digit:]]+)[[:space:]]*$", "breakpoint set --file '%1' --line %2"}, {"^/([^/]+)/$", "breakpoint set --source-pattern-regexp '%1'"}, {"^([[:digit:]]+)[[:space:]]*$", "breakpoint set --line %1"}, {"^\\*?(0x[[:xdigit:]]+)[[:space:]]*$", "breakpoint set --address %1"}, {"^[\"']?([-+]?\\[.*\\])[\"']?[[:space:]]*$", "breakpoint set --name '%1'"}, {"^(-.*)$", "breakpoint set %1"}, {"^(.*[^[:space:]])`(.*[^[:space:]])[[:space:]]*$", "breakpoint set --name '%2' --shlib '%1'"}, {"^\\&(.*[^[:space:]])[[:space:]]*$", "breakpoint set --name '%1' --skip-prologue=0"}, {"^[\"']?(.*[^[:space:]\"'])[\"']?[[:space:]]*$", "breakpoint set --name '%1'"}}; size_t num_regexes = llvm::array_lengthof(break_regexes); std::unique_ptr break_regex_cmd_ap( new CommandObjectRegexCommand( *this, "_regexp-break", "Set a breakpoint using one of several shorthand formats.\n", "\n" "_regexp-break :\n" " main.c:12 // Break at line 12 of " "main.c\n\n" "_regexp-break \n" " 12 // Break at line 12 of current " "file\n\n" "_regexp-break 0x
\n" " 0x1234000 // Break at address " "0x1234000\n\n" "_regexp-break \n" " main // Break in 'main' after the " "prologue\n\n" "_regexp-break &\n" " &main // Break at first instruction " "in 'main'\n\n" "_regexp-break `\n" " libc.so`malloc // Break in 'malloc' from " "'libc.so'\n\n" "_regexp-break //\n" " /break here/ // Break on source lines in " "current file\n" " // containing text 'break " "here'.\n", 2, CommandCompletions::eSymbolCompletion | CommandCompletions::eSourceFileCompletion, false)); if (break_regex_cmd_ap.get()) { bool success = true; for (size_t i = 0; i < num_regexes; i++) { success = break_regex_cmd_ap->AddRegexCommand(break_regexes[i][0], break_regexes[i][1]); if (!success) break; } success = break_regex_cmd_ap->AddRegexCommand("^$", "breakpoint list --full"); if (success) { CommandObjectSP break_regex_cmd_sp(break_regex_cmd_ap.release()); m_command_dict[break_regex_cmd_sp->GetCommandName()] = break_regex_cmd_sp; } } std::unique_ptr tbreak_regex_cmd_ap( new CommandObjectRegexCommand( *this, "_regexp-tbreak", "Set a one-shot breakpoint using one of several shorthand formats.\n", "\n" "_regexp-break :\n" " main.c:12 // Break at line 12 of " "main.c\n\n" "_regexp-break \n" " 12 // Break at line 12 of current " "file\n\n" "_regexp-break 0x
\n" " 0x1234000 // Break at address " "0x1234000\n\n" "_regexp-break \n" " main // Break in 'main' after the " "prologue\n\n" "_regexp-break &\n" " &main // Break at first instruction " "in 'main'\n\n" "_regexp-break `\n" " libc.so`malloc // Break in 'malloc' from " "'libc.so'\n\n" "_regexp-break //\n" " /break here/ // Break on source lines in " "current file\n" " // containing text 'break " "here'.\n", 2, CommandCompletions::eSymbolCompletion | CommandCompletions::eSourceFileCompletion, false)); if (tbreak_regex_cmd_ap.get()) { bool success = true; for (size_t i = 0; i < num_regexes; i++) { // If you add a resultant command string longer than 1024 characters be // sure to increase the size of this buffer. char buffer[1024]; int num_printed = snprintf(buffer, 1024, "%s %s", break_regexes[i][1], "-o"); assert(num_printed < 1024); UNUSED_IF_ASSERT_DISABLED(num_printed); success = tbreak_regex_cmd_ap->AddRegexCommand(break_regexes[i][0], buffer); if (!success) break; } success = tbreak_regex_cmd_ap->AddRegexCommand("^$", "breakpoint list --full"); if (success) { CommandObjectSP tbreak_regex_cmd_sp(tbreak_regex_cmd_ap.release()); m_command_dict[tbreak_regex_cmd_sp->GetCommandName()] = tbreak_regex_cmd_sp; } } std::unique_ptr attach_regex_cmd_ap( new CommandObjectRegexCommand( *this, "_regexp-attach", "Attach to process by ID or name.", "_regexp-attach | ", 2, 0, false)); if (attach_regex_cmd_ap.get()) { if (attach_regex_cmd_ap->AddRegexCommand("^([0-9]+)[[:space:]]*$", "process attach --pid %1") && attach_regex_cmd_ap->AddRegexCommand( "^(-.*|.* -.*)$", "process attach %1") && // Any options that are // specified get passed to // 'process attach' attach_regex_cmd_ap->AddRegexCommand("^(.+)$", "process attach --name '%1'") && attach_regex_cmd_ap->AddRegexCommand("^$", "process attach")) { CommandObjectSP attach_regex_cmd_sp(attach_regex_cmd_ap.release()); m_command_dict[attach_regex_cmd_sp->GetCommandName()] = attach_regex_cmd_sp; } } std::unique_ptr down_regex_cmd_ap( new CommandObjectRegexCommand(*this, "_regexp-down", "Select a newer stack frame. Defaults to " "moving one frame, a numeric argument can " "specify an arbitrary number.", "_regexp-down []", 2, 0, false)); if (down_regex_cmd_ap.get()) { if (down_regex_cmd_ap->AddRegexCommand("^$", "frame select -r -1") && down_regex_cmd_ap->AddRegexCommand("^([0-9]+)$", "frame select -r -%1")) { CommandObjectSP down_regex_cmd_sp(down_regex_cmd_ap.release()); m_command_dict[down_regex_cmd_sp->GetCommandName()] = down_regex_cmd_sp; } } std::unique_ptr up_regex_cmd_ap( new CommandObjectRegexCommand( *this, "_regexp-up", "Select an older stack frame. Defaults to moving one " "frame, a numeric argument can specify an arbitrary number.", "_regexp-up []", 2, 0, false)); if (up_regex_cmd_ap.get()) { if (up_regex_cmd_ap->AddRegexCommand("^$", "frame select -r 1") && up_regex_cmd_ap->AddRegexCommand("^([0-9]+)$", "frame select -r %1")) { CommandObjectSP up_regex_cmd_sp(up_regex_cmd_ap.release()); m_command_dict[up_regex_cmd_sp->GetCommandName()] = up_regex_cmd_sp; } } std::unique_ptr display_regex_cmd_ap( new CommandObjectRegexCommand( *this, "_regexp-display", "Evaluate an expression at every stop (see 'help target stop-hook'.)", "_regexp-display expression", 2, 0, false)); if (display_regex_cmd_ap.get()) { if (display_regex_cmd_ap->AddRegexCommand( "^(.+)$", "target stop-hook add -o \"expr -- %1\"")) { CommandObjectSP display_regex_cmd_sp(display_regex_cmd_ap.release()); m_command_dict[display_regex_cmd_sp->GetCommandName()] = display_regex_cmd_sp; } } std::unique_ptr undisplay_regex_cmd_ap( new CommandObjectRegexCommand( *this, "_regexp-undisplay", "Stop displaying expression at every " "stop (specified by stop-hook index.)", "_regexp-undisplay stop-hook-number", 2, 0, false)); if (undisplay_regex_cmd_ap.get()) { if (undisplay_regex_cmd_ap->AddRegexCommand("^([0-9]+)$", "target stop-hook delete %1")) { CommandObjectSP undisplay_regex_cmd_sp(undisplay_regex_cmd_ap.release()); m_command_dict[undisplay_regex_cmd_sp->GetCommandName()] = undisplay_regex_cmd_sp; } } std::unique_ptr connect_gdb_remote_cmd_ap( new CommandObjectRegexCommand( *this, "gdb-remote", "Connect to a process via remote GDB server. " "If no host is specifed, localhost is assumed.", "gdb-remote [:]", 2, 0, false)); if (connect_gdb_remote_cmd_ap.get()) { if (connect_gdb_remote_cmd_ap->AddRegexCommand( - "^([^:]+:[[:digit:]]+)$", - "process connect --plugin gdb-remote connect://%1") && + "^([^:]+|\\[[0-9a-fA-F:]+.*\\]):([0-9]+)$", + "process connect --plugin gdb-remote connect://%1:%2") && connect_gdb_remote_cmd_ap->AddRegexCommand( "^([[:digit:]]+)$", "process connect --plugin gdb-remote connect://localhost:%1")) { CommandObjectSP command_sp(connect_gdb_remote_cmd_ap.release()); m_command_dict[command_sp->GetCommandName()] = command_sp; } } std::unique_ptr connect_kdp_remote_cmd_ap( new CommandObjectRegexCommand( *this, "kdp-remote", "Connect to a process via remote KDP server. " "If no UDP port is specified, port 41139 is " "assumed.", "kdp-remote [:]", 2, 0, false)); if (connect_kdp_remote_cmd_ap.get()) { if (connect_kdp_remote_cmd_ap->AddRegexCommand( "^([^:]+:[[:digit:]]+)$", "process connect --plugin kdp-remote udp://%1") && connect_kdp_remote_cmd_ap->AddRegexCommand( "^(.+)$", "process connect --plugin kdp-remote udp://%1:41139")) { CommandObjectSP command_sp(connect_kdp_remote_cmd_ap.release()); m_command_dict[command_sp->GetCommandName()] = command_sp; } } std::unique_ptr bt_regex_cmd_ap( new CommandObjectRegexCommand( *this, "_regexp-bt", "Show the current thread's call stack. Any numeric argument " "displays at most that many " "frames. The argument 'all' displays all threads.", "bt [ | all]", 2, 0, false)); if (bt_regex_cmd_ap.get()) { // accept but don't document "bt -c " -- before bt was a regex // command if you wanted to backtrace // three frames you would do "bt -c 3" but the intention is to have this // emulate the gdb "bt" command and // so now "bt 3" is the preferred form, in line with gdb. if (bt_regex_cmd_ap->AddRegexCommand("^([[:digit:]]+)$", "thread backtrace -c %1") && bt_regex_cmd_ap->AddRegexCommand("^-c ([[:digit:]]+)$", "thread backtrace -c %1") && bt_regex_cmd_ap->AddRegexCommand("^all$", "thread backtrace all") && bt_regex_cmd_ap->AddRegexCommand("^$", "thread backtrace")) { CommandObjectSP command_sp(bt_regex_cmd_ap.release()); m_command_dict[command_sp->GetCommandName()] = command_sp; } } std::unique_ptr list_regex_cmd_ap( new CommandObjectRegexCommand( *this, "_regexp-list", "List relevant source code using one of several shorthand formats.", "\n" "_regexp-list : // List around specific file/line\n" "_regexp-list // List current file around specified " "line\n" "_regexp-list // List specified function\n" "_regexp-list 0x
// List around specified address\n" "_regexp-list -[] // List previous lines\n" "_regexp-list // List subsequent lines", 2, CommandCompletions::eSourceFileCompletion, false)); if (list_regex_cmd_ap.get()) { if (list_regex_cmd_ap->AddRegexCommand("^([0-9]+)[[:space:]]*$", "source list --line %1") && list_regex_cmd_ap->AddRegexCommand( "^(.*[^[:space:]])[[:space:]]*:[[:space:]]*([[:digit:]]+)[[:space:]" "]*$", "source list --file '%1' --line %2") && list_regex_cmd_ap->AddRegexCommand( "^\\*?(0x[[:xdigit:]]+)[[:space:]]*$", "source list --address %1") && list_regex_cmd_ap->AddRegexCommand("^-[[:space:]]*$", "source list --reverse") && list_regex_cmd_ap->AddRegexCommand( "^-([[:digit:]]+)[[:space:]]*$", "source list --reverse --count %1") && list_regex_cmd_ap->AddRegexCommand("^(.+)$", "source list --name \"%1\"") && list_regex_cmd_ap->AddRegexCommand("^$", "source list")) { CommandObjectSP list_regex_cmd_sp(list_regex_cmd_ap.release()); m_command_dict[list_regex_cmd_sp->GetCommandName()] = list_regex_cmd_sp; } } std::unique_ptr env_regex_cmd_ap( new CommandObjectRegexCommand( *this, "_regexp-env", "Shorthand for viewing and setting environment variables.", "\n" "_regexp-env // Show enrivonment\n" "_regexp-env = // Set an environment variable", 2, 0, false)); if (env_regex_cmd_ap.get()) { if (env_regex_cmd_ap->AddRegexCommand("^$", "settings show target.env-vars") && env_regex_cmd_ap->AddRegexCommand("^([A-Za-z_][A-Za-z_0-9]*=.*)$", "settings set target.env-vars %1")) { CommandObjectSP env_regex_cmd_sp(env_regex_cmd_ap.release()); m_command_dict[env_regex_cmd_sp->GetCommandName()] = env_regex_cmd_sp; } } std::unique_ptr jump_regex_cmd_ap( new CommandObjectRegexCommand( *this, "_regexp-jump", "Set the program counter to a new address.", "\n" "_regexp-jump \n" "_regexp-jump + | -\n" "_regexp-jump :\n" "_regexp-jump *\n", 2, 0, false)); if (jump_regex_cmd_ap.get()) { if (jump_regex_cmd_ap->AddRegexCommand("^\\*(.*)$", "thread jump --addr %1") && jump_regex_cmd_ap->AddRegexCommand("^([0-9]+)$", "thread jump --line %1") && jump_regex_cmd_ap->AddRegexCommand("^([^:]+):([0-9]+)$", "thread jump --file %1 --line %2") && jump_regex_cmd_ap->AddRegexCommand("^([+\\-][0-9]+)$", "thread jump --by %1")) { CommandObjectSP jump_regex_cmd_sp(jump_regex_cmd_ap.release()); m_command_dict[jump_regex_cmd_sp->GetCommandName()] = jump_regex_cmd_sp; } } } int CommandInterpreter::GetCommandNamesMatchingPartialString( const char *cmd_str, bool include_aliases, StringList &matches) { AddNamesMatchingPartialString(m_command_dict, cmd_str, matches); if (include_aliases) { AddNamesMatchingPartialString(m_alias_dict, cmd_str, matches); } return matches.GetSize(); } CommandObjectSP CommandInterpreter::GetCommandSP(llvm::StringRef cmd_str, bool include_aliases, bool exact, StringList *matches) const { CommandObjectSP command_sp; std::string cmd = cmd_str; if (HasCommands()) { auto pos = m_command_dict.find(cmd); if (pos != m_command_dict.end()) command_sp = pos->second; } if (include_aliases && HasAliases()) { auto alias_pos = m_alias_dict.find(cmd); if (alias_pos != m_alias_dict.end()) command_sp = alias_pos->second; } if (HasUserCommands()) { auto pos = m_user_dict.find(cmd); if (pos != m_user_dict.end()) command_sp = pos->second; } if (!exact && !command_sp) { // We will only get into here if we didn't find any exact matches. CommandObjectSP user_match_sp, alias_match_sp, real_match_sp; StringList local_matches; if (matches == nullptr) matches = &local_matches; unsigned int num_cmd_matches = 0; unsigned int num_alias_matches = 0; unsigned int num_user_matches = 0; // Look through the command dictionaries one by one, and if we get only one // match from any of // them in toto, then return that, otherwise return an empty CommandObjectSP // and the list of matches. if (HasCommands()) { num_cmd_matches = AddNamesMatchingPartialString(m_command_dict, cmd_str, *matches); } if (num_cmd_matches == 1) { cmd.assign(matches->GetStringAtIndex(0)); auto pos = m_command_dict.find(cmd); if (pos != m_command_dict.end()) real_match_sp = pos->second; } if (include_aliases && HasAliases()) { num_alias_matches = AddNamesMatchingPartialString(m_alias_dict, cmd_str, *matches); } if (num_alias_matches == 1) { cmd.assign(matches->GetStringAtIndex(num_cmd_matches)); auto alias_pos = m_alias_dict.find(cmd); if (alias_pos != m_alias_dict.end()) alias_match_sp = alias_pos->second; } if (HasUserCommands()) { num_user_matches = AddNamesMatchingPartialString(m_user_dict, cmd_str, *matches); } if (num_user_matches == 1) { cmd.assign( matches->GetStringAtIndex(num_cmd_matches + num_alias_matches)); auto pos = m_user_dict.find(cmd); if (pos != m_user_dict.end()) user_match_sp = pos->second; } // If we got exactly one match, return that, otherwise return the match // list. if (num_user_matches + num_cmd_matches + num_alias_matches == 1) { if (num_cmd_matches) return real_match_sp; else if (num_alias_matches) return alias_match_sp; else return user_match_sp; } } else if (matches && command_sp) { matches->AppendString(cmd_str); } return command_sp; } bool CommandInterpreter::AddCommand(llvm::StringRef name, const lldb::CommandObjectSP &cmd_sp, bool can_replace) { if (cmd_sp.get()) assert((this == &cmd_sp->GetCommandInterpreter()) && "tried to add a CommandObject from a different interpreter"); if (name.empty()) return false; std::string name_sstr(name); auto name_iter = m_command_dict.find(name_sstr); if (name_iter != m_command_dict.end()) { if (!can_replace || !name_iter->second->IsRemovable()) return false; name_iter->second = cmd_sp; } else { m_command_dict[name_sstr] = cmd_sp; } return true; } bool CommandInterpreter::AddUserCommand(llvm::StringRef name, const lldb::CommandObjectSP &cmd_sp, bool can_replace) { if (cmd_sp.get()) assert((this == &cmd_sp->GetCommandInterpreter()) && "tried to add a CommandObject from a different interpreter"); if (!name.empty()) { // do not allow replacement of internal commands if (CommandExists(name)) { if (can_replace == false) return false; if (m_command_dict[name]->IsRemovable() == false) return false; } if (UserCommandExists(name)) { if (can_replace == false) return false; if (m_user_dict[name]->IsRemovable() == false) return false; } m_user_dict[name] = cmd_sp; return true; } return false; } CommandObjectSP CommandInterpreter::GetCommandSPExact(llvm::StringRef cmd_str, bool include_aliases) const { Args cmd_words(cmd_str); // Break up the command string into words, in case // it's a multi-word command. CommandObjectSP ret_val; // Possibly empty return value. if (cmd_str.empty()) return ret_val; if (cmd_words.GetArgumentCount() == 1) return GetCommandSP(cmd_str, include_aliases, true, nullptr); else { // We have a multi-word command (seemingly), so we need to do more work. // First, get the cmd_obj_sp for the first word in the command. CommandObjectSP cmd_obj_sp = GetCommandSP(llvm::StringRef(cmd_words.GetArgumentAtIndex(0)), include_aliases, true, nullptr); if (cmd_obj_sp.get() != nullptr) { // Loop through the rest of the words in the command (everything passed in // was supposed to be part of a // command name), and find the appropriate sub-command SP for each command // word.... size_t end = cmd_words.GetArgumentCount(); for (size_t j = 1; j < end; ++j) { if (cmd_obj_sp->IsMultiwordObject()) { cmd_obj_sp = cmd_obj_sp->GetSubcommandSP(cmd_words.GetArgumentAtIndex(j)); if (cmd_obj_sp.get() == nullptr) // The sub-command name was invalid. Fail and return the empty // 'ret_val'. return ret_val; } else // We have more words in the command name, but we don't have a // multiword object. Fail and return empty 'ret_val'. return ret_val; } // We successfully looped through all the command words and got valid // command objects for them. Assign the last object retrieved to // 'ret_val'. ret_val = cmd_obj_sp; } } return ret_val; } CommandObject *CommandInterpreter::GetCommandObject(llvm::StringRef cmd_str, StringList *matches) const { CommandObject *command_obj = GetCommandSP(cmd_str, false, true, matches).get(); // If we didn't find an exact match to the command string in the commands, // look in // the aliases. if (command_obj) return command_obj; command_obj = GetCommandSP(cmd_str, true, true, matches).get(); if (command_obj) return command_obj; // If there wasn't an exact match then look for an inexact one in just the // commands command_obj = GetCommandSP(cmd_str, false, false, nullptr).get(); // Finally, if there wasn't an inexact match among the commands, look for an // inexact // match in both the commands and aliases. if (command_obj) { if (matches) matches->AppendString(command_obj->GetCommandName()); return command_obj; } return GetCommandSP(cmd_str, true, false, matches).get(); } bool CommandInterpreter::CommandExists(llvm::StringRef cmd) const { return m_command_dict.find(cmd) != m_command_dict.end(); } bool CommandInterpreter::GetAliasFullName(llvm::StringRef cmd, std::string &full_name) const { bool exact_match = (m_alias_dict.find(cmd) != m_alias_dict.end()); if (exact_match) { full_name.assign(cmd); return exact_match; } else { StringList matches; size_t num_alias_matches; num_alias_matches = AddNamesMatchingPartialString(m_alias_dict, cmd, matches); if (num_alias_matches == 1) { // Make sure this isn't shadowing a command in the regular command space: StringList regular_matches; const bool include_aliases = false; const bool exact = false; CommandObjectSP cmd_obj_sp( GetCommandSP(cmd, include_aliases, exact, ®ular_matches)); if (cmd_obj_sp || regular_matches.GetSize() > 0) return false; else { full_name.assign(matches.GetStringAtIndex(0)); return true; } } else return false; } } bool CommandInterpreter::AliasExists(llvm::StringRef cmd) const { return m_alias_dict.find(cmd) != m_alias_dict.end(); } bool CommandInterpreter::UserCommandExists(llvm::StringRef cmd) const { return m_user_dict.find(cmd) != m_user_dict.end(); } CommandAlias * CommandInterpreter::AddAlias(llvm::StringRef alias_name, lldb::CommandObjectSP &command_obj_sp, llvm::StringRef args_string) { if (command_obj_sp.get()) assert((this == &command_obj_sp->GetCommandInterpreter()) && "tried to add a CommandObject from a different interpreter"); std::unique_ptr command_alias_up( new CommandAlias(*this, command_obj_sp, args_string, alias_name)); if (command_alias_up && command_alias_up->IsValid()) { m_alias_dict[alias_name] = CommandObjectSP(command_alias_up.get()); return command_alias_up.release(); } return nullptr; } bool CommandInterpreter::RemoveAlias(llvm::StringRef alias_name) { auto pos = m_alias_dict.find(alias_name); if (pos != m_alias_dict.end()) { m_alias_dict.erase(pos); return true; } return false; } bool CommandInterpreter::RemoveCommand(llvm::StringRef cmd) { auto pos = m_command_dict.find(cmd); if (pos != m_command_dict.end()) { if (pos->second->IsRemovable()) { // Only regular expression objects or python commands are removable m_command_dict.erase(pos); return true; } } return false; } bool CommandInterpreter::RemoveUser(llvm::StringRef alias_name) { CommandObject::CommandMap::iterator pos = m_user_dict.find(alias_name); if (pos != m_user_dict.end()) { m_user_dict.erase(pos); return true; } return false; } void CommandInterpreter::GetHelp(CommandReturnObject &result, uint32_t cmd_types) { llvm::StringRef help_prologue(GetDebugger().GetIOHandlerHelpPrologue()); if (!help_prologue.empty()) { OutputFormattedHelpText(result.GetOutputStream(), llvm::StringRef(), help_prologue); } CommandObject::CommandMap::const_iterator pos; size_t max_len = FindLongestCommandWord(m_command_dict); if ((cmd_types & eCommandTypesBuiltin) == eCommandTypesBuiltin) { result.AppendMessage("Debugger commands:"); result.AppendMessage(""); for (pos = m_command_dict.begin(); pos != m_command_dict.end(); ++pos) { if (!(cmd_types & eCommandTypesHidden) && (pos->first.compare(0, 1, "_") == 0)) continue; OutputFormattedHelpText(result.GetOutputStream(), pos->first, "--", pos->second->GetHelp(), max_len); } result.AppendMessage(""); } if (!m_alias_dict.empty() && ((cmd_types & eCommandTypesAliases) == eCommandTypesAliases)) { result.AppendMessageWithFormat( "Current command abbreviations " "(type '%shelp command alias' for more info):\n", GetCommandPrefix()); result.AppendMessage(""); max_len = FindLongestCommandWord(m_alias_dict); for (auto alias_pos = m_alias_dict.begin(); alias_pos != m_alias_dict.end(); ++alias_pos) { OutputFormattedHelpText(result.GetOutputStream(), alias_pos->first, "--", alias_pos->second->GetHelp(), max_len); } result.AppendMessage(""); } if (!m_user_dict.empty() && ((cmd_types & eCommandTypesUserDef) == eCommandTypesUserDef)) { result.AppendMessage("Current user-defined commands:"); result.AppendMessage(""); max_len = FindLongestCommandWord(m_user_dict); for (pos = m_user_dict.begin(); pos != m_user_dict.end(); ++pos) { OutputFormattedHelpText(result.GetOutputStream(), pos->first, "--", pos->second->GetHelp(), max_len); } result.AppendMessage(""); } result.AppendMessageWithFormat( "For more information on any command, type '%shelp '.\n", GetCommandPrefix()); } CommandObject *CommandInterpreter::GetCommandObjectForCommand( llvm::StringRef &command_string) { // This function finds the final, lowest-level, alias-resolved command object // whose 'Execute' function will // eventually be invoked by the given command line. CommandObject *cmd_obj = nullptr; size_t start = command_string.find_first_not_of(k_white_space); size_t end = 0; bool done = false; while (!done) { if (start != std::string::npos) { // Get the next word from command_string. end = command_string.find_first_of(k_white_space, start); if (end == std::string::npos) end = command_string.size(); std::string cmd_word = command_string.substr(start, end - start); if (cmd_obj == nullptr) // Since cmd_obj is NULL we are on our first time through this loop. // Check to see if cmd_word is a valid command or alias. cmd_obj = GetCommandObject(cmd_word); else if (cmd_obj->IsMultiwordObject()) { // Our current object is a multi-word object; see if the cmd_word is a // valid sub-command for our object. CommandObject *sub_cmd_obj = cmd_obj->GetSubcommandObject(cmd_word.c_str()); if (sub_cmd_obj) cmd_obj = sub_cmd_obj; else // cmd_word was not a valid sub-command word, so we are done done = true; } else // We have a cmd_obj and it is not a multi-word object, so we are done. done = true; // If we didn't find a valid command object, or our command object is not // a multi-word object, or we are at the end of the command_string, then // we are done. Otherwise, find the start of the next word. if (!cmd_obj || !cmd_obj->IsMultiwordObject() || end >= command_string.size()) done = true; else start = command_string.find_first_not_of(k_white_space, end); } else // Unable to find any more words. done = true; } command_string = command_string.substr(end); return cmd_obj; } static const char *k_valid_command_chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_"; static void StripLeadingSpaces(std::string &s) { if (!s.empty()) { size_t pos = s.find_first_not_of(k_white_space); if (pos == std::string::npos) s.clear(); else if (pos == 0) return; s.erase(0, pos); } } static size_t FindArgumentTerminator(const std::string &s) { const size_t s_len = s.size(); size_t offset = 0; while (offset < s_len) { size_t pos = s.find("--", offset); if (pos == std::string::npos) break; if (pos > 0) { if (isspace(s[pos - 1])) { // Check if the string ends "\s--" (where \s is a space character) // or if we have "\s--\s". if ((pos + 2 >= s_len) || isspace(s[pos + 2])) { return pos; } } } offset = pos + 2; } return std::string::npos; } static bool ExtractCommand(std::string &command_string, std::string &command, std::string &suffix, char "e_char) { command.clear(); suffix.clear(); StripLeadingSpaces(command_string); bool result = false; quote_char = '\0'; if (!command_string.empty()) { const char first_char = command_string[0]; if (first_char == '\'' || first_char == '"') { quote_char = first_char; const size_t end_quote_pos = command_string.find(quote_char, 1); if (end_quote_pos == std::string::npos) { command.swap(command_string); command_string.erase(); } else { command.assign(command_string, 1, end_quote_pos - 1); if (end_quote_pos + 1 < command_string.size()) command_string.erase(0, command_string.find_first_not_of( k_white_space, end_quote_pos + 1)); else command_string.erase(); } } else { const size_t first_space_pos = command_string.find_first_of(k_white_space); if (first_space_pos == std::string::npos) { command.swap(command_string); command_string.erase(); } else { command.assign(command_string, 0, first_space_pos); command_string.erase(0, command_string.find_first_not_of( k_white_space, first_space_pos)); } } result = true; } if (!command.empty()) { // actual commands can't start with '-' or '_' if (command[0] != '-' && command[0] != '_') { size_t pos = command.find_first_not_of(k_valid_command_chars); if (pos > 0 && pos != std::string::npos) { suffix.assign(command.begin() + pos, command.end()); command.erase(pos); } } } return result; } CommandObject *CommandInterpreter::BuildAliasResult( llvm::StringRef alias_name, std::string &raw_input_string, std::string &alias_result, CommandReturnObject &result) { CommandObject *alias_cmd_obj = nullptr; Args cmd_args(raw_input_string); alias_cmd_obj = GetCommandObject(alias_name); StreamString result_str; if (!alias_cmd_obj || !alias_cmd_obj->IsAlias()) { alias_result.clear(); return alias_cmd_obj; } std::pair desugared = ((CommandAlias *)alias_cmd_obj)->Desugar(); OptionArgVectorSP option_arg_vector_sp = desugared.second; alias_cmd_obj = desugared.first.get(); std::string alias_name_str = alias_name; if ((cmd_args.GetArgumentCount() == 0) || (alias_name_str.compare(cmd_args.GetArgumentAtIndex(0)) != 0)) cmd_args.Unshift(alias_name_str); result_str.Printf("%s", alias_cmd_obj->GetCommandName().str().c_str()); if (!option_arg_vector_sp.get()) { alias_result = result_str.GetString(); return alias_cmd_obj; } OptionArgVector *option_arg_vector = option_arg_vector_sp.get(); int value_type; std::string option; std::string value; for (const auto &entry : *option_arg_vector) { std::tie(option, value_type, value) = entry; if (option == "") { result_str.Printf(" %s", value.c_str()); continue; } result_str.Printf(" %s", option.c_str()); if (value_type == OptionParser::eNoArgument) continue; if (value_type != OptionParser::eOptionalArgument) result_str.Printf(" "); int index = GetOptionArgumentPosition(value.c_str()); if (index == 0) result_str.Printf("%s", value.c_str()); else if (static_cast(index) >= cmd_args.GetArgumentCount()) { result.AppendErrorWithFormat("Not enough arguments provided; you " "need at least %d arguments to use " "this alias.\n", index); result.SetStatus(eReturnStatusFailed); return nullptr; } else { size_t strpos = raw_input_string.find(cmd_args.GetArgumentAtIndex(index)); if (strpos != std::string::npos) raw_input_string = raw_input_string.erase( strpos, strlen(cmd_args.GetArgumentAtIndex(index))); result_str.Printf("%s", cmd_args.GetArgumentAtIndex(index)); } } alias_result = result_str.GetString(); return alias_cmd_obj; } Error CommandInterpreter::PreprocessCommand(std::string &command) { // The command preprocessor needs to do things to the command // line before any parsing of arguments or anything else is done. // The only current stuff that gets preprocessed is anything enclosed // in backtick ('`') characters is evaluated as an expression and // the result of the expression must be a scalar that can be substituted // into the command. An example would be: // (lldb) memory read `$rsp + 20` Error error; // Error for any expressions that might not evaluate size_t start_backtick; size_t pos = 0; while ((start_backtick = command.find('`', pos)) != std::string::npos) { if (start_backtick > 0 && command[start_backtick - 1] == '\\') { // The backtick was preceded by a '\' character, remove the slash // and don't treat the backtick as the start of an expression command.erase(start_backtick - 1, 1); // No need to add one to start_backtick since we just deleted a char pos = start_backtick; } else { const size_t expr_content_start = start_backtick + 1; const size_t end_backtick = command.find('`', expr_content_start); if (end_backtick == std::string::npos) return error; else if (end_backtick == expr_content_start) { // Empty expression (two backticks in a row) command.erase(start_backtick, 2); } else { std::string expr_str(command, expr_content_start, end_backtick - expr_content_start); ExecutionContext exe_ctx(GetExecutionContext()); Target *target = exe_ctx.GetTargetPtr(); // Get a dummy target to allow for calculator mode while processing // backticks. // This also helps break the infinite loop caused when target is null. if (!target) target = m_debugger.GetDummyTarget(); if (target) { ValueObjectSP expr_result_valobj_sp; EvaluateExpressionOptions options; options.SetCoerceToId(false); options.SetUnwindOnError(true); options.SetIgnoreBreakpoints(true); options.SetKeepInMemory(false); options.SetTryAllThreads(true); options.SetTimeout(llvm::None); ExpressionResults expr_result = target->EvaluateExpression( expr_str.c_str(), exe_ctx.GetFramePtr(), expr_result_valobj_sp, options); if (expr_result == eExpressionCompleted) { Scalar scalar; if (expr_result_valobj_sp) expr_result_valobj_sp = expr_result_valobj_sp->GetQualifiedRepresentationIfAvailable( expr_result_valobj_sp->GetDynamicValueType(), true); if (expr_result_valobj_sp->ResolveValue(scalar)) { command.erase(start_backtick, end_backtick - start_backtick + 1); StreamString value_strm; const bool show_type = false; scalar.GetValue(&value_strm, show_type); size_t value_string_size = value_strm.GetSize(); if (value_string_size) { command.insert(start_backtick, value_strm.GetString()); pos = start_backtick + value_string_size; continue; } else { error.SetErrorStringWithFormat("expression value didn't result " "in a scalar value for the " "expression '%s'", expr_str.c_str()); } } else { error.SetErrorStringWithFormat("expression value didn't result " "in a scalar value for the " "expression '%s'", expr_str.c_str()); } } else { if (expr_result_valobj_sp) error = expr_result_valobj_sp->GetError(); if (error.Success()) { switch (expr_result) { case eExpressionSetupError: error.SetErrorStringWithFormat( "expression setup error for the expression '%s'", expr_str.c_str()); break; case eExpressionParseError: error.SetErrorStringWithFormat( "expression parse error for the expression '%s'", expr_str.c_str()); break; case eExpressionResultUnavailable: error.SetErrorStringWithFormat( "expression error fetching result for the expression '%s'", expr_str.c_str()); break; case eExpressionCompleted: break; case eExpressionDiscarded: error.SetErrorStringWithFormat( "expression discarded for the expression '%s'", expr_str.c_str()); break; case eExpressionInterrupted: error.SetErrorStringWithFormat( "expression interrupted for the expression '%s'", expr_str.c_str()); break; case eExpressionHitBreakpoint: error.SetErrorStringWithFormat( "expression hit breakpoint for the expression '%s'", expr_str.c_str()); break; case eExpressionTimedOut: error.SetErrorStringWithFormat( "expression timed out for the expression '%s'", expr_str.c_str()); break; case eExpressionStoppedForDebug: error.SetErrorStringWithFormat("expression stop at entry point " "for debugging for the " "expression '%s'", expr_str.c_str()); break; } } } } } if (error.Fail()) break; } } return error; } bool CommandInterpreter::HandleCommand(const char *command_line, LazyBool lazy_add_to_history, CommandReturnObject &result, ExecutionContext *override_context, bool repeat_on_empty_command, bool no_context_switching) { std::string command_string(command_line); std::string original_command_string(command_line); Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_COMMANDS)); llvm::PrettyStackTraceFormat stack_trace("HandleCommand(command = \"%s\")", command_line); if (log) log->Printf("Processing command: %s", command_line); Timer scoped_timer(LLVM_PRETTY_FUNCTION, "Handling command: %s.", command_line); if (!no_context_switching) UpdateExecutionContext(override_context); bool add_to_history; if (lazy_add_to_history == eLazyBoolCalculate) add_to_history = (m_command_source_depth == 0); else add_to_history = (lazy_add_to_history == eLazyBoolYes); bool empty_command = false; bool comment_command = false; if (command_string.empty()) empty_command = true; else { const char *k_space_characters = "\t\n\v\f\r "; size_t non_space = command_string.find_first_not_of(k_space_characters); // Check for empty line or comment line (lines whose first // non-space character is the comment character for this interpreter) if (non_space == std::string::npos) empty_command = true; else if (command_string[non_space] == m_comment_char) comment_command = true; else if (command_string[non_space] == CommandHistory::g_repeat_char) { llvm::StringRef search_str(command_string); search_str = search_str.drop_front(non_space); if (auto hist_str = m_command_history.FindString(search_str)) { add_to_history = false; command_string = *hist_str; original_command_string = *hist_str; } else { result.AppendErrorWithFormat("Could not find entry: %s in history", command_string.c_str()); result.SetStatus(eReturnStatusFailed); return false; } } } if (empty_command) { if (repeat_on_empty_command) { if (m_command_history.IsEmpty()) { result.AppendError("empty command"); result.SetStatus(eReturnStatusFailed); return false; } else { command_line = m_repeat_command.c_str(); command_string = command_line; original_command_string = command_line; if (m_repeat_command.empty()) { result.AppendErrorWithFormat("No auto repeat.\n"); result.SetStatus(eReturnStatusFailed); return false; } } add_to_history = false; } else { result.SetStatus(eReturnStatusSuccessFinishNoResult); return true; } } else if (comment_command) { result.SetStatus(eReturnStatusSuccessFinishNoResult); return true; } Error error(PreprocessCommand(command_string)); if (error.Fail()) { result.AppendError(error.AsCString()); result.SetStatus(eReturnStatusFailed); return false; } // Phase 1. // Before we do ANY kind of argument processing, we need to figure out what // the real/final command object is for the specified command. This gets // complicated by the fact that the user could have specified an alias, and, // in translating the alias, there may also be command options and/or even // data (including raw text strings) that need to be found and inserted into // the command line as part of the translation. So this first step is plain // look-up and replacement, resulting in: // 1. the command object whose Execute method will actually be called // 2. a revised command string, with all substitutions and replacements // taken care of // From 1 above, we can determine whether the Execute function wants raw // input or not. CommandObject *cmd_obj = ResolveCommandImpl(command_string, result); // Although the user may have abbreviated the command, the command_string now // has the command expanded to the full name. For example, if the input // was "br s -n main", command_string is now "breakpoint set -n main". if (log) { llvm::StringRef command_name = cmd_obj ? cmd_obj->GetCommandName() : ""; log->Printf("HandleCommand, cmd_obj : '%s'", command_name.str().c_str()); log->Printf("HandleCommand, (revised) command_string: '%s'", command_string.c_str()); const bool wants_raw_input = (cmd_obj != NULL) ? cmd_obj->WantsRawCommandString() : false; log->Printf("HandleCommand, wants_raw_input:'%s'", wants_raw_input ? "True" : "False"); } // Phase 2. // Take care of things like setting up the history command & calling the // appropriate Execute method on the // CommandObject, with the appropriate arguments. if (cmd_obj != nullptr) { if (add_to_history) { Args command_args(command_string); const char *repeat_command = cmd_obj->GetRepeatCommand(command_args, 0); if (repeat_command != nullptr) m_repeat_command.assign(repeat_command); else m_repeat_command.assign(original_command_string); m_command_history.AppendString(original_command_string); } std::string remainder; const std::size_t actual_cmd_name_len = cmd_obj->GetCommandName().size(); if (actual_cmd_name_len < command_string.length()) remainder = command_string.substr(actual_cmd_name_len); // Remove any initial spaces size_t pos = remainder.find_first_not_of(k_white_space); 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()); cmd_obj->Execute(remainder.c_str(), result); } else { // We didn't find the first command object, so complete the first argument. Args command_args(command_string); StringList matches; int num_matches; int cursor_index = 0; int cursor_char_position = strlen(command_args.GetArgumentAtIndex(0)); bool word_complete; num_matches = HandleCompletionMatches(command_args, cursor_index, cursor_char_position, 0, -1, word_complete, matches); if (num_matches > 0) { std::string error_msg; error_msg.assign("ambiguous command '"); error_msg.append(command_args.GetArgumentAtIndex(0)); error_msg.append("'."); error_msg.append(" Possible completions:"); for (int i = 0; i < num_matches; i++) { error_msg.append("\n\t"); error_msg.append(matches.GetStringAtIndex(i)); } error_msg.append("\n"); result.AppendRawError(error_msg.c_str()); } else result.AppendErrorWithFormat("Unrecognized command '%s'.\n", command_args.GetArgumentAtIndex(0)); result.SetStatus(eReturnStatusFailed); } if (log) log->Printf("HandleCommand, command %s", (result.Succeeded() ? "succeeded" : "did not succeed")); return result.Succeeded(); } int CommandInterpreter::HandleCompletionMatches( Args &parsed_line, int &cursor_index, int &cursor_char_position, int match_start_point, int max_return_elements, bool &word_complete, StringList &matches) { int num_command_matches = 0; bool look_for_subcommand = false; // For any of the command completions a unique match will be a complete word. word_complete = true; if (cursor_index == -1) { // We got nothing on the command line, so return the list of commands bool include_aliases = true; num_command_matches = GetCommandNamesMatchingPartialString("", include_aliases, matches); } else if (cursor_index == 0) { // The cursor is in the first argument, so just do a lookup in the // dictionary. CommandObject *cmd_obj = GetCommandObject(parsed_line.GetArgumentAtIndex(0), &matches); num_command_matches = matches.GetSize(); if (num_command_matches == 1 && cmd_obj && cmd_obj->IsMultiwordObject() && matches.GetStringAtIndex(0) != nullptr && strcmp(parsed_line.GetArgumentAtIndex(0), matches.GetStringAtIndex(0)) == 0) { if (parsed_line.GetArgumentCount() == 1) { word_complete = true; } else { look_for_subcommand = true; num_command_matches = 0; matches.DeleteStringAtIndex(0); parsed_line.AppendArgument(llvm::StringRef()); cursor_index++; cursor_char_position = 0; } } } if (cursor_index > 0 || look_for_subcommand) { // We are completing further on into a commands arguments, so find the // command and tell it // to complete the command. // First see if there is a matching initial command: CommandObject *command_object = GetCommandObject(parsed_line.GetArgumentAtIndex(0)); if (command_object == nullptr) { return 0; } else { parsed_line.Shift(); cursor_index--; num_command_matches = command_object->HandleCompletion( parsed_line, cursor_index, cursor_char_position, match_start_point, max_return_elements, word_complete, matches); } } 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) { // 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. Args parsed_line(llvm::StringRef(current_line, last_char - current_line)); Args partial_parsed_line( llvm::StringRef(current_line, cursor - current_line)); // 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 = parsed_line.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.Clear(); matches.InsertStringAtIndex(0, *hist_str); return -2; } else return 0; } } int num_args = partial_parsed_line.GetArgumentCount(); int cursor_index = partial_parsed_line.GetArgumentCount() - 1; int cursor_char_position; if (cursor_index == -1) cursor_char_position = 0; else cursor_char_position = strlen(partial_parsed_line.GetArgumentAtIndex(cursor_index)); if (cursor > current_line && 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 = partial_parsed_line.GetArgumentAtIndex(cursor_index); if (cursor_char_position == 0 || current_elem[cursor_char_position - 1] != ' ') { parsed_line.InsertArgumentAtIndex(cursor_index + 1, llvm::StringRef(), '\0'); cursor_index++; cursor_char_position = 0; } } int num_command_matches; matches.Clear(); // Only max_return_elements == -1 is supported at present: assert(max_return_elements == -1); bool word_complete; num_command_matches = HandleCompletionMatches( parsed_line, cursor_index, cursor_char_position, match_start_point, max_return_elements, word_complete, matches); if (num_command_matches <= 0) return num_command_matches; if (num_args == 0) { // If we got an empty string, insert nothing. matches.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; if (cursor_index >= 0) command_partial_str = parsed_line[cursor_index].ref.take_front(cursor_char_position); 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 && word_complete) { char quote_char = parsed_line[cursor_index].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()); } return num_command_matches; } CommandInterpreter::~CommandInterpreter() {} void CommandInterpreter::UpdatePrompt(llvm::StringRef new_prompt) { EventSP prompt_change_event_sp( new Event(eBroadcastBitResetPrompt, new EventDataBytes(new_prompt))); ; BroadcastEvent(prompt_change_event_sp); if (m_command_io_handler_sp) m_command_io_handler_sp->SetPrompt(new_prompt); } bool CommandInterpreter::Confirm(llvm::StringRef message, bool default_answer) { // Check AutoConfirm first: if (m_debugger.GetAutoConfirm()) return default_answer; IOHandlerConfirm *confirm = new IOHandlerConfirm(m_debugger, message, default_answer); IOHandlerSP io_handler_sp(confirm); m_debugger.RunIOHandler(io_handler_sp); return confirm->GetResponse(); } const CommandAlias * CommandInterpreter::GetAlias(llvm::StringRef alias_name) const { OptionArgVectorSP ret_val; auto pos = m_alias_dict.find(alias_name); if (pos != m_alias_dict.end()) return (CommandAlias *)pos->second.get(); return nullptr; } bool CommandInterpreter::HasCommands() const { return (!m_command_dict.empty()); } bool CommandInterpreter::HasAliases() const { return (!m_alias_dict.empty()); } bool CommandInterpreter::HasUserCommands() const { return (!m_user_dict.empty()); } bool CommandInterpreter::HasAliasOptions() const { return HasAliases(); } void CommandInterpreter::BuildAliasCommandArgs(CommandObject *alias_cmd_obj, const char *alias_name, Args &cmd_args, std::string &raw_input_string, CommandReturnObject &result) { OptionArgVectorSP option_arg_vector_sp = GetAlias(alias_name)->GetOptionArguments(); bool wants_raw_input = alias_cmd_obj->WantsRawCommandString(); // Make sure that the alias name is the 0th element in cmd_args std::string alias_name_str = alias_name; if (alias_name_str.compare(cmd_args.GetArgumentAtIndex(0)) != 0) cmd_args.Unshift(alias_name_str); Args new_args(alias_cmd_obj->GetCommandName()); if (new_args.GetArgumentCount() == 2) new_args.Shift(); if (option_arg_vector_sp.get()) { if (wants_raw_input) { // We have a command that both has command options and takes raw input. // Make *sure* it has a // " -- " in the right place in the raw_input_string. size_t pos = raw_input_string.find(" -- "); if (pos == std::string::npos) { // None found; assume it goes at the beginning of the raw input string raw_input_string.insert(0, " -- "); } } OptionArgVector *option_arg_vector = option_arg_vector_sp.get(); const size_t old_size = cmd_args.GetArgumentCount(); std::vector used(old_size + 1, false); used[0] = true; int value_type; std::string option; std::string value; for (const auto &option_entry : *option_arg_vector) { std::tie(option, value_type, value) = option_entry; if (option == "") { if (!wants_raw_input || (value != "--")) { // Since we inserted this above, make sure we don't insert it twice new_args.AppendArgument(value); } continue; } if (value_type != OptionParser::eOptionalArgument) new_args.AppendArgument(option); if (value == "") continue; int index = GetOptionArgumentPosition(value.c_str()); if (index == 0) { // value was NOT a positional argument; must be a real value if (value_type != OptionParser::eOptionalArgument) new_args.AppendArgument(value); else { char buffer[255]; ::snprintf(buffer, sizeof(buffer), "%s%s", option.c_str(), value.c_str()); new_args.AppendArgument(llvm::StringRef(buffer)); } } else if (static_cast(index) >= cmd_args.GetArgumentCount()) { result.AppendErrorWithFormat("Not enough arguments provided; you " "need at least %d arguments to use " "this alias.\n", index); result.SetStatus(eReturnStatusFailed); return; } else { // Find and remove cmd_args.GetArgumentAtIndex(i) from raw_input_string size_t strpos = raw_input_string.find(cmd_args.GetArgumentAtIndex(index)); if (strpos != std::string::npos) { raw_input_string = raw_input_string.erase( strpos, strlen(cmd_args.GetArgumentAtIndex(index))); } if (value_type != OptionParser::eOptionalArgument) new_args.AppendArgument(cmd_args.GetArgumentAtIndex(index)); else { char buffer[255]; ::snprintf(buffer, sizeof(buffer), "%s%s", option.c_str(), cmd_args.GetArgumentAtIndex(index)); new_args.AppendArgument(buffer); } used[index] = true; } } for (auto entry : llvm::enumerate(cmd_args.entries())) { if (!used[entry.index()] && !wants_raw_input) new_args.AppendArgument(entry.value().ref); } cmd_args.Clear(); cmd_args.SetArguments(new_args.GetArgumentCount(), new_args.GetConstArgumentVector()); } else { result.SetStatus(eReturnStatusSuccessFinishNoResult); // This alias was not created with any options; nothing further needs to be // done, unless it is a command that // wants raw input, in which case we need to clear the rest of the data from // cmd_args, since its in the raw // input string. if (wants_raw_input) { cmd_args.Clear(); cmd_args.SetArguments(new_args.GetArgumentCount(), new_args.GetConstArgumentVector()); } return; } result.SetStatus(eReturnStatusSuccessFinishNoResult); return; } int CommandInterpreter::GetOptionArgumentPosition(const char *in_string) { int position = 0; // Any string that isn't an argument position, i.e. '%' // followed by an integer, gets a position // of zero. const char *cptr = in_string; // Does it start with '%' if (cptr[0] == '%') { ++cptr; // Is the rest of it entirely digits? if (isdigit(cptr[0])) { const char *start = cptr; while (isdigit(cptr[0])) ++cptr; // We've gotten to the end of the digits; are we at the end of the string? if (cptr[0] == '\0') position = atoi(start); } } return position; } void CommandInterpreter::SourceInitFile(bool in_cwd, CommandReturnObject &result) { FileSpec init_file; if (in_cwd) { ExecutionContext exe_ctx(GetExecutionContext()); Target *target = exe_ctx.GetTargetPtr(); if (target) { // In the current working directory we don't load any program specific // .lldbinit files, we only look for a ".lldbinit" file. if (m_skip_lldbinit_files) return; LoadCWDlldbinitFile should_load = target->TargetProperties::GetLoadCWDlldbinitFile(); if (should_load == eLoadCWDlldbinitWarn) { FileSpec dot_lldb(".lldbinit", true); llvm::SmallString<64> home_dir_path; llvm::sys::path::home_directory(home_dir_path); FileSpec homedir_dot_lldb(home_dir_path.c_str(), false); homedir_dot_lldb.AppendPathComponent(".lldbinit"); homedir_dot_lldb.ResolvePath(); if (dot_lldb.Exists() && dot_lldb.GetDirectory() != homedir_dot_lldb.GetDirectory()) { result.AppendErrorWithFormat( "There is a .lldbinit file in the current directory which is not " "being read.\n" "To silence this warning without sourcing in the local " ".lldbinit,\n" "add the following to the lldbinit file in your home directory:\n" " settings set target.load-cwd-lldbinit false\n" "To allow lldb to source .lldbinit files in the current working " "directory,\n" "set the value of this variable to true. Only do so if you " "understand and\n" "accept the security risk."); result.SetStatus(eReturnStatusFailed); return; } } else if (should_load == eLoadCWDlldbinitTrue) { init_file.SetFile("./.lldbinit", true); } } } else { // If we aren't looking in the current working directory we are looking // in the home directory. We will first see if there is an application // specific ".lldbinit" file whose name is "~/.lldbinit" followed by a // "-" and the name of the program. If this file doesn't exist, we fall // back to just the "~/.lldbinit" file. We also obey any requests to not // load the init files. llvm::SmallString<64> home_dir_path; llvm::sys::path::home_directory(home_dir_path); FileSpec profilePath(home_dir_path.c_str(), false); profilePath.AppendPathComponent(".lldbinit"); std::string init_file_path = profilePath.GetPath(); if (m_skip_app_init_files == false) { FileSpec program_file_spec(HostInfo::GetProgramFileSpec()); const char *program_name = program_file_spec.GetFilename().AsCString(); if (program_name) { char program_init_file_name[PATH_MAX]; ::snprintf(program_init_file_name, sizeof(program_init_file_name), "%s-%s", init_file_path.c_str(), program_name); init_file.SetFile(program_init_file_name, true); if (!init_file.Exists()) init_file.Clear(); } } if (!init_file && !m_skip_lldbinit_files) init_file.SetFile(init_file_path, false); } // If the file exists, tell HandleCommand to 'source' it; this will do the // actual broadcasting // of the commands back to any appropriate listener (see // CommandObjectSource::Execute for more details). if (init_file.Exists()) { const bool saved_batch = SetBatchCommandMode(true); CommandInterpreterRunOptions options; options.SetSilent(true); options.SetStopOnError(false); options.SetStopOnContinue(true); HandleCommandsFromFile(init_file, nullptr, // Execution context options, result); SetBatchCommandMode(saved_batch); } else { // nothing to be done if the file doesn't exist result.SetStatus(eReturnStatusSuccessFinishNoResult); } } const char *CommandInterpreter::GetCommandPrefix() { const char *prefix = GetDebugger().GetIOHandlerCommandPrefix(); return prefix == NULL ? "" : prefix; } PlatformSP CommandInterpreter::GetPlatform(bool prefer_target_platform) { PlatformSP platform_sp; if (prefer_target_platform) { ExecutionContext exe_ctx(GetExecutionContext()); Target *target = exe_ctx.GetTargetPtr(); if (target) platform_sp = target->GetPlatform(); } if (!platform_sp) platform_sp = m_debugger.GetPlatformList().GetSelectedPlatform(); return platform_sp; } void CommandInterpreter::HandleCommands(const StringList &commands, ExecutionContext *override_context, CommandInterpreterRunOptions &options, CommandReturnObject &result) { size_t num_lines = commands.GetSize(); // If we are going to continue past a "continue" then we need to run the // commands synchronously. // Make sure you reset this value anywhere you return from the function. bool old_async_execution = m_debugger.GetAsyncExecution(); // If we've been given an execution context, set it at the start, but don't // keep resetting it or we will // cause series of commands that change the context, then do an operation that // relies on that context to fail. if (override_context != nullptr) UpdateExecutionContext(override_context); if (!options.GetStopOnContinue()) { m_debugger.SetAsyncExecution(false); } for (size_t idx = 0; idx < num_lines; idx++) { const char *cmd = commands.GetStringAtIndex(idx); if (cmd[0] == '\0') continue; if (options.GetEchoCommands()) { // TODO: Add Stream support. result.AppendMessageWithFormat("%s %s\n", m_debugger.GetPrompt().str().c_str(), cmd); } CommandReturnObject tmp_result; // If override_context is not NULL, pass no_context_switching = true for // HandleCommand() since we updated our context already. // We might call into a regex or alias command, in which case the // add_to_history will get lost. This // m_command_source_depth dingus is the way we turn off adding to the // history in that case, so set it up here. if (!options.GetAddToHistory()) m_command_source_depth++; bool success = HandleCommand(cmd, options.m_add_to_history, tmp_result, nullptr, /* override_context */ true, /* repeat_on_empty_command */ override_context != nullptr /* no_context_switching */); if (!options.GetAddToHistory()) m_command_source_depth--; if (options.GetPrintResults()) { if (tmp_result.Succeeded()) result.AppendMessage(tmp_result.GetOutputData()); } if (!success || !tmp_result.Succeeded()) { llvm::StringRef error_msg = tmp_result.GetErrorData(); if (error_msg.empty()) error_msg = ".\n"; if (options.GetStopOnError()) { result.AppendErrorWithFormat( "Aborting reading of commands after command #%" PRIu64 ": '%s' failed with %s", (uint64_t)idx, cmd, error_msg.str().c_str()); result.SetStatus(eReturnStatusFailed); m_debugger.SetAsyncExecution(old_async_execution); return; } else if (options.GetPrintResults()) { result.AppendMessageWithFormat( "Command #%" PRIu64 " '%s' failed with %s", (uint64_t)idx + 1, cmd, error_msg.str().c_str()); } } if (result.GetImmediateOutputStream()) result.GetImmediateOutputStream()->Flush(); if (result.GetImmediateErrorStream()) result.GetImmediateErrorStream()->Flush(); // N.B. Can't depend on DidChangeProcessState, because the state coming into // the command execution // could be running (for instance in Breakpoint Commands. // So we check the return value to see if it is has running in it. if ((tmp_result.GetStatus() == eReturnStatusSuccessContinuingNoResult) || (tmp_result.GetStatus() == eReturnStatusSuccessContinuingResult)) { if (options.GetStopOnContinue()) { // If we caused the target to proceed, and we're going to stop in that // case, set the // status in our real result before returning. This is an error if the // continue was not the // last command in the set of commands to be run. if (idx != num_lines - 1) result.AppendErrorWithFormat( "Aborting reading of commands after command #%" PRIu64 ": '%s' continued the target.\n", (uint64_t)idx + 1, cmd); else result.AppendMessageWithFormat("Command #%" PRIu64 " '%s' continued the target.\n", (uint64_t)idx + 1, cmd); result.SetStatus(tmp_result.GetStatus()); m_debugger.SetAsyncExecution(old_async_execution); return; } } // 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); result.SetStatus(tmp_result.GetStatus()); m_debugger.SetAsyncExecution(old_async_execution); return; } } } result.SetStatus(eReturnStatusSuccessFinishResult); m_debugger.SetAsyncExecution(old_async_execution); return; } // Make flags that we can pass into the IOHandler so our delegates can do the // right thing enum { eHandleCommandFlagStopOnContinue = (1u << 0), eHandleCommandFlagStopOnError = (1u << 1), eHandleCommandFlagEchoCommand = (1u << 2), eHandleCommandFlagPrintResult = (1u << 3), eHandleCommandFlagStopOnCrash = (1u << 4) }; void CommandInterpreter::HandleCommandsFromFile( FileSpec &cmd_file, ExecutionContext *context, CommandInterpreterRunOptions &options, CommandReturnObject &result) { if (cmd_file.Exists()) { StreamFileSP input_file_sp(new StreamFile()); std::string cmd_file_path = cmd_file.GetPath(); Error error = input_file_sp->GetFile().Open(cmd_file_path.c_str(), File::eOpenOptionRead); if (error.Success()) { Debugger &debugger = GetDebugger(); uint32_t flags = 0; if (options.m_stop_on_continue == eLazyBoolCalculate) { if (m_command_source_flags.empty()) { // Stop on continue by default flags |= eHandleCommandFlagStopOnContinue; } else if (m_command_source_flags.back() & eHandleCommandFlagStopOnContinue) { flags |= eHandleCommandFlagStopOnContinue; } } else if (options.m_stop_on_continue == eLazyBoolYes) { flags |= eHandleCommandFlagStopOnContinue; } if (options.m_stop_on_error == eLazyBoolCalculate) { if (m_command_source_flags.empty()) { if (GetStopCmdSourceOnError()) flags |= eHandleCommandFlagStopOnError; } else if (m_command_source_flags.back() & eHandleCommandFlagStopOnError) { flags |= eHandleCommandFlagStopOnError; } } else if (options.m_stop_on_error == eLazyBoolYes) { flags |= eHandleCommandFlagStopOnError; } if (options.GetStopOnCrash()) { if (m_command_source_flags.empty()) { // Echo command by default flags |= eHandleCommandFlagStopOnCrash; } else if (m_command_source_flags.back() & eHandleCommandFlagStopOnCrash) { flags |= eHandleCommandFlagStopOnCrash; } } if (options.m_echo_commands == eLazyBoolCalculate) { if (m_command_source_flags.empty()) { // Echo command by default flags |= eHandleCommandFlagEchoCommand; } else if (m_command_source_flags.back() & eHandleCommandFlagEchoCommand) { flags |= eHandleCommandFlagEchoCommand; } } else if (options.m_echo_commands == eLazyBoolYes) { flags |= eHandleCommandFlagEchoCommand; } if (options.m_print_results == eLazyBoolCalculate) { if (m_command_source_flags.empty()) { // Print output by default flags |= eHandleCommandFlagPrintResult; } else if (m_command_source_flags.back() & eHandleCommandFlagPrintResult) { flags |= eHandleCommandFlagPrintResult; } } else if (options.m_print_results == eLazyBoolYes) { flags |= eHandleCommandFlagPrintResult; } if (flags & eHandleCommandFlagPrintResult) { debugger.GetOutputFile()->Printf("Executing commands in '%s'.\n", cmd_file_path.c_str()); } // Used for inheriting the right settings when "command source" might have // nested "command source" commands lldb::StreamFileSP empty_stream_sp; m_command_source_flags.push_back(flags); IOHandlerSP io_handler_sp(new IOHandlerEditline( debugger, IOHandler::Type::CommandInterpreter, input_file_sp, empty_stream_sp, // Pass in an empty stream so we inherit the top // input reader output stream empty_stream_sp, // Pass in an empty stream so we inherit the top // input reader error stream flags, nullptr, // Pass in NULL for "editline_name" so no history is saved, // or written debugger.GetPrompt(), llvm::StringRef(), false, // Not multi-line debugger.GetUseColor(), 0, *this)); const bool old_async_execution = debugger.GetAsyncExecution(); // Set synchronous execution if we are not stopping on continue if ((flags & eHandleCommandFlagStopOnContinue) == 0) debugger.SetAsyncExecution(false); m_command_source_depth++; debugger.RunIOHandler(io_handler_sp); if (!m_command_source_flags.empty()) m_command_source_flags.pop_back(); m_command_source_depth--; result.SetStatus(eReturnStatusSuccessFinishNoResult); debugger.SetAsyncExecution(old_async_execution); } else { result.AppendErrorWithFormat( "error: an error occurred read file '%s': %s\n", cmd_file_path.c_str(), error.AsCString()); result.SetStatus(eReturnStatusFailed); } } else { result.AppendErrorWithFormat( "Error reading commands from file %s - file not found.\n", cmd_file.GetFilename().AsCString("")); result.SetStatus(eReturnStatusFailed); return; } } ScriptInterpreter *CommandInterpreter::GetScriptInterpreter(bool can_create) { std::lock_guard locker(m_script_interpreter_mutex); if (!m_script_interpreter_sp) { if (!can_create) return nullptr; lldb::ScriptLanguage script_lang = GetDebugger().GetScriptLanguage(); m_script_interpreter_sp = PluginManager::GetScriptInterpreterForLanguage(script_lang, *this); } return m_script_interpreter_sp.get(); } bool CommandInterpreter::GetSynchronous() { return m_synchronous_execution; } void CommandInterpreter::SetSynchronous(bool value) { m_synchronous_execution = value; } void CommandInterpreter::OutputFormattedHelpText(Stream &strm, llvm::StringRef prefix, llvm::StringRef help_text) { const uint32_t max_columns = m_debugger.GetTerminalWidth(); size_t line_width_max = max_columns - prefix.size(); if (line_width_max < 16) line_width_max = help_text.size() + prefix.size(); strm.IndentMore(prefix.size()); bool prefixed_yet = false; while (!help_text.empty()) { // Prefix the first line, indent subsequent lines to line up if (!prefixed_yet) { strm << prefix; prefixed_yet = true; } else strm.Indent(); // Never print more than the maximum on one line. llvm::StringRef this_line = help_text.substr(0, line_width_max); // Always break on an explicit newline. std::size_t first_newline = this_line.find_first_of("\n"); // Don't break on space/tab unless the text is too long to fit on one line. std::size_t last_space = llvm::StringRef::npos; if (this_line.size() != help_text.size()) last_space = this_line.find_last_of(" \t"); // Break at whichever condition triggered first. this_line = this_line.substr(0, std::min(first_newline, last_space)); strm.PutCString(this_line); strm.EOL(); // Remove whitespace / newlines after breaking. help_text = help_text.drop_front(this_line.size()).ltrim(); } strm.IndentLess(prefix.size()); } void CommandInterpreter::OutputFormattedHelpText(Stream &strm, llvm::StringRef word_text, llvm::StringRef separator, llvm::StringRef help_text, size_t max_word_len) { StreamString prefix_stream; prefix_stream.Printf(" %-*s %*s ", (int)max_word_len, word_text.data(), (int)separator.size(), separator.data()); OutputFormattedHelpText(strm, prefix_stream.GetString(), help_text); } void CommandInterpreter::OutputHelpText(Stream &strm, llvm::StringRef word_text, llvm::StringRef separator, llvm::StringRef help_text, uint32_t max_word_len) { int indent_size = max_word_len + separator.size() + 2; strm.IndentMore(indent_size); StreamString text_strm; text_strm.Printf("%-*s ", (int)max_word_len, word_text.data()); text_strm << separator << " " << help_text; const uint32_t max_columns = m_debugger.GetTerminalWidth(); llvm::StringRef text = text_strm.GetString(); uint32_t chars_left = max_columns; auto nextWordLength = [](llvm::StringRef S) { size_t pos = S.find_first_of(' '); return pos == llvm::StringRef::npos ? S.size() : pos; }; while (!text.empty()) { if (text.front() == '\n' || (text.front() == ' ' && nextWordLength(text.ltrim(' ')) < chars_left)) { strm.EOL(); strm.Indent(); chars_left = max_columns - indent_size; if (text.front() == '\n') text = text.drop_front(); else text = text.ltrim(' '); } else { strm.PutChar(text.front()); --chars_left; text = text.drop_front(); } } strm.EOL(); strm.IndentLess(indent_size); } void CommandInterpreter::FindCommandsForApropos( llvm::StringRef search_word, StringList &commands_found, StringList &commands_help, CommandObject::CommandMap &command_map) { CommandObject::CommandMap::const_iterator pos; for (pos = command_map.begin(); pos != command_map.end(); ++pos) { llvm::StringRef command_name = pos->first; CommandObject *cmd_obj = pos->second.get(); const bool search_short_help = true; const bool search_long_help = false; const bool search_syntax = false; const bool search_options = false; if (command_name.contains_lower(search_word) || cmd_obj->HelpTextContainsWord(search_word, search_short_help, search_long_help, search_syntax, search_options)) { commands_found.AppendString(cmd_obj->GetCommandName()); commands_help.AppendString(cmd_obj->GetHelp()); } if (cmd_obj->IsMultiwordObject()) { CommandObjectMultiword *cmd_multiword = cmd_obj->GetAsMultiwordCommand(); FindCommandsForApropos(search_word, commands_found, commands_help, cmd_multiword->GetSubcommandDictionary()); } } } void CommandInterpreter::FindCommandsForApropos(llvm::StringRef search_word, StringList &commands_found, StringList &commands_help, bool search_builtin_commands, bool search_user_commands, bool search_alias_commands) { CommandObject::CommandMap::const_iterator pos; if (search_builtin_commands) FindCommandsForApropos(search_word, commands_found, commands_help, m_command_dict); if (search_user_commands) FindCommandsForApropos(search_word, commands_found, commands_help, m_user_dict); if (search_alias_commands) FindCommandsForApropos(search_word, commands_found, commands_help, m_alias_dict); } void CommandInterpreter::UpdateExecutionContext( ExecutionContext *override_context) { if (override_context != nullptr) { m_exe_ctx_ref = *override_context; } else { const bool adopt_selected = true; m_exe_ctx_ref.SetTargetPtr(m_debugger.GetSelectedTarget().get(), adopt_selected); } } 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; Error error; 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; } void CommandInterpreter::IOHandlerInputComplete(IOHandler &io_handler, std::string &line) { const bool is_interactive = io_handler.GetIsInteractive(); if (is_interactive == false) { // When we are not interactive, don't execute blank lines. This will happen // sourcing a commands file. We don't want blank lines to repeat the // previous // command and cause any errors to occur (like redefining an alias, get an // error // and stop parsing the commands file). if (line.empty()) return; // When using a non-interactive file handle (like when sourcing commands // from a file) // we need to echo the command out so we don't just see the command output // and no // command... if (io_handler.GetFlags().Test(eHandleCommandFlagEchoCommand)) io_handler.GetOutputStreamFile()->Printf("%s%s\n", io_handler.GetPrompt(), line.c_str()); } lldb_private::CommandReturnObject result; HandleCommand(line.c_str(), eLazyBoolCalculate, result); // Now emit the command output text from the command we just executed if (io_handler.GetFlags().Test(eHandleCommandFlagPrintResult)) { // Display any STDOUT/STDERR _prior_ to emitting the command result text GetProcessOutput(); if (!result.GetImmediateOutputStream()) { llvm::StringRef output = result.GetOutputData(); if (!output.empty()) io_handler.GetOutputStreamFile()->PutCString(output); } // Now emit the command error text from the command we just executed if (!result.GetImmediateErrorStream()) { llvm::StringRef error = result.GetErrorData(); if (!error.empty()) io_handler.GetErrorStreamFile()->PutCString(error); } } switch (result.GetStatus()) { case eReturnStatusInvalid: case eReturnStatusSuccessFinishNoResult: case eReturnStatusSuccessFinishResult: case eReturnStatusStarted: break; case eReturnStatusSuccessContinuingNoResult: case eReturnStatusSuccessContinuingResult: if (io_handler.GetFlags().Test(eHandleCommandFlagStopOnContinue)) io_handler.SetIsDone(true); break; case eReturnStatusFailed: m_num_errors++; if (io_handler.GetFlags().Test(eHandleCommandFlagStopOnError)) io_handler.SetIsDone(true); break; case eReturnStatusQuit: m_quit_requested = true; io_handler.SetIsDone(true); break; } // 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; } } } bool CommandInterpreter::IOHandlerInterrupt(IOHandler &io_handler) { ExecutionContext exe_ctx(GetExecutionContext()); Process *process = exe_ctx.GetProcessPtr(); if (process) { StateType state = process->GetState(); if (StateIsRunningState(state)) { process->Halt(); return true; // Don't do any updating when we are running } } ScriptInterpreter *script_interpreter = GetScriptInterpreter(false); if (script_interpreter) { if (script_interpreter->Interrupt()) return true; } return false; } void CommandInterpreter::GetLLDBCommandsFromIOHandler( const char *prompt, IOHandlerDelegate &delegate, bool asynchronously, void *baton) { Debugger &debugger = GetDebugger(); IOHandlerSP io_handler_sp( new IOHandlerEditline(debugger, IOHandler::Type::CommandList, "lldb", // Name of input reader for history llvm::StringRef::withNullAsEmpty(prompt), // Prompt llvm::StringRef(), // Continuation prompt true, // Get multiple lines debugger.GetUseColor(), 0, // Don't show line numbers delegate)); // IOHandlerDelegate if (io_handler_sp) { io_handler_sp->SetUserData(baton); if (asynchronously) debugger.PushIOHandler(io_handler_sp); else debugger.RunIOHandler(io_handler_sp); } } void CommandInterpreter::GetPythonCommandsFromIOHandler( const char *prompt, IOHandlerDelegate &delegate, bool asynchronously, void *baton) { Debugger &debugger = GetDebugger(); IOHandlerSP io_handler_sp( new IOHandlerEditline(debugger, IOHandler::Type::PythonCode, "lldb-python", // Name of input reader for history llvm::StringRef::withNullAsEmpty(prompt), // Prompt llvm::StringRef(), // Continuation prompt true, // Get multiple lines debugger.GetUseColor(), 0, // Don't show line numbers delegate)); // IOHandlerDelegate if (io_handler_sp) { io_handler_sp->SetUserData(baton); if (asynchronously) debugger.PushIOHandler(io_handler_sp); else debugger.RunIOHandler(io_handler_sp); } } bool CommandInterpreter::IsActive() { return m_debugger.IsTopIOHandler(m_command_io_handler_sp); } lldb::IOHandlerSP CommandInterpreter::GetIOHandler(bool force_create, CommandInterpreterRunOptions *options) { // Always re-create the IOHandlerEditline in case the input // changed. The old instance might have had a non-interactive // input and now it does or vice versa. if (force_create || !m_command_io_handler_sp) { // Always re-create the IOHandlerEditline in case the input // changed. The old instance might have had a non-interactive // input and now it does or vice versa. uint32_t flags = 0; if (options) { if (options->m_stop_on_continue == eLazyBoolYes) flags |= eHandleCommandFlagStopOnContinue; if (options->m_stop_on_error == eLazyBoolYes) flags |= eHandleCommandFlagStopOnError; if (options->m_stop_on_crash == eLazyBoolYes) flags |= eHandleCommandFlagStopOnCrash; if (options->m_echo_commands != eLazyBoolNo) flags |= eHandleCommandFlagEchoCommand; if (options->m_print_results != eLazyBoolNo) flags |= eHandleCommandFlagPrintResult; } else { flags = eHandleCommandFlagEchoCommand | eHandleCommandFlagPrintResult; } m_command_io_handler_sp.reset(new IOHandlerEditline( m_debugger, IOHandler::Type::CommandInterpreter, m_debugger.GetInputFile(), m_debugger.GetOutputFile(), m_debugger.GetErrorFile(), flags, "lldb", m_debugger.GetPrompt(), llvm::StringRef(), // Continuation prompt false, // Don't enable multiple line input, just single line commands m_debugger.GetUseColor(), 0, // Don't show line numbers *this)); } return m_command_io_handler_sp; } void CommandInterpreter::RunCommandInterpreter( bool auto_handle_events, bool spawn_thread, CommandInterpreterRunOptions &options) { // Always re-create the command interpreter when we run it in case // any file handles have changed. bool force_create = true; m_debugger.PushIOHandler(GetIOHandler(force_create, &options)); m_stopped_for_crash = false; if (auto_handle_events) m_debugger.StartEventHandlerThread(); if (spawn_thread) { m_debugger.StartIOHandlerThread(); } else { m_debugger.ExecuteIOHandlers(); if (auto_handle_events) m_debugger.StopEventHandlerThread(); } } CommandObject * CommandInterpreter::ResolveCommandImpl(std::string &command_line, CommandReturnObject &result) { std::string scratch_command(command_line); // working copy so we don't modify // command_line unless we succeed CommandObject *cmd_obj = nullptr; StreamString revised_command_line; bool wants_raw_input = false; size_t actual_cmd_name_len = 0; std::string next_word; StringList matches; bool done = false; while (!done) { char quote_char = '\0'; std::string suffix; ExtractCommand(scratch_command, next_word, suffix, quote_char); if (cmd_obj == nullptr) { std::string full_name; bool is_alias = GetAliasFullName(next_word, full_name); cmd_obj = GetCommandObject(next_word, &matches); bool is_real_command = (is_alias == false) || (cmd_obj != nullptr && cmd_obj->IsAlias() == false); if (!is_real_command) { matches.Clear(); std::string alias_result; cmd_obj = BuildAliasResult(full_name, scratch_command, alias_result, result); revised_command_line.Printf("%s", alias_result.c_str()); if (cmd_obj) { wants_raw_input = cmd_obj->WantsRawCommandString(); actual_cmd_name_len = cmd_obj->GetCommandName().size(); } } else { if (!cmd_obj) cmd_obj = GetCommandObject(next_word, &matches); if (cmd_obj) { llvm::StringRef cmd_name = cmd_obj->GetCommandName(); actual_cmd_name_len += cmd_name.size(); revised_command_line.Printf("%s", cmd_name.str().c_str()); wants_raw_input = cmd_obj->WantsRawCommandString(); } else { revised_command_line.Printf("%s", next_word.c_str()); } } } else { if (cmd_obj->IsMultiwordObject()) { CommandObject *sub_cmd_obj = cmd_obj->GetSubcommandObject(next_word.c_str()); if (sub_cmd_obj) { // The subcommand's name includes the parent command's name, // so restart rather than append to the revised_command_line. llvm::StringRef sub_cmd_name = sub_cmd_obj->GetCommandName(); actual_cmd_name_len = sub_cmd_name.size() + 1; revised_command_line.Clear(); revised_command_line.Printf("%s", sub_cmd_name.str().c_str()); cmd_obj = sub_cmd_obj; wants_raw_input = cmd_obj->WantsRawCommandString(); } else { if (quote_char) revised_command_line.Printf(" %c%s%s%c", quote_char, next_word.c_str(), suffix.c_str(), quote_char); else revised_command_line.Printf(" %s%s", next_word.c_str(), suffix.c_str()); done = true; } } else { if (quote_char) revised_command_line.Printf(" %c%s%s%c", quote_char, next_word.c_str(), suffix.c_str(), quote_char); else revised_command_line.Printf(" %s%s", next_word.c_str(), suffix.c_str()); done = true; } } if (cmd_obj == nullptr) { const size_t num_matches = matches.GetSize(); if (matches.GetSize() > 1) { StreamString error_msg; error_msg.Printf("Ambiguous command '%s'. Possible matches:\n", next_word.c_str()); for (uint32_t i = 0; i < num_matches; ++i) { error_msg.Printf("\t%s\n", matches.GetStringAtIndex(i)); } result.AppendRawError(error_msg.GetString()); } else { // We didn't have only one match, otherwise we wouldn't get here. assert(num_matches == 0); result.AppendErrorWithFormat("'%s' is not a valid command.\n", next_word.c_str()); } result.SetStatus(eReturnStatusFailed); return nullptr; } if (cmd_obj->IsMultiwordObject()) { if (!suffix.empty()) { result.AppendErrorWithFormat( "command '%s' did not recognize '%s%s%s' as valid (subcommand " "might be invalid).\n", cmd_obj->GetCommandName().str().c_str(), next_word.empty() ? "" : next_word.c_str(), next_word.empty() ? " -- " : " ", suffix.c_str()); result.SetStatus(eReturnStatusFailed); return nullptr; } } else { // If we found a normal command, we are done done = true; if (!suffix.empty()) { switch (suffix[0]) { case '/': // GDB format suffixes { Options *command_options = cmd_obj->GetOptions(); if (command_options && command_options->SupportsLongOption("gdb-format")) { std::string gdb_format_option("--gdb-format="); gdb_format_option += (suffix.c_str() + 1); std::string cmd = revised_command_line.GetString(); size_t arg_terminator_idx = FindArgumentTerminator(cmd); if (arg_terminator_idx != std::string::npos) { // Insert the gdb format option before the "--" that terminates // options gdb_format_option.append(1, ' '); cmd.insert(arg_terminator_idx, gdb_format_option); revised_command_line.Clear(); revised_command_line.PutCString(cmd); } else revised_command_line.Printf(" %s", gdb_format_option.c_str()); if (wants_raw_input && FindArgumentTerminator(cmd) == std::string::npos) revised_command_line.PutCString(" --"); } else { result.AppendErrorWithFormat( "the '%s' command doesn't support the --gdb-format option\n", cmd_obj->GetCommandName().str().c_str()); result.SetStatus(eReturnStatusFailed); return nullptr; } } break; default: result.AppendErrorWithFormat( "unknown command shorthand suffix: '%s'\n", suffix.c_str()); result.SetStatus(eReturnStatusFailed); return nullptr; } } } if (scratch_command.empty()) done = true; } if (!scratch_command.empty()) revised_command_line.Printf(" %s", scratch_command.c_str()); if (cmd_obj != NULL) command_line = revised_command_line.GetString(); return cmd_obj; } Index: vendor/lldb/dist/source/Interpreter/OptionValueEnumeration.cpp =================================================================== --- vendor/lldb/dist/source/Interpreter/OptionValueEnumeration.cpp (revision 317691) +++ vendor/lldb/dist/source/Interpreter/OptionValueEnumeration.cpp (revision 317692) @@ -1,132 +1,131 @@ //===-- OptionValueEnumeration.cpp ------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #include "lldb/Interpreter/OptionValueEnumeration.h" // C Includes // C++ Includes // Other libraries and framework includes // Project includes #include "lldb/Utility/StringList.h" using namespace lldb; using namespace lldb_private; OptionValueEnumeration::OptionValueEnumeration( const OptionEnumValueElement *enumerators, enum_type value) : OptionValue(), m_current_value(value), m_default_value(value), m_enumerations() { SetEnumerations(enumerators); } OptionValueEnumeration::~OptionValueEnumeration() {} void OptionValueEnumeration::DumpValue(const ExecutionContext *exe_ctx, Stream &strm, uint32_t dump_mask) { if (dump_mask & eDumpOptionType) strm.Printf("(%s)", GetTypeAsCString()); if (dump_mask & eDumpOptionValue) { if (dump_mask & eDumpOptionType) strm.PutCString(" = "); const size_t count = m_enumerations.GetSize(); for (size_t i = 0; i < count; ++i) { if (m_enumerations.GetValueAtIndexUnchecked(i).value == m_current_value) { - strm.PutCString(m_enumerations.GetCStringAtIndex(i)); + strm.PutCString(m_enumerations.GetCStringAtIndex(i).GetStringRef()); return; } } strm.Printf("%" PRIu64, (uint64_t)m_current_value); } } Error OptionValueEnumeration::SetValueFromString(llvm::StringRef value, VarSetOperationType op) { Error error; switch (op) { case eVarSetOperationClear: Clear(); NotifyValueChanged(); break; case eVarSetOperationReplace: case eVarSetOperationAssign: { ConstString const_enumerator_name(value.trim()); const EnumerationMapEntry *enumerator_entry = - m_enumerations.FindFirstValueForName( - const_enumerator_name.GetStringRef()); + m_enumerations.FindFirstValueForName(const_enumerator_name); if (enumerator_entry) { m_current_value = enumerator_entry->value.value; NotifyValueChanged(); } else { StreamString error_strm; error_strm.Printf("invalid enumeration value '%s'", value.str().c_str()); const size_t count = m_enumerations.GetSize(); if (count) { error_strm.Printf(", valid values are: %s", - m_enumerations.GetCStringAtIndex(0).str().c_str()); + m_enumerations.GetCStringAtIndex(0).GetCString()); for (size_t i = 1; i < count; ++i) { error_strm.Printf(", %s", - m_enumerations.GetCStringAtIndex(i).str().c_str()); + m_enumerations.GetCStringAtIndex(i).GetCString()); } } error.SetErrorString(error_strm.GetString()); } break; } case eVarSetOperationInsertBefore: case eVarSetOperationInsertAfter: case eVarSetOperationRemove: case eVarSetOperationAppend: case eVarSetOperationInvalid: error = OptionValue::SetValueFromString(value, op); break; } return error; } void OptionValueEnumeration::SetEnumerations( const OptionEnumValueElement *enumerators) { m_enumerations.Clear(); if (enumerators) { for (size_t i = 0; enumerators[i].string_value != nullptr; ++i) { ConstString const_enumerator_name(enumerators[i].string_value); EnumeratorInfo enumerator_info = {enumerators[i].value, enumerators[i].usage}; - m_enumerations.Append(const_enumerator_name.GetStringRef(), + m_enumerations.Append(const_enumerator_name, enumerator_info); } m_enumerations.Sort(); } } lldb::OptionValueSP OptionValueEnumeration::DeepCopy() const { return OptionValueSP(new OptionValueEnumeration(*this)); } size_t OptionValueEnumeration::AutoComplete( CommandInterpreter &interpreter, llvm::StringRef s, int match_start_point, int max_return_elements, bool &word_complete, StringList &matches) { word_complete = false; matches.Clear(); const uint32_t num_enumerators = m_enumerations.GetSize(); if (!s.empty()) { for (size_t i = 0; i < num_enumerators; ++i) { - llvm::StringRef name = m_enumerations.GetCStringAtIndex(i); + llvm::StringRef name = m_enumerations.GetCStringAtIndex(i).GetStringRef(); if (name.startswith(s)) matches.AppendString(name); } } else { // only suggest "true" or "false" by default for (size_t i = 0; i < num_enumerators; ++i) - matches.AppendString(m_enumerations.GetCStringAtIndex(i)); + matches.AppendString(m_enumerations.GetCStringAtIndex(i).GetStringRef()); } return matches.GetSize(); } Index: vendor/lldb/dist/source/Interpreter/OptionValueProperties.cpp =================================================================== --- vendor/lldb/dist/source/Interpreter/OptionValueProperties.cpp (revision 317691) +++ vendor/lldb/dist/source/Interpreter/OptionValueProperties.cpp (revision 317692) @@ -1,676 +1,676 @@ //===-- OptionValueProperties.cpp --------------------------------*- C++-*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #include "lldb/Interpreter/OptionValueProperties.h" // C Includes // C++ Includes // Other libraries and framework includes // Project includes #include "lldb/Utility/Flags.h" #include "lldb/Core/UserSettingsController.h" #include "lldb/Interpreter/Args.h" #include "lldb/Interpreter/OptionValues.h" #include "lldb/Interpreter/Property.h" #include "lldb/Utility/Stream.h" #include "lldb/Utility/StringList.h" using namespace lldb; using namespace lldb_private; OptionValueProperties::OptionValueProperties(const ConstString &name) : OptionValue(), m_name(name), m_properties(), m_name_to_index() {} OptionValueProperties::OptionValueProperties( const OptionValueProperties &global_properties) : OptionValue(global_properties), std::enable_shared_from_this(), m_name(global_properties.m_name), m_properties(global_properties.m_properties), m_name_to_index(global_properties.m_name_to_index) { // We now have an exact copy of "global_properties". We need to now // find all non-global settings and copy the property values so that // all non-global settings get new OptionValue instances created for // them. const size_t num_properties = m_properties.size(); for (size_t i = 0; i < num_properties; ++i) { // Duplicate any values that are not global when constructing properties // from // a global copy if (m_properties[i].IsGlobal() == false) { lldb::OptionValueSP new_value_sp(m_properties[i].GetValue()->DeepCopy()); m_properties[i].SetOptionValue(new_value_sp); } } } size_t OptionValueProperties::GetNumProperties() const { return m_properties.size(); } void OptionValueProperties::Initialize(const PropertyDefinition *defs) { for (size_t i = 0; defs[i].name; ++i) { Property property(defs[i]); assert(property.IsValid()); - m_name_to_index.Append(property.GetName(), m_properties.size()); + m_name_to_index.Append(ConstString(property.GetName()), m_properties.size()); property.GetValue()->SetParent(shared_from_this()); m_properties.push_back(property); } m_name_to_index.Sort(); } void OptionValueProperties::SetValueChangedCallback( uint32_t property_idx, OptionValueChangedCallback callback, void *baton) { Property *property = ProtectedGetPropertyAtIndex(property_idx); if (property) property->SetValueChangedCallback(callback, baton); } void OptionValueProperties::AppendProperty(const ConstString &name, const ConstString &desc, bool is_global, const OptionValueSP &value_sp) { Property property(name, desc, is_global, value_sp); - m_name_to_index.Append(name.GetStringRef(), m_properties.size()); + m_name_to_index.Append(name, m_properties.size()); m_properties.push_back(property); value_sp->SetParent(shared_from_this()); m_name_to_index.Sort(); } // bool // OptionValueProperties::GetQualifiedName (Stream &strm) //{ // bool dumped_something = false; //// lldb::OptionValuePropertiesSP parent_sp(GetParent ()); //// if (parent_sp) //// { //// parent_sp->GetQualifiedName (strm); //// strm.PutChar('.'); //// dumped_something = true; //// } // if (m_name) // { // strm << m_name; // dumped_something = true; // } // return dumped_something; //} // lldb::OptionValueSP OptionValueProperties::GetValueForKey(const ExecutionContext *exe_ctx, const ConstString &key, bool will_modify) const { lldb::OptionValueSP value_sp; - size_t idx = m_name_to_index.Find(key.GetStringRef(), SIZE_MAX); + size_t idx = m_name_to_index.Find(key, SIZE_MAX); if (idx < m_properties.size()) value_sp = GetPropertyAtIndex(exe_ctx, will_modify, idx)->GetValue(); return value_sp; } lldb::OptionValueSP OptionValueProperties::GetSubValue(const ExecutionContext *exe_ctx, llvm::StringRef name, bool will_modify, Error &error) const { lldb::OptionValueSP value_sp; if (name.empty()) return OptionValueSP(); llvm::StringRef sub_name; ConstString key; size_t key_len = name.find_first_of(".[{"); if (key_len != llvm::StringRef::npos) { key.SetString(name.take_front(key_len)); sub_name = name.drop_front(key_len); } else key.SetString(name); value_sp = GetValueForKey(exe_ctx, key, will_modify); if (sub_name.empty() || !value_sp) return value_sp; switch (sub_name[0]) { case '.': { lldb::OptionValueSP return_val_sp; return_val_sp = value_sp->GetSubValue(exe_ctx, sub_name.drop_front(), will_modify, error); if (!return_val_sp) { if (Properties::IsSettingExperimental(sub_name.drop_front())) { size_t experimental_len = strlen(Properties::GetExperimentalSettingsName()); if (sub_name[experimental_len + 1] == '.') return_val_sp = value_sp->GetSubValue( exe_ctx, sub_name.drop_front(experimental_len + 2), will_modify, error); // It isn't an error if an experimental setting is not present. if (!return_val_sp) error.Clear(); } } return return_val_sp; } case '{': // Predicate matching for predicates like // "{}" // strings are parsed by the current OptionValueProperties subclass // to mean whatever they want to. For instance a subclass of // OptionValueProperties for a lldb_private::Target might implement: // "target.run-args{arch==i386}" -- only set run args if the arch is // i386 // "target.run-args{path=/tmp/a/b/c/a.out}" -- only set run args if the // path matches // "target.run-args{basename==test&&arch==x86_64}" -- only set run args // if executable basename is "test" and arch is "x86_64" if (sub_name[1]) { llvm::StringRef predicate_start = sub_name.drop_front(); size_t pos = predicate_start.find_first_of('}'); if (pos != llvm::StringRef::npos) { auto predicate = predicate_start.take_front(pos); auto rest = predicate_start.drop_front(pos); if (PredicateMatches(exe_ctx, predicate)) { if (!rest.empty()) { // Still more subvalue string to evaluate return value_sp->GetSubValue(exe_ctx, rest, will_modify, error); } else { // We have a match! break; } } } } // Predicate didn't match or wasn't correctly formed value_sp.reset(); break; case '[': // Array or dictionary access for subvalues like: // "[12]" -- access 12th array element // "['hello']" -- dictionary access of key named hello return value_sp->GetSubValue(exe_ctx, sub_name, will_modify, error); default: value_sp.reset(); break; } return value_sp; } Error OptionValueProperties::SetSubValue(const ExecutionContext *exe_ctx, VarSetOperationType op, llvm::StringRef name, llvm::StringRef value) { Error error; const bool will_modify = true; lldb::OptionValueSP value_sp(GetSubValue(exe_ctx, name, will_modify, error)); if (value_sp) error = value_sp->SetValueFromString(value, op); else { if (error.AsCString() == nullptr) error.SetErrorStringWithFormat("invalid value path '%s'", name.str().c_str()); } return error; } uint32_t OptionValueProperties::GetPropertyIndex(const ConstString &name) const { - return m_name_to_index.Find(name.GetStringRef(), SIZE_MAX); + return m_name_to_index.Find(name, SIZE_MAX); } const Property * OptionValueProperties::GetProperty(const ExecutionContext *exe_ctx, bool will_modify, const ConstString &name) const { return GetPropertyAtIndex( exe_ctx, will_modify, - m_name_to_index.Find(name.GetStringRef(), SIZE_MAX)); + m_name_to_index.Find(name, SIZE_MAX)); } const Property *OptionValueProperties::GetPropertyAtIndex( const ExecutionContext *exe_ctx, bool will_modify, uint32_t idx) const { return ProtectedGetPropertyAtIndex(idx); } lldb::OptionValueSP OptionValueProperties::GetPropertyValueAtIndex( const ExecutionContext *exe_ctx, bool will_modify, uint32_t idx) const { const Property *setting = GetPropertyAtIndex(exe_ctx, will_modify, idx); if (setting) return setting->GetValue(); return OptionValueSP(); } OptionValuePathMappings * OptionValueProperties::GetPropertyAtIndexAsOptionValuePathMappings( const ExecutionContext *exe_ctx, bool will_modify, uint32_t idx) const { OptionValueSP value_sp(GetPropertyValueAtIndex(exe_ctx, will_modify, idx)); if (value_sp) return value_sp->GetAsPathMappings(); return nullptr; } OptionValueFileSpecList * OptionValueProperties::GetPropertyAtIndexAsOptionValueFileSpecList( const ExecutionContext *exe_ctx, bool will_modify, uint32_t idx) const { OptionValueSP value_sp(GetPropertyValueAtIndex(exe_ctx, will_modify, idx)); if (value_sp) return value_sp->GetAsFileSpecList(); return nullptr; } OptionValueArch *OptionValueProperties::GetPropertyAtIndexAsOptionValueArch( const ExecutionContext *exe_ctx, uint32_t idx) const { const Property *property = GetPropertyAtIndex(exe_ctx, false, idx); if (property) return property->GetValue()->GetAsArch(); return nullptr; } OptionValueLanguage * OptionValueProperties::GetPropertyAtIndexAsOptionValueLanguage( const ExecutionContext *exe_ctx, uint32_t idx) const { const Property *property = GetPropertyAtIndex(exe_ctx, false, idx); if (property) return property->GetValue()->GetAsLanguage(); return nullptr; } bool OptionValueProperties::GetPropertyAtIndexAsArgs( const ExecutionContext *exe_ctx, uint32_t idx, Args &args) const { const Property *property = GetPropertyAtIndex(exe_ctx, false, idx); if (property) { OptionValue *value = property->GetValue().get(); if (value) { const OptionValueArray *array = value->GetAsArray(); if (array) return array->GetArgs(args); else { const OptionValueDictionary *dict = value->GetAsDictionary(); if (dict) return dict->GetArgs(args); } } } return false; } bool OptionValueProperties::SetPropertyAtIndexFromArgs( const ExecutionContext *exe_ctx, uint32_t idx, const Args &args) { const Property *property = GetPropertyAtIndex(exe_ctx, true, idx); if (property) { OptionValue *value = property->GetValue().get(); if (value) { OptionValueArray *array = value->GetAsArray(); if (array) return array->SetArgs(args, eVarSetOperationAssign).Success(); else { OptionValueDictionary *dict = value->GetAsDictionary(); if (dict) return dict->SetArgs(args, eVarSetOperationAssign).Success(); } } } return false; } bool OptionValueProperties::GetPropertyAtIndexAsBoolean( const ExecutionContext *exe_ctx, uint32_t idx, bool fail_value) const { const Property *property = GetPropertyAtIndex(exe_ctx, false, idx); if (property) { OptionValue *value = property->GetValue().get(); if (value) return value->GetBooleanValue(fail_value); } return fail_value; } bool OptionValueProperties::SetPropertyAtIndexAsBoolean( const ExecutionContext *exe_ctx, uint32_t idx, bool new_value) { const Property *property = GetPropertyAtIndex(exe_ctx, true, idx); if (property) { OptionValue *value = property->GetValue().get(); if (value) { value->SetBooleanValue(new_value); return true; } } return false; } OptionValueDictionary * OptionValueProperties::GetPropertyAtIndexAsOptionValueDictionary( const ExecutionContext *exe_ctx, uint32_t idx) const { const Property *property = GetPropertyAtIndex(exe_ctx, false, idx); if (property) return property->GetValue()->GetAsDictionary(); return nullptr; } int64_t OptionValueProperties::GetPropertyAtIndexAsEnumeration( const ExecutionContext *exe_ctx, uint32_t idx, int64_t fail_value) const { const Property *property = GetPropertyAtIndex(exe_ctx, false, idx); if (property) { OptionValue *value = property->GetValue().get(); if (value) return value->GetEnumerationValue(fail_value); } return fail_value; } bool OptionValueProperties::SetPropertyAtIndexAsEnumeration( const ExecutionContext *exe_ctx, uint32_t idx, int64_t new_value) { const Property *property = GetPropertyAtIndex(exe_ctx, true, idx); if (property) { OptionValue *value = property->GetValue().get(); if (value) return value->SetEnumerationValue(new_value); } return false; } const FormatEntity::Entry * OptionValueProperties::GetPropertyAtIndexAsFormatEntity( const ExecutionContext *exe_ctx, uint32_t idx) { const Property *property = GetPropertyAtIndex(exe_ctx, true, idx); if (property) { OptionValue *value = property->GetValue().get(); if (value) return value->GetFormatEntity(); } return nullptr; } OptionValueFileSpec * OptionValueProperties::GetPropertyAtIndexAsOptionValueFileSpec( const ExecutionContext *exe_ctx, bool will_modify, uint32_t idx) const { const Property *property = GetPropertyAtIndex(exe_ctx, false, idx); if (property) { OptionValue *value = property->GetValue().get(); if (value) return value->GetAsFileSpec(); } return nullptr; } FileSpec OptionValueProperties::GetPropertyAtIndexAsFileSpec( const ExecutionContext *exe_ctx, uint32_t idx) const { const Property *property = GetPropertyAtIndex(exe_ctx, false, idx); if (property) { OptionValue *value = property->GetValue().get(); if (value) return value->GetFileSpecValue(); } return FileSpec(); } bool OptionValueProperties::SetPropertyAtIndexAsFileSpec( const ExecutionContext *exe_ctx, uint32_t idx, const FileSpec &new_file_spec) { const Property *property = GetPropertyAtIndex(exe_ctx, true, idx); if (property) { OptionValue *value = property->GetValue().get(); if (value) return value->SetFileSpecValue(new_file_spec); } return false; } const RegularExpression * OptionValueProperties::GetPropertyAtIndexAsOptionValueRegex( const ExecutionContext *exe_ctx, uint32_t idx) const { const Property *property = GetPropertyAtIndex(exe_ctx, false, idx); if (property) { OptionValue *value = property->GetValue().get(); if (value) return value->GetRegexValue(); } return nullptr; } OptionValueSInt64 *OptionValueProperties::GetPropertyAtIndexAsOptionValueSInt64( const ExecutionContext *exe_ctx, uint32_t idx) const { const Property *property = GetPropertyAtIndex(exe_ctx, false, idx); if (property) { OptionValue *value = property->GetValue().get(); if (value) return value->GetAsSInt64(); } return nullptr; } int64_t OptionValueProperties::GetPropertyAtIndexAsSInt64( const ExecutionContext *exe_ctx, uint32_t idx, int64_t fail_value) const { const Property *property = GetPropertyAtIndex(exe_ctx, false, idx); if (property) { OptionValue *value = property->GetValue().get(); if (value) return value->GetSInt64Value(fail_value); } return fail_value; } bool OptionValueProperties::SetPropertyAtIndexAsSInt64( const ExecutionContext *exe_ctx, uint32_t idx, int64_t new_value) { const Property *property = GetPropertyAtIndex(exe_ctx, true, idx); if (property) { OptionValue *value = property->GetValue().get(); if (value) return value->SetSInt64Value(new_value); } return false; } llvm::StringRef OptionValueProperties::GetPropertyAtIndexAsString( const ExecutionContext *exe_ctx, uint32_t idx, llvm::StringRef fail_value) const { const Property *property = GetPropertyAtIndex(exe_ctx, false, idx); if (property) { OptionValue *value = property->GetValue().get(); if (value) return value->GetStringValue(fail_value); } return fail_value; } bool OptionValueProperties::SetPropertyAtIndexAsString( const ExecutionContext *exe_ctx, uint32_t idx, llvm::StringRef new_value) { const Property *property = GetPropertyAtIndex(exe_ctx, true, idx); if (property) { OptionValue *value = property->GetValue().get(); if (value) return value->SetStringValue(new_value); } return false; } OptionValueString *OptionValueProperties::GetPropertyAtIndexAsOptionValueString( const ExecutionContext *exe_ctx, bool will_modify, uint32_t idx) const { OptionValueSP value_sp(GetPropertyValueAtIndex(exe_ctx, will_modify, idx)); if (value_sp) return value_sp->GetAsString(); return nullptr; } uint64_t OptionValueProperties::GetPropertyAtIndexAsUInt64( const ExecutionContext *exe_ctx, uint32_t idx, uint64_t fail_value) const { const Property *property = GetPropertyAtIndex(exe_ctx, false, idx); if (property) { OptionValue *value = property->GetValue().get(); if (value) return value->GetUInt64Value(fail_value); } return fail_value; } bool OptionValueProperties::SetPropertyAtIndexAsUInt64( const ExecutionContext *exe_ctx, uint32_t idx, uint64_t new_value) { const Property *property = GetPropertyAtIndex(exe_ctx, true, idx); if (property) { OptionValue *value = property->GetValue().get(); if (value) return value->SetUInt64Value(new_value); } return false; } bool OptionValueProperties::Clear() { const size_t num_properties = m_properties.size(); for (size_t i = 0; i < num_properties; ++i) m_properties[i].GetValue()->Clear(); return true; } Error OptionValueProperties::SetValueFromString(llvm::StringRef value, VarSetOperationType op) { Error error; // Args args(value_cstr); // const size_t argc = args.GetArgumentCount(); switch (op) { case eVarSetOperationClear: Clear(); break; case eVarSetOperationReplace: case eVarSetOperationAssign: case eVarSetOperationRemove: case eVarSetOperationInsertBefore: case eVarSetOperationInsertAfter: case eVarSetOperationAppend: case eVarSetOperationInvalid: error = OptionValue::SetValueFromString(value, op); break; } return error; } void OptionValueProperties::DumpValue(const ExecutionContext *exe_ctx, Stream &strm, uint32_t dump_mask) { const size_t num_properties = m_properties.size(); for (size_t i = 0; i < num_properties; ++i) { const Property *property = GetPropertyAtIndex(exe_ctx, false, i); if (property) { OptionValue *option_value = property->GetValue().get(); assert(option_value); const bool transparent_value = option_value->ValueIsTransparent(); property->Dump(exe_ctx, strm, dump_mask); if (!transparent_value) strm.EOL(); } } } Error OptionValueProperties::DumpPropertyValue(const ExecutionContext *exe_ctx, Stream &strm, llvm::StringRef property_path, uint32_t dump_mask) { Error error; const bool will_modify = false; lldb::OptionValueSP value_sp( GetSubValue(exe_ctx, property_path, will_modify, error)); if (value_sp) { if (!value_sp->ValueIsTransparent()) { if (dump_mask & eDumpOptionName) strm.PutCString(property_path); if (dump_mask & ~eDumpOptionName) strm.PutChar(' '); } value_sp->DumpValue(exe_ctx, strm, dump_mask); } return error; } lldb::OptionValueSP OptionValueProperties::DeepCopy() const { llvm_unreachable("this shouldn't happen"); } const Property *OptionValueProperties::GetPropertyAtPath( const ExecutionContext *exe_ctx, bool will_modify, llvm::StringRef name) const { const Property *property = nullptr; if (name.empty()) return nullptr; llvm::StringRef sub_name; ConstString key; size_t key_len = name.find_first_of(".[{"); if (key_len != llvm::StringRef::npos) { key.SetString(name.take_front(key_len)); sub_name = name.drop_front(key_len); } else key.SetString(name); property = GetProperty(exe_ctx, will_modify, key); if (sub_name.empty() || !property) return property; if (sub_name[0] == '.') { OptionValueProperties *sub_properties = property->GetValue()->GetAsProperties(); if (sub_properties) return sub_properties->GetPropertyAtPath(exe_ctx, will_modify, sub_name.drop_front()); } return nullptr; } void OptionValueProperties::DumpAllDescriptions(CommandInterpreter &interpreter, Stream &strm) const { size_t max_name_len = 0; const size_t num_properties = m_properties.size(); for (size_t i = 0; i < num_properties; ++i) { const Property *property = ProtectedGetPropertyAtIndex(i); if (property) max_name_len = std::max(property->GetName().size(), max_name_len); } for (size_t i = 0; i < num_properties; ++i) { const Property *property = ProtectedGetPropertyAtIndex(i); if (property) property->DumpDescription(interpreter, strm, max_name_len, false); } } void OptionValueProperties::Apropos( llvm::StringRef keyword, std::vector &matching_properties) const { const size_t num_properties = m_properties.size(); StreamString strm; for (size_t i = 0; i < num_properties; ++i) { const Property *property = ProtectedGetPropertyAtIndex(i); if (property) { const OptionValueProperties *properties = property->GetValue()->GetAsProperties(); if (properties) { properties->Apropos(keyword, matching_properties); } else { bool match = false; llvm::StringRef name = property->GetName(); if (name.contains_lower(keyword)) match = true; else { llvm::StringRef desc = property->GetDescription(); if (desc.contains_lower(keyword)) match = true; } if (match) { matching_properties.push_back(property); } } } } } lldb::OptionValuePropertiesSP OptionValueProperties::GetSubProperty(const ExecutionContext *exe_ctx, const ConstString &name) { lldb::OptionValueSP option_value_sp(GetValueForKey(exe_ctx, name, false)); if (option_value_sp) { OptionValueProperties *ov_properties = option_value_sp->GetAsProperties(); if (ov_properties) return ov_properties->shared_from_this(); } return lldb::OptionValuePropertiesSP(); } Index: vendor/lldb/dist/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp =================================================================== --- vendor/lldb/dist/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp (revision 317691) +++ vendor/lldb/dist/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp (revision 317692) @@ -1,1097 +1,959 @@ //===-- CPlusPlusLanguage.cpp -----------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #include "CPlusPlusLanguage.h" // C Includes #include #include // C++ Includes #include #include #include #include // Other libraries and framework includes #include "llvm/ADT/StringRef.h" // Project includes #include "lldb/Core/PluginManager.h" #include "lldb/Core/UniqueCStringMap.h" #include "lldb/DataFormatters/CXXFunctionPointer.h" #include "lldb/DataFormatters/DataVisualization.h" #include "lldb/DataFormatters/FormattersHelpers.h" #include "lldb/DataFormatters/VectorType.h" #include "lldb/Utility/ConstString.h" #include "lldb/Utility/FastDemangle.h" #include "lldb/Utility/Log.h" #include "lldb/Utility/RegularExpression.h" #include "BlockPointer.h" #include "CPlusPlusNameParser.h" #include "CxxStringTypes.h" #include "LibCxx.h" #include "LibCxxAtomic.h" #include "LibStdcpp.h" using namespace lldb; using namespace lldb_private; using namespace lldb_private::formatters; void CPlusPlusLanguage::Initialize() { PluginManager::RegisterPlugin(GetPluginNameStatic(), "C++ Language", CreateInstance); } void CPlusPlusLanguage::Terminate() { PluginManager::UnregisterPlugin(CreateInstance); } lldb_private::ConstString CPlusPlusLanguage::GetPluginNameStatic() { static ConstString g_name("cplusplus"); return g_name; } //------------------------------------------------------------------ // PluginInterface protocol //------------------------------------------------------------------ lldb_private::ConstString CPlusPlusLanguage::GetPluginName() { return GetPluginNameStatic(); } uint32_t CPlusPlusLanguage::GetPluginVersion() { return 1; } //------------------------------------------------------------------ // Static Functions //------------------------------------------------------------------ Language *CPlusPlusLanguage::CreateInstance(lldb::LanguageType language) { if (Language::LanguageIsCPlusPlus(language)) return new CPlusPlusLanguage(); return nullptr; } void CPlusPlusLanguage::MethodName::Clear() { m_full.Clear(); m_basename = llvm::StringRef(); m_context = llvm::StringRef(); m_arguments = llvm::StringRef(); m_qualifiers = llvm::StringRef(); m_parsed = false; m_parse_error = false; } static bool ReverseFindMatchingChars(const llvm::StringRef &s, const llvm::StringRef &left_right_chars, size_t &left_pos, size_t &right_pos, size_t pos = llvm::StringRef::npos) { assert(left_right_chars.size() == 2); left_pos = llvm::StringRef::npos; const char left_char = left_right_chars[0]; const char right_char = left_right_chars[1]; pos = s.find_last_of(left_right_chars, pos); if (pos == llvm::StringRef::npos || s[pos] == left_char) return false; right_pos = pos; uint32_t depth = 1; while (pos > 0 && depth > 0) { pos = s.find_last_of(left_right_chars, pos); if (pos == llvm::StringRef::npos) return false; if (s[pos] == left_char) { if (--depth == 0) { left_pos = pos; return left_pos < right_pos; } } else if (s[pos] == right_char) { ++depth; } } return false; } static bool IsTrivialBasename(const llvm::StringRef &basename) { // Check that the basename matches with the following regular expression // "^~?([A-Za-z_][A-Za-z_0-9]*)$" // We are using a hand written implementation because it is significantly more // efficient then // using the general purpose regular expression library. size_t idx = 0; if (basename.size() > 0 && basename[0] == '~') idx = 1; if (basename.size() <= idx) return false; // Empty string or "~" if (!std::isalpha(basename[idx]) && basename[idx] != '_') return false; // First charater (after removing the possible '~'') isn't in // [A-Za-z_] // Read all characters matching [A-Za-z_0-9] ++idx; while (idx < basename.size()) { if (!std::isalnum(basename[idx]) && basename[idx] != '_') break; ++idx; } // We processed all characters. It is a vaild basename. if (idx == basename.size()) return true; return false; } bool CPlusPlusLanguage::MethodName::TrySimplifiedParse() { // This method tries to parse simple method definitions // which are presumably most comman in user programs. // Definitions that can be parsed by this function don't have return types // and templates in the name. // A::B::C::fun(std::vector &) const size_t arg_start, arg_end; llvm::StringRef full(m_full.GetCString()); llvm::StringRef parens("()", 2); if (ReverseFindMatchingChars(full, parens, arg_start, arg_end)) { m_arguments = full.substr(arg_start, arg_end - arg_start + 1); if (arg_end + 1 < full.size()) m_qualifiers = full.substr(arg_end + 1).ltrim(); if (arg_start == 0) return false; size_t basename_end = arg_start; size_t context_start = 0; size_t context_end = full.rfind(':', basename_end); if (context_end == llvm::StringRef::npos) m_basename = full.substr(0, basename_end); else { if (context_start < context_end) m_context = full.substr(context_start, context_end - 1 - context_start); const size_t basename_begin = context_end + 1; m_basename = full.substr(basename_begin, basename_end - basename_begin); } if (IsTrivialBasename(m_basename)) { return true; } else { // The C++ basename doesn't match our regular expressions so this can't // be a valid C++ method, clear everything out and indicate an error m_context = llvm::StringRef(); m_basename = llvm::StringRef(); m_arguments = llvm::StringRef(); m_qualifiers = llvm::StringRef(); return false; } } return false; } void CPlusPlusLanguage::MethodName::Parse() { if (!m_parsed && m_full) { if (TrySimplifiedParse()) { m_parse_error = false; } else { CPlusPlusNameParser parser(m_full.GetStringRef()); if (auto function = parser.ParseAsFunctionDefinition()) { m_basename = function.getValue().name.basename; m_context = function.getValue().name.context; m_arguments = function.getValue().arguments; m_qualifiers = function.getValue().qualifiers; m_parse_error = false; } else { m_parse_error = true; } } m_parsed = true; } } llvm::StringRef CPlusPlusLanguage::MethodName::GetBasename() { if (!m_parsed) Parse(); return m_basename; } llvm::StringRef CPlusPlusLanguage::MethodName::GetContext() { if (!m_parsed) Parse(); return m_context; } llvm::StringRef CPlusPlusLanguage::MethodName::GetArguments() { if (!m_parsed) Parse(); return m_arguments; } llvm::StringRef CPlusPlusLanguage::MethodName::GetQualifiers() { if (!m_parsed) Parse(); return m_qualifiers; } std::string CPlusPlusLanguage::MethodName::GetScopeQualifiedName() { if (!m_parsed) Parse(); if (m_context.empty()) return m_basename; std::string res; res += m_context; res += "::"; res += m_basename; return res; } bool CPlusPlusLanguage::IsCPPMangledName(const char *name) { // FIXME, we should really run through all the known C++ Language plugins and // ask each one if // this is a C++ mangled name, but we can put that off till there is actually // more than one // we care about. return (name != nullptr && name[0] == '_' && name[1] == 'Z'); } bool CPlusPlusLanguage::ExtractContextAndIdentifier( const char *name, llvm::StringRef &context, llvm::StringRef &identifier) { CPlusPlusNameParser parser(name); if (auto full_name = parser.ParseAsFullName()) { identifier = full_name.getValue().basename; context = full_name.getValue().context; return true; } return false; } -class CPPRuntimeEquivalents { -public: - CPPRuntimeEquivalents() { - m_impl.Append(ConstString("std::basic_string, " - "std::allocator >") - .GetStringRef(), - ConstString("basic_string")); - - // these two (with a prefixed std::) occur when c++stdlib string class - // occurs as a template argument in some STL container - m_impl.Append(ConstString("std::basic_string, " - "std::allocator >") - .GetStringRef(), - ConstString("std::basic_string")); - - m_impl.Sort(); - } - - void Add(ConstString &type_name, ConstString &type_equivalent) { - m_impl.Insert(type_name.GetStringRef(), type_equivalent); - } - - uint32_t FindExactMatches(ConstString &type_name, - std::vector &equivalents) { - uint32_t count = 0; - - for (ImplData match = - m_impl.FindFirstValueForName(type_name.GetStringRef()); - match != nullptr; match = m_impl.FindNextValueForName(match)) { - equivalents.push_back(match->value); - count++; - } - - return count; - } - - // partial matches can occur when a name with equivalents is a template - // argument. - // e.g. we may have "class Foo" be a match for "struct Bar". if we have a - // typename - // such as "class Templatized" we want this to be - // replaced with - // "class Templatized". Since partial matching is time - // consuming - // once we get a partial match, we add it to the exact matches list for faster - // retrieval - uint32_t FindPartialMatches(ConstString &type_name, - std::vector &equivalents) { - uint32_t count = 0; - - llvm::StringRef type_name_cstr = type_name.GetStringRef(); - - size_t items_count = m_impl.GetSize(); - - for (size_t item = 0; item < items_count; item++) { - llvm::StringRef key_cstr = m_impl.GetCStringAtIndex(item); - if (type_name_cstr.contains(key_cstr)) { - count += AppendReplacements(type_name_cstr, key_cstr, equivalents); - } - } - - return count; - } - -private: - std::string &replace(std::string &target, std::string &pattern, - std::string &with) { - size_t pos; - size_t pattern_len = pattern.size(); - - while ((pos = target.find(pattern)) != std::string::npos) - target.replace(pos, pattern_len, with); - - return target; - } - - uint32_t AppendReplacements(llvm::StringRef original, - llvm::StringRef matching_key, - std::vector &equivalents) { - std::string matching_key_str(matching_key); - ConstString original_const(original); - - uint32_t count = 0; - - for (ImplData match = m_impl.FindFirstValueForName(matching_key); - match != nullptr; match = m_impl.FindNextValueForName(match)) { - std::string target(original); - std::string equiv_class(match->value.AsCString()); - - replace(target, matching_key_str, equiv_class); - - ConstString target_const(target.c_str()); - -// you will most probably want to leave this off since it might make this map -// grow indefinitely -#ifdef ENABLE_CPP_EQUIVALENTS_MAP_TO_GROW - Add(original_const, target_const); -#endif - equivalents.push_back(target_const); - - count++; - } - - return count; - } - - typedef UniqueCStringMap Impl; - typedef const Impl::Entry *ImplData; - Impl m_impl; -}; - -static CPPRuntimeEquivalents &GetEquivalentsMap() { - static CPPRuntimeEquivalents g_equivalents_map; - return g_equivalents_map; -} - -uint32_t -CPlusPlusLanguage::FindEquivalentNames(ConstString type_name, - std::vector &equivalents) { - uint32_t count = GetEquivalentsMap().FindExactMatches(type_name, equivalents); - - bool might_have_partials = - (count == 0) // if we have a full name match just use it - && (strchr(type_name.AsCString(), '<') != - nullptr // we should only have partial matches when templates are - // involved, check that we have - && strchr(type_name.AsCString(), '>') != nullptr); // angle brackets - // in the type_name - // before trying to - // scan for partial - // matches - - if (might_have_partials) - count = GetEquivalentsMap().FindPartialMatches(type_name, equivalents); - - return count; -} - /// Given a mangled function `mangled`, replace all the primitive function type /// arguments of `search` with type `replace`. static ConstString SubsPrimitiveParmItanium(llvm::StringRef mangled, llvm::StringRef search, llvm::StringRef replace) { Log *log = GetLogIfAllCategoriesSet(LIBLLDB_LOG_LANGUAGE); const size_t max_len = mangled.size() + mangled.count(search) * replace.size() + 1; // Make a temporary buffer to fix up the mangled parameter types and copy the // original there std::string output_buf; output_buf.reserve(max_len); output_buf.insert(0, mangled.str()); ptrdiff_t replaced_offset = 0; auto swap_parms_hook = [&](const char *parsee) { if (!parsee || !*parsee) return; // Check whether we've found a substitutee llvm::StringRef s(parsee); if (s.startswith(search)) { // account for the case where a replacement is of a different length to // the original replaced_offset += replace.size() - search.size(); ptrdiff_t replace_idx = (mangled.size() - s.size()) + replaced_offset; output_buf.erase(replace_idx, search.size()); output_buf.insert(replace_idx, replace.str()); } }; // FastDemangle will call our hook for each instance of a primitive type, // allowing us to perform substitution const char *const demangled = FastDemangle(mangled.str().c_str(), mangled.size(), swap_parms_hook); if (log) log->Printf("substituted mangling for %s:{%s} %s:{%s}\n", mangled.str().c_str(), demangled, output_buf.c_str(), FastDemangle(output_buf.c_str())); return output_buf == mangled ? ConstString() : ConstString(output_buf); } uint32_t CPlusPlusLanguage::FindAlternateFunctionManglings( const ConstString mangled_name, std::set &alternates) { const auto start_size = alternates.size(); /// Get a basic set of alternative manglings for the given symbol `name`, by /// making a few basic possible substitutions on basic types, storage duration /// and `const`ness for the given symbol. The output parameter `alternates` /// is filled with a best-guess, non-exhaustive set of different manglings /// for the given name. // Maybe we're looking for a const symbol but the debug info told us it was // non-const... if (!strncmp(mangled_name.GetCString(), "_ZN", 3) && strncmp(mangled_name.GetCString(), "_ZNK", 4)) { std::string fixed_scratch("_ZNK"); fixed_scratch.append(mangled_name.GetCString() + 3); alternates.insert(ConstString(fixed_scratch)); } // Maybe we're looking for a static symbol but we thought it was global... if (!strncmp(mangled_name.GetCString(), "_Z", 2) && strncmp(mangled_name.GetCString(), "_ZL", 3)) { std::string fixed_scratch("_ZL"); fixed_scratch.append(mangled_name.GetCString() + 2); alternates.insert(ConstString(fixed_scratch)); } // `char` is implementation defined as either `signed` or `unsigned`. As a // result a char parameter has 3 possible manglings: 'c'-char, 'a'-signed // char, 'h'-unsigned char. If we're looking for symbols with a signed char // parameter, try finding matches which have the general case 'c'. if (ConstString char_fixup = SubsPrimitiveParmItanium(mangled_name.GetStringRef(), "a", "c")) alternates.insert(char_fixup); // long long parameter mangling 'x', may actually just be a long 'l' argument if (ConstString long_fixup = SubsPrimitiveParmItanium(mangled_name.GetStringRef(), "x", "l")) alternates.insert(long_fixup); // unsigned long long parameter mangling 'y', may actually just be unsigned // long 'm' argument if (ConstString ulong_fixup = SubsPrimitiveParmItanium(mangled_name.GetStringRef(), "y", "m")) alternates.insert(ulong_fixup); return alternates.size() - start_size; } static void LoadLibCxxFormatters(lldb::TypeCategoryImplSP cpp_category_sp) { if (!cpp_category_sp) return; TypeSummaryImpl::Flags stl_summary_flags; stl_summary_flags.SetCascades(true) .SetSkipPointers(false) .SetSkipReferences(false) .SetDontShowChildren(true) .SetDontShowValue(true) .SetShowMembersOneLiner(false) .SetHideItemNames(false); #ifndef LLDB_DISABLE_PYTHON lldb::TypeSummaryImplSP std_string_summary_sp(new CXXFunctionSummaryFormat( stl_summary_flags, lldb_private::formatters::LibcxxStringSummaryProvider, "std::string summary provider")); lldb::TypeSummaryImplSP std_wstring_summary_sp(new CXXFunctionSummaryFormat( stl_summary_flags, lldb_private::formatters::LibcxxWStringSummaryProvider, "std::wstring summary provider")); cpp_category_sp->GetTypeSummariesContainer()->Add( ConstString("std::__1::string"), std_string_summary_sp); cpp_category_sp->GetTypeSummariesContainer()->Add( ConstString("std::__ndk1::string"), std_string_summary_sp); cpp_category_sp->GetTypeSummariesContainer()->Add( ConstString("std::__1::basic_string, " "std::__1::allocator >"), std_string_summary_sp); cpp_category_sp->GetTypeSummariesContainer()->Add( ConstString("std::__ndk1::basic_string, " "std::__ndk1::allocator >"), std_string_summary_sp); cpp_category_sp->GetTypeSummariesContainer()->Add( ConstString("std::__1::wstring"), std_wstring_summary_sp); cpp_category_sp->GetTypeSummariesContainer()->Add( ConstString("std::__ndk1::wstring"), std_wstring_summary_sp); cpp_category_sp->GetTypeSummariesContainer()->Add( ConstString("std::__1::basic_string, " "std::__1::allocator >"), std_wstring_summary_sp); cpp_category_sp->GetTypeSummariesContainer()->Add( ConstString("std::__ndk1::basic_string, " "std::__ndk1::allocator >"), std_wstring_summary_sp); SyntheticChildren::Flags stl_synth_flags; stl_synth_flags.SetCascades(true).SetSkipPointers(false).SetSkipReferences( false); AddCXXSynthetic( cpp_category_sp, lldb_private::formatters::LibcxxStdVectorSyntheticFrontEndCreator, "libc++ std::vector synthetic children", ConstString("^std::__(ndk)?1::vector<.+>(( )?&)?$"), stl_synth_flags, true); AddCXXSynthetic( cpp_category_sp, lldb_private::formatters::LibcxxStdListSyntheticFrontEndCreator, "libc++ std::list synthetic children", ConstString("^std::__(ndk)?1::list<.+>(( )?&)?$"), stl_synth_flags, true); AddCXXSynthetic( cpp_category_sp, lldb_private::formatters::LibcxxStdMapSyntheticFrontEndCreator, "libc++ std::map synthetic children", ConstString("^std::__(ndk)?1::map<.+> >(( )?&)?$"), stl_synth_flags, true); AddCXXSynthetic( cpp_category_sp, lldb_private::formatters::LibcxxStdMapSyntheticFrontEndCreator, "libc++ std::set synthetic children", ConstString("^std::__(ndk)?1::set<.+> >(( )?&)?$"), stl_synth_flags, true); AddCXXSynthetic( cpp_category_sp, lldb_private::formatters::LibcxxStdMapSyntheticFrontEndCreator, "libc++ std::multiset synthetic children", ConstString("^std::__(ndk)?1::multiset<.+> >(( )?&)?$"), stl_synth_flags, true); AddCXXSynthetic( cpp_category_sp, lldb_private::formatters::LibcxxStdMapSyntheticFrontEndCreator, "libc++ std::multimap synthetic children", ConstString("^std::__(ndk)?1::multimap<.+> >(( )?&)?$"), stl_synth_flags, true); AddCXXSynthetic( cpp_category_sp, lldb_private::formatters::LibcxxStdUnorderedMapSyntheticFrontEndCreator, "libc++ std::unordered containers synthetic children", ConstString("^(std::__(ndk)?1::)unordered_(multi)?(map|set)<.+> >$"), stl_synth_flags, true); AddCXXSynthetic( cpp_category_sp, lldb_private::formatters::LibcxxInitializerListSyntheticFrontEndCreator, "libc++ std::initializer_list synthetic children", ConstString("^std::initializer_list<.+>(( )?&)?$"), stl_synth_flags, true); AddCXXSynthetic( cpp_category_sp, lldb_private::formatters::LibcxxAtomicSyntheticFrontEndCreator, "libc++ std::atomic synthetic children", ConstString("^std::__(ndk)?1::atomic<.+>$"), stl_synth_flags, true); cpp_category_sp->GetRegexTypeSyntheticsContainer()->Add( RegularExpressionSP(new RegularExpression( llvm::StringRef("^(std::__(ndk)?1::)deque<.+>(( )?&)?$"))), SyntheticChildrenSP(new ScriptedSyntheticChildren( stl_synth_flags, "lldb.formatters.cpp.libcxx.stddeque_SynthProvider"))); AddCXXSynthetic( cpp_category_sp, lldb_private::formatters::LibcxxSharedPtrSyntheticFrontEndCreator, "shared_ptr synthetic children", ConstString("^(std::__(ndk)?1::)shared_ptr<.+>(( )?&)?$"), stl_synth_flags, true); AddCXXSynthetic( cpp_category_sp, lldb_private::formatters::LibcxxSharedPtrSyntheticFrontEndCreator, "weak_ptr synthetic children", ConstString("^(std::__(ndk)?1::)weak_ptr<.+>(( )?&)?$"), stl_synth_flags, true); stl_summary_flags.SetDontShowChildren(false); stl_summary_flags.SetSkipPointers(false); AddCXXSummary(cpp_category_sp, lldb_private::formatters::LibcxxContainerSummaryProvider, "libc++ std::vector summary provider", ConstString("^std::__(ndk)?1::vector<.+>(( )?&)?$"), stl_summary_flags, true); AddCXXSummary(cpp_category_sp, lldb_private::formatters::LibcxxContainerSummaryProvider, "libc++ std::list summary provider", ConstString("^std::__(ndk)?1::list<.+>(( )?&)?$"), stl_summary_flags, true); AddCXXSummary(cpp_category_sp, lldb_private::formatters::LibcxxContainerSummaryProvider, "libc++ std::map summary provider", ConstString("^std::__(ndk)?1::map<.+>(( )?&)?$"), stl_summary_flags, true); AddCXXSummary(cpp_category_sp, lldb_private::formatters::LibcxxContainerSummaryProvider, "libc++ std::deque summary provider", ConstString("^std::__(ndk)?1::deque<.+>(( )?&)?$"), stl_summary_flags, true); AddCXXSummary(cpp_category_sp, lldb_private::formatters::LibcxxContainerSummaryProvider, "libc++ std::set summary provider", ConstString("^std::__(ndk)?1::set<.+>(( )?&)?$"), stl_summary_flags, true); AddCXXSummary(cpp_category_sp, lldb_private::formatters::LibcxxContainerSummaryProvider, "libc++ std::multiset summary provider", ConstString("^std::__(ndk)?1::multiset<.+>(( )?&)?$"), stl_summary_flags, true); AddCXXSummary(cpp_category_sp, lldb_private::formatters::LibcxxContainerSummaryProvider, "libc++ std::multimap summary provider", ConstString("^std::__(ndk)?1::multimap<.+>(( )?&)?$"), stl_summary_flags, true); AddCXXSummary( cpp_category_sp, lldb_private::formatters::LibcxxContainerSummaryProvider, "libc++ std::unordered containers summary provider", ConstString("^(std::__(ndk)?1::)unordered_(multi)?(map|set)<.+> >$"), stl_summary_flags, true); AddCXXSummary( cpp_category_sp, lldb_private::formatters::LibCxxAtomicSummaryProvider, "libc++ std::atomic summary provider", ConstString("^std::__(ndk)?1::atomic<.+>$"), stl_summary_flags, true); stl_summary_flags.SetSkipPointers(true); AddCXXSummary(cpp_category_sp, lldb_private::formatters::LibcxxSmartPointerSummaryProvider, "libc++ std::shared_ptr summary provider", ConstString("^std::__(ndk)?1::shared_ptr<.+>(( )?&)?$"), stl_summary_flags, true); AddCXXSummary(cpp_category_sp, lldb_private::formatters::LibcxxSmartPointerSummaryProvider, "libc++ std::weak_ptr summary provider", ConstString("^std::__(ndk)?1::weak_ptr<.+>(( )?&)?$"), stl_summary_flags, true); AddCXXSynthetic( cpp_category_sp, lldb_private::formatters::LibCxxVectorIteratorSyntheticFrontEndCreator, "std::vector iterator synthetic children", ConstString("^std::__(ndk)?1::__wrap_iter<.+>$"), stl_synth_flags, true); AddCXXSynthetic( cpp_category_sp, lldb_private::formatters::LibCxxMapIteratorSyntheticFrontEndCreator, "std::map iterator synthetic children", ConstString("^std::__(ndk)?1::__map_iterator<.+>$"), stl_synth_flags, true); AddCXXSynthetic( cpp_category_sp, lldb_private::formatters::LibcxxFunctionFrontEndCreator, "std::function synthetic value provider", ConstString("^std::__(ndk)?1::function<.+>$"), stl_synth_flags, true); #endif } static void LoadLibStdcppFormatters(lldb::TypeCategoryImplSP cpp_category_sp) { if (!cpp_category_sp) return; TypeSummaryImpl::Flags stl_summary_flags; stl_summary_flags.SetCascades(true) .SetSkipPointers(false) .SetSkipReferences(false) .SetDontShowChildren(true) .SetDontShowValue(true) .SetShowMembersOneLiner(false) .SetHideItemNames(false); lldb::TypeSummaryImplSP std_string_summary_sp( new StringSummaryFormat(stl_summary_flags, "${var._M_dataplus._M_p}")); lldb::TypeSummaryImplSP cxx11_string_summary_sp(new CXXFunctionSummaryFormat( stl_summary_flags, LibStdcppStringSummaryProvider, "libstdc++ c++11 std::string summary provider")); lldb::TypeSummaryImplSP cxx11_wstring_summary_sp(new CXXFunctionSummaryFormat( stl_summary_flags, LibStdcppWStringSummaryProvider, "libstdc++ c++11 std::wstring summary provider")); cpp_category_sp->GetTypeSummariesContainer()->Add(ConstString("std::string"), std_string_summary_sp); cpp_category_sp->GetTypeSummariesContainer()->Add( ConstString("std::basic_string"), std_string_summary_sp); cpp_category_sp->GetTypeSummariesContainer()->Add( ConstString("std::basic_string,std::" "allocator >"), std_string_summary_sp); cpp_category_sp->GetTypeSummariesContainer()->Add( ConstString("std::basic_string, " "std::allocator >"), std_string_summary_sp); cpp_category_sp->GetTypeSummariesContainer()->Add( ConstString("std::__cxx11::string"), cxx11_string_summary_sp); cpp_category_sp->GetTypeSummariesContainer()->Add( ConstString("std::__cxx11::basic_string, " "std::allocator >"), cxx11_string_summary_sp); // making sure we force-pick the summary for printing wstring (_M_p is a // wchar_t*) lldb::TypeSummaryImplSP std_wstring_summary_sp( new StringSummaryFormat(stl_summary_flags, "${var._M_dataplus._M_p%S}")); cpp_category_sp->GetTypeSummariesContainer()->Add(ConstString("std::wstring"), std_wstring_summary_sp); cpp_category_sp->GetTypeSummariesContainer()->Add( ConstString("std::basic_string"), std_wstring_summary_sp); cpp_category_sp->GetTypeSummariesContainer()->Add( ConstString("std::basic_string,std::" "allocator >"), std_wstring_summary_sp); cpp_category_sp->GetTypeSummariesContainer()->Add( ConstString("std::basic_string, " "std::allocator >"), std_wstring_summary_sp); cpp_category_sp->GetTypeSummariesContainer()->Add( ConstString("std::__cxx11::wstring"), cxx11_wstring_summary_sp); cpp_category_sp->GetTypeSummariesContainer()->Add( ConstString("std::__cxx11::basic_string, std::allocator >"), cxx11_wstring_summary_sp); #ifndef LLDB_DISABLE_PYTHON SyntheticChildren::Flags stl_synth_flags; stl_synth_flags.SetCascades(true).SetSkipPointers(false).SetSkipReferences( false); cpp_category_sp->GetRegexTypeSyntheticsContainer()->Add( RegularExpressionSP( new 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<.+> >(( )?&)?$"))), 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<.+>(( )?&)?$"))), 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<.+>(( )?&)?$"))), TypeSummaryImplSP( new StringSummaryFormat(stl_summary_flags, "size=${svar%#}"))); cpp_category_sp->GetRegexTypeSummariesContainer()->Add( RegularExpressionSP( new 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<.+>(( )?&)?$"))), TypeSummaryImplSP( new StringSummaryFormat(stl_summary_flags, "size=${svar%#}"))); AddCXXSynthetic( cpp_category_sp, lldb_private::formatters::LibStdcppVectorIteratorSyntheticFrontEndCreator, "std::vector iterator synthetic children", ConstString("^__gnu_cxx::__normal_iterator<.+>$"), stl_synth_flags, true); AddCXXSynthetic( cpp_category_sp, lldb_private::formatters::LibstdcppMapIteratorSyntheticFrontEndCreator, "std::map iterator synthetic children", ConstString("^std::_Rb_tree_iterator<.+>$"), stl_synth_flags, true); AddCXXSynthetic( cpp_category_sp, lldb_private::formatters::LibStdcppUniquePtrSyntheticFrontEndCreator, "std::unique_ptr synthetic children", ConstString("^std::unique_ptr<.+>(( )?&)?$"), stl_synth_flags, true); AddCXXSynthetic( cpp_category_sp, lldb_private::formatters::LibStdcppSharedPtrSyntheticFrontEndCreator, "std::shared_ptr synthetic children", ConstString("^std::shared_ptr<.+>(( )?&)?$"), stl_synth_flags, true); AddCXXSynthetic( cpp_category_sp, lldb_private::formatters::LibStdcppSharedPtrSyntheticFrontEndCreator, "std::weak_ptr synthetic children", ConstString("^std::weak_ptr<.+>(( )?&)?$"), stl_synth_flags, true); AddCXXSynthetic( cpp_category_sp, lldb_private::formatters::LibStdcppTupleSyntheticFrontEndCreator, "std::tuple synthetic children", ConstString("^std::tuple<.+>(( )?&)?$"), stl_synth_flags, true); AddCXXSummary(cpp_category_sp, lldb_private::formatters::LibStdcppUniquePointerSummaryProvider, "libstdc++ std::unique_ptr summary provider", ConstString("^std::unique_ptr<.+>(( )?&)?$"), stl_summary_flags, true); AddCXXSummary(cpp_category_sp, lldb_private::formatters::LibStdcppSmartPointerSummaryProvider, "libstdc++ std::shared_ptr summary provider", ConstString("^std::shared_ptr<.+>(( )?&)?$"), stl_summary_flags, true); AddCXXSummary(cpp_category_sp, lldb_private::formatters::LibStdcppSmartPointerSummaryProvider, "libstdc++ std::weak_ptr summary provider", ConstString("^std::weak_ptr<.+>(( )?&)?$"), stl_summary_flags, true); #endif } static void LoadSystemFormatters(lldb::TypeCategoryImplSP cpp_category_sp) { if (!cpp_category_sp) return; TypeSummaryImpl::Flags string_flags; string_flags.SetCascades(true) .SetSkipPointers(true) .SetSkipReferences(false) .SetDontShowChildren(true) .SetDontShowValue(false) .SetShowMembersOneLiner(false) .SetHideItemNames(false); TypeSummaryImpl::Flags string_array_flags; string_array_flags.SetCascades(true) .SetSkipPointers(true) .SetSkipReferences(false) .SetDontShowChildren(true) .SetDontShowValue(true) .SetShowMembersOneLiner(false) .SetHideItemNames(false); #ifndef LLDB_DISABLE_PYTHON // FIXME because of a bug in the FormattersContainer we need to add a summary // for both X* and const X* () AddCXXSummary( cpp_category_sp, lldb_private::formatters::Char16StringSummaryProvider, "char16_t * summary provider", ConstString("char16_t *"), string_flags); AddCXXSummary(cpp_category_sp, lldb_private::formatters::Char16StringSummaryProvider, "char16_t [] summary provider", ConstString("char16_t \\[[0-9]+\\]"), string_array_flags, true); AddCXXSummary( cpp_category_sp, lldb_private::formatters::Char32StringSummaryProvider, "char32_t * summary provider", ConstString("char32_t *"), string_flags); AddCXXSummary(cpp_category_sp, lldb_private::formatters::Char32StringSummaryProvider, "char32_t [] summary provider", ConstString("char32_t \\[[0-9]+\\]"), string_array_flags, true); AddCXXSummary( cpp_category_sp, lldb_private::formatters::WCharStringSummaryProvider, "wchar_t * summary provider", ConstString("wchar_t *"), string_flags); AddCXXSummary(cpp_category_sp, lldb_private::formatters::WCharStringSummaryProvider, "wchar_t * summary provider", ConstString("wchar_t \\[[0-9]+\\]"), string_array_flags, true); AddCXXSummary( cpp_category_sp, lldb_private::formatters::Char16StringSummaryProvider, "unichar * summary provider", ConstString("unichar *"), string_flags); TypeSummaryImpl::Flags widechar_flags; widechar_flags.SetDontShowValue(true) .SetSkipPointers(true) .SetSkipReferences(false) .SetCascades(true) .SetDontShowChildren(true) .SetHideItemNames(true) .SetShowMembersOneLiner(false); AddCXXSummary( cpp_category_sp, lldb_private::formatters::Char16SummaryProvider, "char16_t summary provider", ConstString("char16_t"), widechar_flags); AddCXXSummary( cpp_category_sp, lldb_private::formatters::Char32SummaryProvider, "char32_t summary provider", ConstString("char32_t"), widechar_flags); AddCXXSummary(cpp_category_sp, lldb_private::formatters::WCharSummaryProvider, "wchar_t summary provider", ConstString("wchar_t"), widechar_flags); AddCXXSummary( cpp_category_sp, lldb_private::formatters::Char16SummaryProvider, "unichar summary provider", ConstString("unichar"), widechar_flags); #endif } std::unique_ptr CPlusPlusLanguage::GetTypeScavenger() { class CPlusPlusTypeScavenger : public Language::ImageListTypeScavenger { public: virtual CompilerType AdjustForInclusion(CompilerType &candidate) override { LanguageType lang_type(candidate.GetMinimumLanguage()); if (!Language::LanguageIsC(lang_type) && !Language::LanguageIsCPlusPlus(lang_type)) return CompilerType(); if (candidate.IsTypedefType()) return candidate.GetTypedefedType(); return candidate; } }; return std::unique_ptr(new CPlusPlusTypeScavenger()); } lldb::TypeCategoryImplSP CPlusPlusLanguage::GetFormatters() { static llvm::once_flag g_initialize; static TypeCategoryImplSP g_category; llvm::call_once(g_initialize, [this]() -> void { DataVisualization::Categories::GetCategory(GetPluginName(), g_category); if (g_category) { LoadLibCxxFormatters(g_category); LoadLibStdcppFormatters(g_category); LoadSystemFormatters(g_category); } }); return g_category; } HardcodedFormatters::HardcodedSummaryFinder CPlusPlusLanguage::GetHardcodedSummaries() { static llvm::once_flag g_initialize; static ConstString g_vectortypes("VectorTypes"); static HardcodedFormatters::HardcodedSummaryFinder g_formatters; llvm::call_once(g_initialize, []() -> void { g_formatters.push_back( [](lldb_private::ValueObject &valobj, lldb::DynamicValueType, FormatManager &) -> TypeSummaryImpl::SharedPointer { static CXXFunctionSummaryFormat::SharedPointer formatter_sp( new CXXFunctionSummaryFormat( TypeSummaryImpl::Flags(), lldb_private::formatters::CXXFunctionPointerSummaryProvider, "Function pointer summary provider")); if (valobj.GetCompilerType().IsFunctionPointerType()) { return formatter_sp; } return nullptr; }); g_formatters.push_back( [](lldb_private::ValueObject &valobj, lldb::DynamicValueType, FormatManager &fmt_mgr) -> TypeSummaryImpl::SharedPointer { static CXXFunctionSummaryFormat::SharedPointer formatter_sp( new CXXFunctionSummaryFormat( TypeSummaryImpl::Flags() .SetCascades(true) .SetDontShowChildren(true) .SetHideItemNames(true) .SetShowMembersOneLiner(true) .SetSkipPointers(true) .SetSkipReferences(false), lldb_private::formatters::VectorTypeSummaryProvider, "vector_type pointer summary provider")); if (valobj.GetCompilerType().IsVectorType(nullptr, nullptr)) { if (fmt_mgr.GetCategory(g_vectortypes)->IsEnabled()) return formatter_sp; } return nullptr; }); g_formatters.push_back( [](lldb_private::ValueObject &valobj, lldb::DynamicValueType, FormatManager &fmt_mgr) -> TypeSummaryImpl::SharedPointer { static CXXFunctionSummaryFormat::SharedPointer formatter_sp( new CXXFunctionSummaryFormat( TypeSummaryImpl::Flags() .SetCascades(true) .SetDontShowChildren(true) .SetHideItemNames(true) .SetShowMembersOneLiner(true) .SetSkipPointers(true) .SetSkipReferences(false), lldb_private::formatters::BlockPointerSummaryProvider, "block pointer summary provider")); if (valobj.GetCompilerType().IsBlockPointerType(nullptr)) { return formatter_sp; } return nullptr; }); }); return g_formatters; } HardcodedFormatters::HardcodedSyntheticFinder CPlusPlusLanguage::GetHardcodedSynthetics() { static llvm::once_flag g_initialize; static ConstString g_vectortypes("VectorTypes"); static HardcodedFormatters::HardcodedSyntheticFinder g_formatters; llvm::call_once(g_initialize, []() -> void { g_formatters.push_back([](lldb_private::ValueObject &valobj, lldb::DynamicValueType, FormatManager & fmt_mgr) -> SyntheticChildren::SharedPointer { static CXXSyntheticChildren::SharedPointer formatter_sp( new CXXSyntheticChildren( SyntheticChildren::Flags() .SetCascades(true) .SetSkipPointers(true) .SetSkipReferences(true) .SetNonCacheable(true), "vector_type synthetic children", lldb_private::formatters::VectorTypeSyntheticFrontEndCreator)); if (valobj.GetCompilerType().IsVectorType(nullptr, nullptr)) { if (fmt_mgr.GetCategory(g_vectortypes)->IsEnabled()) return formatter_sp; } return nullptr; }); g_formatters.push_back([](lldb_private::ValueObject &valobj, lldb::DynamicValueType, FormatManager & fmt_mgr) -> SyntheticChildren::SharedPointer { static CXXSyntheticChildren::SharedPointer formatter_sp( new CXXSyntheticChildren( SyntheticChildren::Flags() .SetCascades(true) .SetSkipPointers(true) .SetSkipReferences(true) .SetNonCacheable(true), "block pointer synthetic children", lldb_private::formatters::BlockPointerSyntheticFrontEndCreator)); if (valobj.GetCompilerType().IsBlockPointerType(nullptr)) { return formatter_sp; } return nullptr; }); }); return g_formatters; } Index: vendor/lldb/dist/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.h =================================================================== --- vendor/lldb/dist/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.h (revision 317691) +++ vendor/lldb/dist/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.h (revision 317692) @@ -1,150 +1,138 @@ //===-- CPlusPlusLanguage.h -------------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #ifndef liblldb_CPlusPlusLanguage_h_ #define liblldb_CPlusPlusLanguage_h_ // C Includes // C++ Includes #include #include // Other libraries and framework includes #include "llvm/ADT/StringRef.h" // Project includes #include "lldb/Target/Language.h" #include "lldb/Utility/ConstString.h" #include "lldb/lldb-private.h" namespace lldb_private { class CPlusPlusLanguage : public Language { public: class MethodName { public: MethodName() : m_full(), m_basename(), m_context(), m_arguments(), m_qualifiers(), m_parsed(false), m_parse_error(false) {} MethodName(const ConstString &s) : m_full(s), m_basename(), m_context(), m_arguments(), m_qualifiers(), m_parsed(false), m_parse_error(false) {} void Clear(); bool IsValid() { if (!m_parsed) Parse(); if (m_parse_error) return false; return (bool)m_full; } const ConstString &GetFullName() const { return m_full; } std::string GetScopeQualifiedName(); llvm::StringRef GetBasename(); llvm::StringRef GetContext(); llvm::StringRef GetArguments(); llvm::StringRef GetQualifiers(); protected: void Parse(); bool TrySimplifiedParse(); ConstString m_full; // Full name: // "lldb::SBTarget::GetBreakpointAtIndex(unsigned int) // const" llvm::StringRef m_basename; // Basename: "GetBreakpointAtIndex" llvm::StringRef m_context; // Decl context: "lldb::SBTarget" llvm::StringRef m_arguments; // Arguments: "(unsigned int)" llvm::StringRef m_qualifiers; // Qualifiers: "const" bool m_parsed; bool m_parse_error; }; CPlusPlusLanguage() = default; ~CPlusPlusLanguage() override = default; lldb::LanguageType GetLanguageType() const override { return lldb::eLanguageTypeC_plus_plus; } std::unique_ptr GetTypeScavenger() override; lldb::TypeCategoryImplSP GetFormatters() override; HardcodedFormatters::HardcodedSummaryFinder GetHardcodedSummaries() override; HardcodedFormatters::HardcodedSyntheticFinder GetHardcodedSynthetics() override; //------------------------------------------------------------------ // Static Functions //------------------------------------------------------------------ static void Initialize(); static void Terminate(); static lldb_private::Language *CreateInstance(lldb::LanguageType language); static lldb_private::ConstString GetPluginNameStatic(); static bool IsCPPMangledName(const char *name); // Extract C++ context and identifier from a string using heuristic matching // (as opposed to // CPlusPlusLanguage::MethodName which has to have a fully qualified C++ name // with parens and arguments. // If the name is a lone C identifier (e.g. C) or a qualified C identifier // (e.g. A::B::C) it will return true, // and identifier will be the identifier (C and C respectively) and the // context will be "" and "A::B" respectively. // If the name fails the heuristic matching for a qualified or unqualified // C/C++ identifier, then it will return false // and identifier and context will be unchanged. static bool ExtractContextAndIdentifier(const char *name, llvm::StringRef &context, llvm::StringRef &identifier); - // in some cases, compilers will output different names for one same type. - // when that happens, it might be impossible - // to construct SBType objects for a valid type, because the name that is - // available is not the same as the name that - // can be used as a search key in FindTypes(). the equivalents map here is - // meant to return possible alternative names - // for a type through which a search can be conducted. Currently, this is only - // enabled for C++ but can be extended - // to ObjC or other languages if necessary - static uint32_t FindEquivalentNames(ConstString type_name, - std::vector &equivalents); - // Given a mangled function name, calculates some alternative manglings since // the compiler mangling may not line up with the symbol we are expecting static uint32_t FindAlternateFunctionManglings(const ConstString mangled, std::set &candidates); //------------------------------------------------------------------ // PluginInterface protocol //------------------------------------------------------------------ ConstString GetPluginName() override; uint32_t GetPluginVersion() override; }; } // namespace lldb_private #endif // liblldb_CPlusPlusLanguage_h_ Index: vendor/lldb/dist/source/Plugins/Language/CPlusPlus/LibCxxMap.cpp =================================================================== --- vendor/lldb/dist/source/Plugins/Language/CPlusPlus/LibCxxMap.cpp (revision 317691) +++ vendor/lldb/dist/source/Plugins/Language/CPlusPlus/LibCxxMap.cpp (revision 317692) @@ -1,453 +1,469 @@ //===-- LibCxxMap.cpp -------------------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // C Includes // C++ Includes // Other libraries and framework includes // Project includes #include "LibCxx.h" #include "lldb/Core/ValueObject.h" #include "lldb/Core/ValueObjectConstResult.h" #include "lldb/DataFormatters/FormattersHelpers.h" #include "lldb/Symbol/ClangASTContext.h" #include "lldb/Target/Target.h" #include "lldb/Utility/DataBufferHeap.h" #include "lldb/Utility/Endian.h" #include "lldb/Utility/Error.h" #include "lldb/Utility/Stream.h" using namespace lldb; using namespace lldb_private; using namespace lldb_private::formatters; class MapEntry { public: MapEntry() = default; explicit MapEntry(ValueObjectSP entry_sp) : m_entry_sp(entry_sp) {} MapEntry(const MapEntry &rhs) = default; explicit MapEntry(ValueObject *entry) : m_entry_sp(entry ? entry->GetSP() : ValueObjectSP()) {} ValueObjectSP left() const { static ConstString g_left("__left_"); if (!m_entry_sp) return m_entry_sp; return m_entry_sp->GetSyntheticChildAtOffset( 0, m_entry_sp->GetCompilerType(), true); } ValueObjectSP right() const { static ConstString g_right("__right_"); if (!m_entry_sp) return m_entry_sp; return m_entry_sp->GetSyntheticChildAtOffset( m_entry_sp->GetProcessSP()->GetAddressByteSize(), m_entry_sp->GetCompilerType(), true); } ValueObjectSP parent() const { static ConstString g_parent("__parent_"); if (!m_entry_sp) return m_entry_sp; return m_entry_sp->GetSyntheticChildAtOffset( 2 * m_entry_sp->GetProcessSP()->GetAddressByteSize(), m_entry_sp->GetCompilerType(), true); } uint64_t value() const { if (!m_entry_sp) return 0; return m_entry_sp->GetValueAsUnsigned(0); } bool error() const { if (!m_entry_sp) return true; return m_entry_sp->GetError().Fail(); } bool null() const { return (value() == 0); } ValueObjectSP GetEntry() const { return m_entry_sp; } void SetEntry(ValueObjectSP entry) { m_entry_sp = entry; } bool operator==(const MapEntry &rhs) const { return (rhs.m_entry_sp.get() == m_entry_sp.get()); } private: ValueObjectSP m_entry_sp; }; class MapIterator { public: MapIterator() = default; MapIterator(MapEntry entry, size_t depth = 0) : m_entry(entry), m_max_depth(depth), m_error(false) {} MapIterator(ValueObjectSP entry, size_t depth = 0) : m_entry(entry), m_max_depth(depth), m_error(false) {} MapIterator(const MapIterator &rhs) : m_entry(rhs.m_entry), m_max_depth(rhs.m_max_depth), m_error(false) {} MapIterator(ValueObject *entry, size_t depth = 0) : m_entry(entry), m_max_depth(depth), m_error(false) {} ValueObjectSP value() { return m_entry.GetEntry(); } ValueObjectSP advance(size_t count) { ValueObjectSP fail; if (m_error) return fail; size_t steps = 0; while (count > 0) { next(); count--, steps++; if (m_error || m_entry.null() || (steps > m_max_depth)) return fail; } return m_entry.GetEntry(); } protected: void next() { if (m_entry.null()) return; MapEntry right(m_entry.right()); if (!right.null()) { m_entry = tree_min(std::move(right)); return; } size_t steps = 0; while (!is_left_child(m_entry)) { if (m_entry.error()) { m_error = true; return; } m_entry.SetEntry(m_entry.parent()); steps++; if (steps > m_max_depth) { m_entry = MapEntry(); return; } } m_entry = MapEntry(m_entry.parent()); } private: MapEntry tree_min(MapEntry &&x) { if (x.null()) return MapEntry(); MapEntry left(x.left()); size_t steps = 0; while (!left.null()) { if (left.error()) { m_error = true; return MapEntry(); } x = left; left.SetEntry(x.left()); steps++; if (steps > m_max_depth) return MapEntry(); } return x; } bool is_left_child(const MapEntry &x) { if (x.null()) return false; MapEntry rhs(x.parent()); rhs.SetEntry(rhs.left()); return x.value() == rhs.value(); } MapEntry m_entry; size_t m_max_depth; bool m_error; }; namespace lldb_private { namespace formatters { class LibcxxStdMapSyntheticFrontEnd : public SyntheticChildrenFrontEnd { public: LibcxxStdMapSyntheticFrontEnd(lldb::ValueObjectSP valobj_sp); ~LibcxxStdMapSyntheticFrontEnd() override = default; size_t CalculateNumChildren() override; lldb::ValueObjectSP GetChildAtIndex(size_t idx) override; bool Update() override; bool MightHaveChildren() override; size_t GetIndexOfChildWithName(const ConstString &name) override; private: bool GetDataType(); void GetValueOffset(const lldb::ValueObjectSP &node); ValueObject *m_tree; ValueObject *m_root_node; CompilerType m_element_type; uint32_t m_skip_size; size_t m_count; std::map m_iterators; }; } // namespace formatters } // namespace lldb_private lldb_private::formatters::LibcxxStdMapSyntheticFrontEnd:: LibcxxStdMapSyntheticFrontEnd(lldb::ValueObjectSP valobj_sp) : SyntheticChildrenFrontEnd(*valobj_sp), m_tree(nullptr), m_root_node(nullptr), m_element_type(), m_skip_size(UINT32_MAX), m_count(UINT32_MAX), m_iterators() { if (valobj_sp) Update(); } size_t lldb_private::formatters::LibcxxStdMapSyntheticFrontEnd:: CalculateNumChildren() { static ConstString g___pair3_("__pair3_"); static ConstString g___first_("__first_"); + static ConstString g___value_("__value_"); if (m_count != UINT32_MAX) return m_count; if (m_tree == nullptr) return 0; ValueObjectSP m_item(m_tree->GetChildMemberWithName(g___pair3_, true)); if (!m_item) return 0; - m_item = m_item->GetChildMemberWithName(g___first_, true); + + switch (m_item->GetCompilerType().GetNumDirectBaseClasses()) { + case 1: + // Assume a pre llvm r300140 __compressed_pair implementation: + m_item = m_item->GetChildMemberWithName(g___first_, true); + break; + case 2: { + // Assume a post llvm r300140 __compressed_pair implementation: + ValueObjectSP first_elem_parent = m_item->GetChildAtIndex(0, true); + m_item = first_elem_parent->GetChildMemberWithName(g___value_, true); + break; + } + default: + return false; + } + if (!m_item) return 0; m_count = m_item->GetValueAsUnsigned(0); return m_count; } bool lldb_private::formatters::LibcxxStdMapSyntheticFrontEnd::GetDataType() { static ConstString g___value_("__value_"); static ConstString g_tree_("__tree_"); static ConstString g_pair3("__pair3_"); if (m_element_type.GetOpaqueQualType() && m_element_type.GetTypeSystem()) return true; m_element_type.Clear(); ValueObjectSP deref; Error error; deref = m_root_node->Dereference(error); if (!deref || error.Fail()) return false; deref = deref->GetChildMemberWithName(g___value_, true); if (deref) { m_element_type = deref->GetCompilerType(); return true; } lldb::TemplateArgumentKind kind; deref = m_backend.GetChildAtNamePath({g_tree_, g_pair3}); if (!deref) return false; m_element_type = deref->GetCompilerType().GetTemplateArgument(1, kind).GetTemplateArgument( 1, kind); if (m_element_type) { std::string name; uint64_t bit_offset_ptr; uint32_t bitfield_bit_size_ptr; bool is_bitfield_ptr; m_element_type = m_element_type.GetFieldAtIndex( 0, name, &bit_offset_ptr, &bitfield_bit_size_ptr, &is_bitfield_ptr); m_element_type = m_element_type.GetTypedefedType(); return m_element_type.IsValid(); } else { m_element_type = m_backend.GetCompilerType().GetTemplateArgument(0, kind); return m_element_type.IsValid(); } } void lldb_private::formatters::LibcxxStdMapSyntheticFrontEnd::GetValueOffset( const lldb::ValueObjectSP &node) { if (m_skip_size != UINT32_MAX) return; if (!node) return; CompilerType node_type(node->GetCompilerType()); uint64_t bit_offset; if (node_type.GetIndexOfFieldWithName("__value_", nullptr, &bit_offset) != UINT32_MAX) { m_skip_size = bit_offset / 8u; } else { ClangASTContext *ast_ctx = llvm::dyn_cast_or_null(node_type.GetTypeSystem()); if (!ast_ctx) return; CompilerType tree_node_type = ast_ctx->CreateStructForIdentifier( ConstString(), {{"ptr0", ast_ctx->GetBasicType(lldb::eBasicTypeVoid).GetPointerType()}, {"ptr1", ast_ctx->GetBasicType(lldb::eBasicTypeVoid).GetPointerType()}, {"ptr2", ast_ctx->GetBasicType(lldb::eBasicTypeVoid).GetPointerType()}, {"cw", ast_ctx->GetBasicType(lldb::eBasicTypeBool)}, {"payload", (m_element_type.GetCompleteType(), m_element_type)}}); std::string child_name; uint32_t child_byte_size; int32_t child_byte_offset = 0; uint32_t child_bitfield_bit_size; uint32_t child_bitfield_bit_offset; bool child_is_base_class; bool child_is_deref_of_parent; uint64_t language_flags; if (tree_node_type .GetChildCompilerTypeAtIndex( nullptr, 4, true, true, true, 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, nullptr, language_flags) .IsValid()) m_skip_size = (uint32_t)child_byte_offset; } } lldb::ValueObjectSP lldb_private::formatters::LibcxxStdMapSyntheticFrontEnd::GetChildAtIndex( size_t idx) { static ConstString g___cc("__cc"); static ConstString g___nc("__nc"); static ConstString g___value_("__value_"); if (idx >= CalculateNumChildren()) return lldb::ValueObjectSP(); if (m_tree == nullptr || m_root_node == nullptr) return lldb::ValueObjectSP(); MapIterator iterator(m_root_node, CalculateNumChildren()); const bool need_to_skip = (idx > 0); size_t actual_advancde = idx; if (need_to_skip) { auto cached_iterator = m_iterators.find(idx - 1); if (cached_iterator != m_iterators.end()) { iterator = cached_iterator->second; actual_advancde = 1; } } ValueObjectSP iterated_sp(iterator.advance(actual_advancde)); if (!iterated_sp) { // this tree is garbage - stop m_tree = nullptr; // this will stop all future searches until an Update() happens return iterated_sp; } if (GetDataType()) { if (!need_to_skip) { Error error; iterated_sp = iterated_sp->Dereference(error); if (!iterated_sp || error.Fail()) { m_tree = nullptr; return lldb::ValueObjectSP(); } GetValueOffset(iterated_sp); auto child_sp = iterated_sp->GetChildMemberWithName(g___value_, true); if (child_sp) iterated_sp = child_sp; else iterated_sp = iterated_sp->GetSyntheticChildAtOffset( m_skip_size, m_element_type, true); if (!iterated_sp) { m_tree = nullptr; return lldb::ValueObjectSP(); } } else { // because of the way our debug info is made, we need to read item 0 first // so that we can cache information used to generate other elements if (m_skip_size == UINT32_MAX) GetChildAtIndex(0); if (m_skip_size == UINT32_MAX) { m_tree = nullptr; return lldb::ValueObjectSP(); } iterated_sp = iterated_sp->GetSyntheticChildAtOffset( m_skip_size, m_element_type, true); if (!iterated_sp) { m_tree = nullptr; return lldb::ValueObjectSP(); } } } else { m_tree = nullptr; return lldb::ValueObjectSP(); } // at this point we have a valid // we need to copy current_sp into a new object otherwise we will end up with // all items named __value_ DataExtractor data; Error error; iterated_sp->GetData(data, error); if (error.Fail()) { m_tree = nullptr; return lldb::ValueObjectSP(); } StreamString name; name.Printf("[%" PRIu64 "]", (uint64_t)idx); auto potential_child_sp = CreateValueObjectFromData( name.GetString(), data, m_backend.GetExecutionContextRef(), m_element_type); if (potential_child_sp) { switch (potential_child_sp->GetNumChildren()) { case 1: { auto child0_sp = potential_child_sp->GetChildAtIndex(0, true); if (child0_sp && child0_sp->GetName() == g___cc) potential_child_sp = child0_sp->Clone(ConstString(name.GetString())); break; } case 2: { auto child0_sp = potential_child_sp->GetChildAtIndex(0, true); auto child1_sp = potential_child_sp->GetChildAtIndex(1, true); if (child0_sp && child0_sp->GetName() == g___cc && child1_sp && child1_sp->GetName() == g___nc) potential_child_sp = child0_sp->Clone(ConstString(name.GetString())); break; } } } m_iterators[idx] = iterator; return potential_child_sp; } bool lldb_private::formatters::LibcxxStdMapSyntheticFrontEnd::Update() { static ConstString g___tree_("__tree_"); static ConstString g___begin_node_("__begin_node_"); m_count = UINT32_MAX; m_tree = m_root_node = nullptr; m_iterators.clear(); m_tree = m_backend.GetChildMemberWithName(g___tree_, true).get(); if (!m_tree) return false; m_root_node = m_tree->GetChildMemberWithName(g___begin_node_, true).get(); return false; } bool lldb_private::formatters::LibcxxStdMapSyntheticFrontEnd:: MightHaveChildren() { return true; } size_t lldb_private::formatters::LibcxxStdMapSyntheticFrontEnd:: GetIndexOfChildWithName(const ConstString &name) { return ExtractIndexFromString(name.GetCString()); } SyntheticChildrenFrontEnd * lldb_private::formatters::LibcxxStdMapSyntheticFrontEndCreator( CXXSyntheticChildren *, lldb::ValueObjectSP valobj_sp) { return (valobj_sp ? new LibcxxStdMapSyntheticFrontEnd(valobj_sp) : nullptr); } Index: vendor/lldb/dist/source/Plugins/Language/CPlusPlus/LibCxxUnorderedMap.cpp =================================================================== --- vendor/lldb/dist/source/Plugins/Language/CPlusPlus/LibCxxUnorderedMap.cpp (revision 317691) +++ vendor/lldb/dist/source/Plugins/Language/CPlusPlus/LibCxxUnorderedMap.cpp (revision 317692) @@ -1,189 +1,227 @@ //===-- LibCxxUnorderedMap.cpp ----------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // C Includes // C++ Includes // Other libraries and framework includes // Project includes #include "LibCxx.h" #include "lldb/Core/ValueObject.h" #include "lldb/Core/ValueObjectConstResult.h" #include "lldb/DataFormatters/FormattersHelpers.h" #include "lldb/Symbol/ClangASTContext.h" #include "lldb/Target/Target.h" #include "lldb/Utility/DataBufferHeap.h" #include "lldb/Utility/Endian.h" #include "lldb/Utility/Error.h" #include "lldb/Utility/Stream.h" using namespace lldb; using namespace lldb_private; using namespace lldb_private::formatters; namespace lldb_private { namespace formatters { class LibcxxStdUnorderedMapSyntheticFrontEnd : public SyntheticChildrenFrontEnd { public: LibcxxStdUnorderedMapSyntheticFrontEnd(lldb::ValueObjectSP valobj_sp); ~LibcxxStdUnorderedMapSyntheticFrontEnd() override = default; size_t CalculateNumChildren() override; lldb::ValueObjectSP GetChildAtIndex(size_t idx) override; bool Update() override; bool MightHaveChildren() override; size_t GetIndexOfChildWithName(const ConstString &name) override; private: CompilerType m_element_type; CompilerType m_node_type; ValueObject *m_tree; size_t m_num_elements; ValueObject *m_next_element; std::vector> m_elements_cache; }; } // namespace formatters } // namespace lldb_private lldb_private::formatters::LibcxxStdUnorderedMapSyntheticFrontEnd:: LibcxxStdUnorderedMapSyntheticFrontEnd(lldb::ValueObjectSP valobj_sp) : SyntheticChildrenFrontEnd(*valobj_sp), m_element_type(), m_tree(nullptr), m_num_elements(0), m_next_element(nullptr), m_elements_cache() { if (valobj_sp) Update(); } size_t lldb_private::formatters::LibcxxStdUnorderedMapSyntheticFrontEnd:: CalculateNumChildren() { if (m_num_elements != UINT32_MAX) return m_num_elements; return 0; } lldb::ValueObjectSP lldb_private::formatters:: LibcxxStdUnorderedMapSyntheticFrontEnd::GetChildAtIndex(size_t idx) { if (idx >= CalculateNumChildren()) return lldb::ValueObjectSP(); if (m_tree == nullptr) return lldb::ValueObjectSP(); while (idx >= m_elements_cache.size()) { if (m_next_element == nullptr) return lldb::ValueObjectSP(); Error error; ValueObjectSP node_sp = m_next_element->Dereference(error); if (!node_sp || error.Fail()) return lldb::ValueObjectSP(); ValueObjectSP value_sp = node_sp->GetChildMemberWithName(ConstString("__value_"), true); ValueObjectSP hash_sp = node_sp->GetChildMemberWithName(ConstString("__hash_"), true); if (!hash_sp || !value_sp) { if (!m_element_type) { - auto first_sp = m_backend.GetChildAtNamePath({ConstString("__table_"), - ConstString("__p1_"), - ConstString("__first_")}); + auto p1_sp = m_backend.GetChildAtNamePath({ConstString("__table_"), + ConstString("__p1_")}); + if (!p1_sp) + return nullptr; + + ValueObjectSP first_sp = nullptr; + switch (p1_sp->GetCompilerType().GetNumDirectBaseClasses()) { + case 1: + // Assume a pre llvm r300140 __compressed_pair implementation: + first_sp = p1_sp->GetChildMemberWithName(ConstString("__first_"), + true); + break; + case 2: { + // Assume a post llvm r300140 __compressed_pair implementation: + ValueObjectSP first_elem_parent_sp = + p1_sp->GetChildAtIndex(0, true); + first_sp = p1_sp->GetChildMemberWithName(ConstString("__value_"), + true); + break; + } + default: + return nullptr; + } + if (!first_sp) return nullptr; m_element_type = first_sp->GetCompilerType(); lldb::TemplateArgumentKind kind; m_element_type = m_element_type.GetTemplateArgument(0, kind); m_element_type = m_element_type.GetPointeeType(); m_node_type = m_element_type; m_element_type = m_element_type.GetTemplateArgument(0, kind); std::string name; m_element_type = m_element_type.GetFieldAtIndex(0, name, nullptr, nullptr, nullptr); m_element_type = m_element_type.GetTypedefedType(); } if (!m_node_type) return nullptr; node_sp = node_sp->Cast(m_node_type); value_sp = node_sp->GetChildMemberWithName(ConstString("__value_"), true); hash_sp = node_sp->GetChildMemberWithName(ConstString("__hash_"), true); if (!value_sp || !hash_sp) return nullptr; } m_elements_cache.push_back( {value_sp.get(), hash_sp->GetValueAsUnsigned(0)}); m_next_element = node_sp->GetChildMemberWithName(ConstString("__next_"), true).get(); if (!m_next_element || m_next_element->GetValueAsUnsigned(0) == 0) m_next_element = nullptr; } std::pair val_hash = m_elements_cache[idx]; if (!val_hash.first) return lldb::ValueObjectSP(); StreamString stream; stream.Printf("[%" PRIu64 "]", (uint64_t)idx); DataExtractor data; Error error; val_hash.first->GetData(data, error); if (error.Fail()) return lldb::ValueObjectSP(); const bool thread_and_frame_only_if_stopped = true; ExecutionContext exe_ctx = val_hash.first->GetExecutionContextRef().Lock( thread_and_frame_only_if_stopped); return CreateValueObjectFromData(stream.GetString(), data, exe_ctx, val_hash.first->GetCompilerType()); } bool lldb_private::formatters::LibcxxStdUnorderedMapSyntheticFrontEnd:: Update() { m_num_elements = UINT32_MAX; m_next_element = nullptr; m_elements_cache.clear(); ValueObjectSP table_sp = m_backend.GetChildMemberWithName(ConstString("__table_"), true); if (!table_sp) return false; - ValueObjectSP num_elements_sp = table_sp->GetChildAtNamePath( - {ConstString("__p2_"), ConstString("__first_")}); + + ValueObjectSP p2_sp = table_sp->GetChildMemberWithName( + ConstString("__p2_"), true); + ValueObjectSP num_elements_sp = nullptr; + llvm::SmallVector next_path; + switch (p2_sp->GetCompilerType().GetNumDirectBaseClasses()) { + case 1: + // Assume a pre llvm r300140 __compressed_pair implementation: + num_elements_sp = p2_sp->GetChildMemberWithName( + ConstString("__first_"), true); + next_path.append({ConstString("__p1_"), ConstString("__first_"), + ConstString("__next_")}); + break; + case 2: { + // Assume a post llvm r300140 __compressed_pair implementation: + ValueObjectSP first_elem_parent = p2_sp->GetChildAtIndex(0, true); + num_elements_sp = first_elem_parent->GetChildMemberWithName( + ConstString("__value_"), true); + next_path.append({ConstString("__p1_"), ConstString("__value_"), + ConstString("__next_")}); + break; + } + default: + return false; + } + if (!num_elements_sp) return false; m_num_elements = num_elements_sp->GetValueAsUnsigned(0); - m_tree = - table_sp - ->GetChildAtNamePath({ConstString("__p1_"), ConstString("__first_"), - ConstString("__next_")}) - .get(); + m_tree = table_sp->GetChildAtNamePath(next_path).get(); if (m_num_elements > 0) m_next_element = - table_sp - ->GetChildAtNamePath({ConstString("__p1_"), ConstString("__first_"), - ConstString("__next_")}) - .get(); + table_sp->GetChildAtNamePath(next_path).get(); return false; } bool lldb_private::formatters::LibcxxStdUnorderedMapSyntheticFrontEnd:: MightHaveChildren() { return true; } size_t lldb_private::formatters::LibcxxStdUnorderedMapSyntheticFrontEnd:: GetIndexOfChildWithName(const ConstString &name) { return ExtractIndexFromString(name.GetCString()); } SyntheticChildrenFrontEnd * lldb_private::formatters::LibcxxStdUnorderedMapSyntheticFrontEndCreator( CXXSyntheticChildren *, lldb::ValueObjectSP valobj_sp) { return (valobj_sp ? new LibcxxStdUnorderedMapSyntheticFrontEnd(valobj_sp) : nullptr); } Index: vendor/lldb/dist/source/Plugins/Language/CPlusPlus/LibCxxVector.cpp =================================================================== --- vendor/lldb/dist/source/Plugins/Language/CPlusPlus/LibCxxVector.cpp (revision 317691) +++ vendor/lldb/dist/source/Plugins/Language/CPlusPlus/LibCxxVector.cpp (revision 317692) @@ -1,281 +1,298 @@ //===-- LibCxxVector.cpp ----------------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // C Includes // C++ Includes // Other libraries and framework includes // Project includes #include "LibCxx.h" #include "lldb/Core/ValueObject.h" #include "lldb/DataFormatters/FormattersHelpers.h" #include "lldb/Utility/ConstString.h" using namespace lldb; using namespace lldb_private; using namespace lldb_private::formatters; namespace lldb_private { namespace formatters { class LibcxxStdVectorSyntheticFrontEnd : public SyntheticChildrenFrontEnd { public: LibcxxStdVectorSyntheticFrontEnd(lldb::ValueObjectSP valobj_sp); ~LibcxxStdVectorSyntheticFrontEnd() override; size_t CalculateNumChildren() override; lldb::ValueObjectSP GetChildAtIndex(size_t idx) override; bool Update() override; bool MightHaveChildren() override; size_t GetIndexOfChildWithName(const ConstString &name) override; private: ValueObject *m_start; ValueObject *m_finish; CompilerType m_element_type; uint32_t m_element_size; }; class LibcxxVectorBoolSyntheticFrontEnd : public SyntheticChildrenFrontEnd { public: LibcxxVectorBoolSyntheticFrontEnd(lldb::ValueObjectSP valobj_sp); size_t CalculateNumChildren() override; lldb::ValueObjectSP GetChildAtIndex(size_t idx) override; bool Update() override; bool MightHaveChildren() override { return true; } size_t GetIndexOfChildWithName(const ConstString &name) override; private: CompilerType m_bool_type; ExecutionContextRef m_exe_ctx_ref; uint64_t m_count; lldb::addr_t m_base_data_address; std::map m_children; }; } // namespace formatters } // namespace lldb_private lldb_private::formatters::LibcxxStdVectorSyntheticFrontEnd:: LibcxxStdVectorSyntheticFrontEnd(lldb::ValueObjectSP valobj_sp) : SyntheticChildrenFrontEnd(*valobj_sp), m_start(nullptr), m_finish(nullptr), m_element_type(), m_element_size(0) { if (valobj_sp) Update(); } lldb_private::formatters::LibcxxStdVectorSyntheticFrontEnd:: ~LibcxxStdVectorSyntheticFrontEnd() { // these need to stay around because they are child objects who will follow // their parent's life cycle // delete m_start; // delete m_finish; } size_t lldb_private::formatters::LibcxxStdVectorSyntheticFrontEnd:: CalculateNumChildren() { if (!m_start || !m_finish) return 0; uint64_t start_val = m_start->GetValueAsUnsigned(0); uint64_t finish_val = m_finish->GetValueAsUnsigned(0); if (start_val == 0 || finish_val == 0) return 0; if (start_val >= finish_val) return 0; size_t num_children = (finish_val - start_val); if (num_children % m_element_size) return 0; return num_children / m_element_size; } lldb::ValueObjectSP lldb_private::formatters::LibcxxStdVectorSyntheticFrontEnd::GetChildAtIndex( size_t idx) { if (!m_start || !m_finish) return lldb::ValueObjectSP(); uint64_t offset = idx * m_element_size; offset = offset + m_start->GetValueAsUnsigned(0); StreamString name; name.Printf("[%" PRIu64 "]", (uint64_t)idx); return CreateValueObjectFromAddress(name.GetString(), offset, m_backend.GetExecutionContextRef(), m_element_type); } bool lldb_private::formatters::LibcxxStdVectorSyntheticFrontEnd::Update() { m_start = m_finish = nullptr; ValueObjectSP data_type_finder_sp( m_backend.GetChildMemberWithName(ConstString("__end_cap_"), true)); if (!data_type_finder_sp) return false; - data_type_finder_sp = data_type_finder_sp->GetChildMemberWithName( + + switch (data_type_finder_sp->GetCompilerType().GetNumDirectBaseClasses()) { + case 1: + // Assume a pre llvm r300140 __compressed_pair implementation: + data_type_finder_sp = data_type_finder_sp->GetChildMemberWithName( ConstString("__first_"), true); + break; + case 2: { + // Assume a post llvm r300140 __compressed_pair implementation: + ValueObjectSP first_elem_parent_sp = + data_type_finder_sp->GetChildAtIndex(0, true); + data_type_finder_sp = first_elem_parent_sp->GetChildMemberWithName( + ConstString("__value_"), true); + break; + } + default: + return false; + } + if (!data_type_finder_sp) return false; m_element_type = data_type_finder_sp->GetCompilerType().GetPointeeType(); m_element_size = m_element_type.GetByteSize(nullptr); if (m_element_size > 0) { // store raw pointers or end up with a circular dependency m_start = m_backend.GetChildMemberWithName(ConstString("__begin_"), true).get(); m_finish = m_backend.GetChildMemberWithName(ConstString("__end_"), true).get(); } return false; } bool lldb_private::formatters::LibcxxStdVectorSyntheticFrontEnd:: MightHaveChildren() { return true; } size_t lldb_private::formatters::LibcxxStdVectorSyntheticFrontEnd:: GetIndexOfChildWithName(const ConstString &name) { if (!m_start || !m_finish) return UINT32_MAX; return ExtractIndexFromString(name.GetCString()); } lldb_private::formatters::LibcxxVectorBoolSyntheticFrontEnd:: LibcxxVectorBoolSyntheticFrontEnd(lldb::ValueObjectSP valobj_sp) : SyntheticChildrenFrontEnd(*valobj_sp), m_bool_type(), m_exe_ctx_ref(), m_count(0), m_base_data_address(0), m_children() { if (valobj_sp) { Update(); m_bool_type = valobj_sp->GetCompilerType().GetBasicTypeFromAST(lldb::eBasicTypeBool); } } size_t lldb_private::formatters::LibcxxVectorBoolSyntheticFrontEnd:: CalculateNumChildren() { return m_count; } lldb::ValueObjectSP lldb_private::formatters::LibcxxVectorBoolSyntheticFrontEnd::GetChildAtIndex( size_t idx) { auto iter = m_children.find(idx), end = m_children.end(); if (iter != end) return iter->second; if (idx >= m_count) return ValueObjectSP(); if (m_base_data_address == 0 || m_count == 0) return ValueObjectSP(); if (!m_bool_type) return ValueObjectSP(); size_t byte_idx = (idx >> 3); // divide by 8 to get byte index size_t bit_index = (idx & 7); // efficient idx % 8 for bit index lldb::addr_t byte_location = m_base_data_address + byte_idx; ProcessSP process_sp(m_exe_ctx_ref.GetProcessSP()); if (!process_sp) return ValueObjectSP(); uint8_t byte = 0; uint8_t mask = 0; Error err; size_t bytes_read = process_sp->ReadMemory(byte_location, &byte, 1, err); if (err.Fail() || bytes_read == 0) return ValueObjectSP(); mask = 1 << bit_index; bool bit_set = ((byte & mask) != 0); DataBufferSP buffer_sp( new DataBufferHeap(m_bool_type.GetByteSize(nullptr), 0)); if (bit_set && buffer_sp && buffer_sp->GetBytes()) { // regardless of endianness, anything non-zero is true *(buffer_sp->GetBytes()) = 1; } StreamString name; name.Printf("[%" PRIu64 "]", (uint64_t)idx); ValueObjectSP retval_sp(CreateValueObjectFromData( name.GetString(), DataExtractor(buffer_sp, process_sp->GetByteOrder(), process_sp->GetAddressByteSize()), m_exe_ctx_ref, m_bool_type)); if (retval_sp) m_children[idx] = retval_sp; return retval_sp; } /*(std::__1::vector >) vBool = { __begin_ = 0x00000001001000e0 __size_ = 56 __cap_alloc_ = { std::__1::__libcpp_compressed_pair_imp > = { __first_ = 1 } } }*/ bool lldb_private::formatters::LibcxxVectorBoolSyntheticFrontEnd::Update() { m_children.clear(); ValueObjectSP valobj_sp = m_backend.GetSP(); if (!valobj_sp) return false; m_exe_ctx_ref = valobj_sp->GetExecutionContextRef(); ValueObjectSP size_sp( valobj_sp->GetChildMemberWithName(ConstString("__size_"), true)); if (!size_sp) return false; m_count = size_sp->GetValueAsUnsigned(0); if (!m_count) return true; ValueObjectSP begin_sp( valobj_sp->GetChildMemberWithName(ConstString("__begin_"), true)); if (!begin_sp) { m_count = 0; return false; } m_base_data_address = begin_sp->GetValueAsUnsigned(0); if (!m_base_data_address) { m_count = 0; return false; } return false; } size_t lldb_private::formatters::LibcxxVectorBoolSyntheticFrontEnd:: GetIndexOfChildWithName(const ConstString &name) { if (!m_count || !m_base_data_address) return UINT32_MAX; const char *item_name = name.GetCString(); uint32_t idx = ExtractIndexFromString(item_name); if (idx < UINT32_MAX && idx >= CalculateNumChildren()) return UINT32_MAX; return idx; } lldb_private::SyntheticChildrenFrontEnd * lldb_private::formatters::LibcxxStdVectorSyntheticFrontEndCreator( CXXSyntheticChildren *, lldb::ValueObjectSP valobj_sp) { if (!valobj_sp) return nullptr; CompilerType type = valobj_sp->GetCompilerType(); if (!type.IsValid() || type.GetNumTemplateArguments() == 0) return nullptr; TemplateArgumentKind kind; CompilerType arg_type = type.GetTemplateArgument(0, kind); if (arg_type.GetTypeName() == ConstString("bool")) return new LibcxxVectorBoolSyntheticFrontEnd(valobj_sp); return new LibcxxStdVectorSyntheticFrontEnd(valobj_sp); } Index: vendor/lldb/dist/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCDeclVendor.cpp =================================================================== --- vendor/lldb/dist/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCDeclVendor.cpp (revision 317691) +++ vendor/lldb/dist/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCDeclVendor.cpp (revision 317692) @@ -1,650 +1,655 @@ //===-- AppleObjCDeclVendor.cpp ---------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #include "AppleObjCDeclVendor.h" #include "Plugins/ExpressionParser/Clang/ASTDumper.h" #include "lldb/Core/Module.h" #include "lldb/Symbol/ClangExternalASTSourceCommon.h" #include "lldb/Symbol/ClangUtil.h" #include "lldb/Target/ObjCLanguageRuntime.h" #include "lldb/Target/Process.h" #include "lldb/Target/Target.h" #include "lldb/Utility/Log.h" #include "clang/AST/ASTContext.h" #include "clang/AST/DeclObjC.h" using namespace lldb_private; class lldb_private::AppleObjCExternalASTSource : public ClangExternalASTSourceCommon { public: AppleObjCExternalASTSource(AppleObjCDeclVendor &decl_vendor) : m_decl_vendor(decl_vendor) {} bool FindExternalVisibleDeclsByName(const clang::DeclContext *decl_ctx, clang::DeclarationName name) override { 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("AppleObjCExternalASTSource::FindExternalVisibleDeclsByName[%" "u] on (ASTContext*)%p Looking for %s in (%sDecl*)%p", current_id, static_cast(&decl_ctx->getParentASTContext()), name.getAsString().c_str(), decl_ctx->getDeclKindName(), static_cast(decl_ctx)); } do { const clang::ObjCInterfaceDecl *interface_decl = llvm::dyn_cast(decl_ctx); if (!interface_decl) break; clang::ObjCInterfaceDecl *non_const_interface_decl = const_cast(interface_decl); if (!m_decl_vendor.FinishDecl(non_const_interface_decl)) break; clang::DeclContext::lookup_result result = non_const_interface_decl->lookup(name); return (result.size() != 0); } while (0); SetNoExternalVisibleDeclsForName(decl_ctx, name); return false; } void CompleteType(clang::TagDecl *tag_decl) override { 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("AppleObjCExternalASTSource::CompleteType[%u] on " "(ASTContext*)%p Completing (TagDecl*)%p named %s", current_id, static_cast(&tag_decl->getASTContext()), static_cast(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] "); } if (log) { log->Printf(" AOEAS::CT[%u] After:", current_id); ASTDumper dumper((clang::Decl *)tag_decl); dumper.ToLog(log, " [CT] "); } return; } void CompleteType(clang::ObjCInterfaceDecl *interface_decl) override { 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("AppleObjCExternalASTSource::CompleteType[%u] on " "(ASTContext*)%p Completing (ObjCInterfaceDecl*)%p named %s", current_id, static_cast(&interface_decl->getASTContext()), static_cast(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] "); } m_decl_vendor.FinishDecl(interface_decl); if (log) { log->Printf(" [CT] After:"); ASTDumper dumper((clang::Decl *)interface_decl); dumper.ToLog(log, " [CT] "); } return; } bool layoutRecordType( const clang::RecordDecl *Record, uint64_t &Size, uint64_t &Alignment, llvm::DenseMap &FieldOffsets, llvm::DenseMap &BaseOffsets, llvm::DenseMap &VirtualBaseOffsets) override { return false; } void StartTranslationUnit(clang::ASTConsumer *Consumer) override { clang::TranslationUnitDecl *translation_unit_decl = m_decl_vendor.m_ast_ctx.getASTContext()->getTranslationUnitDecl(); translation_unit_decl->setHasExternalVisibleStorage(); translation_unit_decl->setHasExternalLexicalStorage(); } private: AppleObjCDeclVendor &m_decl_vendor; }; AppleObjCDeclVendor::AppleObjCDeclVendor(ObjCLanguageRuntime &runtime) : DeclVendor(), m_runtime(runtime), m_ast_ctx(runtime.GetProcess() ->GetTarget() .GetArchitecture() .GetTriple() .getTriple() .c_str()), m_type_realizer_sp(m_runtime.GetEncodingToType()) { m_external_source = new AppleObjCExternalASTSource(*this); llvm::IntrusiveRefCntPtr external_source_owning_ptr( m_external_source); m_ast_ctx.getASTContext()->setExternalSource(external_source_owning_ptr); } clang::ObjCInterfaceDecl * AppleObjCDeclVendor::GetDeclForISA(ObjCLanguageRuntime::ObjCISA isa) { ISAToInterfaceMap::const_iterator iter = m_isa_to_interface.find(isa); if (iter != m_isa_to_interface.end()) return iter->second; clang::ASTContext *ast_ctx = m_ast_ctx.getASTContext(); ObjCLanguageRuntime::ClassDescriptorSP descriptor = m_runtime.GetClassDescriptorFromISA(isa); if (!descriptor) return NULL; const ConstString &name(descriptor->GetClassName()); clang::IdentifierInfo &identifier_info = ast_ctx->Idents.get(name.GetStringRef()); clang::ObjCInterfaceDecl *new_iface_decl = clang::ObjCInterfaceDecl::Create( *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); new_iface_decl->setHasExternalVisibleStorage(); new_iface_decl->setHasExternalLexicalStorage(); ast_ctx->getTranslationUnitDecl()->addDecl(new_iface_decl); m_isa_to_interface[isa] = new_iface_decl; return new_iface_decl; } class ObjCRuntimeMethodType { public: ObjCRuntimeMethodType(const char *types) : m_is_valid(false) { const char *cursor = types; enum ParserState { Start = 0, InType, InPos } state = Start; const char *type = NULL; int brace_depth = 0; uint32_t stepsLeft = 256; while (1) { if (--stepsLeft == 0) { m_is_valid = false; return; } switch (state) { case Start: { switch (*cursor) { default: state = InType; type = cursor; break; case '\0': m_is_valid = true; return; case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': m_is_valid = false; return; } } break; case InType: { switch (*cursor) { default: ++cursor; break; case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': if (!brace_depth) { state = InPos; if (type) { m_type_vector.push_back(std::string(type, (cursor - type))); } else { m_is_valid = false; return; } type = NULL; } else { ++cursor; } break; case '[': case '{': case '(': ++brace_depth; ++cursor; break; case ']': case '}': case ')': if (!brace_depth) { m_is_valid = false; return; } --brace_depth; ++cursor; break; case '\0': m_is_valid = false; return; } } break; case InPos: { switch (*cursor) { default: state = InType; type = cursor; break; case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': ++cursor; break; case '\0': m_is_valid = true; return; } } break; } } } clang::ObjCMethodDecl * BuildMethod(clang::ObjCInterfaceDecl *interface_decl, const char *name, bool instance, ObjCLanguageRuntime::EncodingToTypeSP type_realizer_sp) { if (!m_is_valid || m_type_vector.size() < 3) return NULL; clang::ASTContext &ast_ctx(interface_decl->getASTContext()); clang::QualType return_qual_type; const bool isInstance = instance; 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; const bool for_expression = true; std::vector selector_components; const char *name_cursor = name; bool is_zero_argument = true; while (*name_cursor != '\0') { const char *colon_loc = strchr(name_cursor, ':'); if (!colon_loc) { selector_components.push_back( &ast_ctx.Idents.get(llvm::StringRef(name_cursor))); break; } else { is_zero_argument = false; selector_components.push_back(&ast_ctx.Idents.get( llvm::StringRef(name_cursor, colon_loc - name_cursor))); name_cursor = colon_loc + 1; } } + clang::IdentifierInfo **identifier_infos = selector_components.data(); + if (!identifier_infos) { + return NULL; + } + clang::Selector sel = ast_ctx.Selectors.getSelector( is_zero_argument ? 0 : selector_components.size(), - selector_components.data()); + identifier_infos); clang::QualType ret_type = ClangUtil::GetQualType(type_realizer_sp->RealizeType( interface_decl->getASTContext(), m_type_vector[0].c_str(), for_expression)); if (ret_type.isNull()) return NULL; clang::ObjCMethodDecl *ret = clang::ObjCMethodDecl::Create( ast_ctx, clang::SourceLocation(), clang::SourceLocation(), sel, ret_type, NULL, interface_decl, isInstance, isVariadic, isSynthesized, isImplicitlyDeclared, isDefined, impControl, HasRelatedResultType); std::vector parm_vars; for (size_t ai = 3, ae = m_type_vector.size(); ai != ae; ++ai) { 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)); if (arg_type.isNull()) return NULL; // well, we just wasted a bunch of time. Wish we could // delete the stuff we'd just made! parm_vars.push_back(clang::ParmVarDecl::Create( ast_ctx, ret, clang::SourceLocation(), clang::SourceLocation(), NULL, arg_type, NULL, clang::SC_None, NULL)); } ret->setMethodParams(ast_ctx, llvm::ArrayRef(parm_vars), llvm::ArrayRef()); return ret; } explicit operator bool() { return m_is_valid; } size_t GetNumTypes() { return m_type_vector.size(); } const char *GetTypeAtIndex(size_t idx) { return m_type_vector[idx].c_str(); } private: typedef std::vector TypeVector; TypeVector m_type_vector; bool m_is_valid; }; bool AppleObjCDeclVendor::FinishDecl(clang::ObjCInterfaceDecl *interface_decl) { Log *log(GetLogIfAllCategoriesSet( LIBLLDB_LOG_EXPRESSIONS)); // FIXME - a more appropriate log channel? ClangASTMetadata *metadata = m_external_source->GetMetadata(interface_decl); ObjCLanguageRuntime::ObjCISA objc_isa = 0; if (metadata) objc_isa = metadata->GetISAPtr(); if (!objc_isa) return false; if (!interface_decl->hasExternalVisibleStorage()) return true; interface_decl->startDefinition(); interface_decl->setHasExternalVisibleStorage(false); interface_decl->setHasExternalLexicalStorage(false); ObjCLanguageRuntime::ClassDescriptorSP descriptor = m_runtime.GetClassDescriptorFromISA(objc_isa); if (!descriptor) return false; auto superclass_func = [interface_decl, this](ObjCLanguageRuntime::ObjCISA isa) { clang::ObjCInterfaceDecl *superclass_decl = GetDeclForISA(isa); if (!superclass_decl) return; FinishDecl(superclass_decl); clang::ASTContext *context = m_ast_ctx.getASTContext(); interface_decl->setSuperClass(context->getTrivialTypeSourceInfo( context->getObjCInterfaceType(superclass_decl))); }; auto instance_method_func = [log, interface_decl, this](const char *name, const char *types) -> bool { if (!name || !types) return false; // skip this one ObjCRuntimeMethodType method_type(types); clang::ObjCMethodDecl *method_decl = method_type.BuildMethod(interface_decl, name, true, m_type_realizer_sp); if (log) log->Printf("[ AOTV::FD] Instance method [%s] [%s]", name, types); if (method_decl) interface_decl->addDecl(method_decl); return false; }; auto class_method_func = [log, interface_decl, this](const char *name, const char *types) -> bool { if (!name || !types) return false; // skip this one ObjCRuntimeMethodType method_type(types); clang::ObjCMethodDecl *method_decl = method_type.BuildMethod( interface_decl, name, false, m_type_realizer_sp); if (log) log->Printf("[ AOTV::FD] Class method [%s] [%s]", name, types); if (method_decl) interface_decl->addDecl(method_decl); return false; }; auto ivar_func = [log, interface_decl, this](const char *name, const char *type, lldb::addr_t offset_ptr, uint64_t size) -> bool { if (!name || !type) return false; const bool for_expression = false; if (log) log->Printf( "[ 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); if (ivar_type.IsValid()) { 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), ClangUtil::GetQualType(ivar_type), type_source_info, // TypeSourceInfo * clang::ObjCIvarDecl::Public, 0, is_synthesized); if (ivar_decl) { interface_decl->addDecl(ivar_decl); } } return false; }; if (log) { ASTDumper method_dumper((clang::Decl *)interface_decl); log->Printf("[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( "[AppleObjCDeclVendor::FinishDecl] Finished Objective-C interface"); method_dumper.ToLog(log, " [AOTV::FD] "); } return true; } uint32_t AppleObjCDeclVendor::FindDecls(const ConstString &name, bool append, uint32_t max_matches, std::vector &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::FindTypes [%u] ('%s', %s, %u, )", current_id, (const char *)name.AsCString(), append ? "true" : "false", max_matches); if (!append) decls.clear(); uint32_t ret = 0; do { // See if the type is already in our ASTContext. clang::ASTContext *ast_ctx = m_ast_ctx.getASTContext(); clang::IdentifierInfo &identifier_info = ast_ctx->Idents.get(name.GetStringRef()); clang::DeclarationName decl_name = ast_ctx->DeclarationNames.getIdentifier(&identifier_info); clang::DeclContext::lookup_result lookup_result = ast_ctx->getTranslationUnitDecl()->lookup(decl_name); if (!lookup_result.empty()) { if (clang::ObjCInterfaceDecl *result_iface_decl = llvm::dyn_cast(lookup_result[0])) { if (log) { clang::QualType result_iface_type = ast_ctx->getObjCInterfaceType(result_iface_decl); ASTDumper dumper(result_iface_type); uint64_t isa_value = LLDB_INVALID_ADDRESS; ClangASTMetadata *metadata = m_external_source->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); } decls.push_back(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); break; } } else if (log) { log->Printf("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. ObjCLanguageRuntime::ObjCISA isa = m_runtime.GetISA(name); if (!isa) { if (log) log->Printf("AOCTV::FT [%u] Couldn't find the isa", current_id); break; } 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); 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); } decls.push_back(iface_decl); ret++; break; } while (0); return ret; } Index: vendor/lldb/dist/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp =================================================================== --- vendor/lldb/dist/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp (revision 317691) +++ vendor/lldb/dist/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp (revision 317692) @@ -1,521 +1,520 @@ //===-- ObjectContainerBSDArchive.cpp ---------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #include "ObjectContainerBSDArchive.h" #if defined(_WIN32) || defined(__ANDROID__) // Defines from ar, missing on Windows #define ARMAG "!\n" #define SARMAG 8 #define ARFMAG "`\n" typedef struct ar_hdr { char ar_name[16]; char ar_date[12]; char ar_uid[6], ar_gid[6]; char ar_mode[8]; char ar_size[10]; char ar_fmag[2]; } ar_hdr; #else #include #endif #include "lldb/Core/ArchSpec.h" #include "lldb/Core/Module.h" #include "lldb/Core/ModuleSpec.h" #include "lldb/Core/PluginManager.h" #include "lldb/Core/Timer.h" #include "lldb/Host/FileSystem.h" #include "lldb/Symbol/ObjectFile.h" #include "lldb/Utility/DataBufferLLVM.h" #include "lldb/Utility/Stream.h" #include "llvm/Support/MemoryBuffer.h" using namespace lldb; using namespace lldb_private; ObjectContainerBSDArchive::Object::Object() : ar_name(), ar_date(0), ar_uid(0), ar_gid(0), ar_mode(0), ar_size(0), ar_file_offset(0), ar_file_size(0) {} void ObjectContainerBSDArchive::Object::Clear() { ar_name.Clear(); ar_date = 0; ar_uid = 0; ar_gid = 0; ar_mode = 0; ar_size = 0; ar_file_offset = 0; ar_file_size = 0; } lldb::offset_t ObjectContainerBSDArchive::Object::Extract(const DataExtractor &data, lldb::offset_t offset) { size_t ar_name_len = 0; std::string str; char *err; // File header // // The common format is as follows. // // Offset Length Name Format // 0 16 File name ASCII right padded with spaces (no spaces // allowed in file name) // 16 12 File mod Decimal as cstring right padded with // spaces // 28 6 Owner ID Decimal as cstring right padded with // spaces // 34 6 Group ID Decimal as cstring right padded with // spaces // 40 8 File mode Octal as cstring right padded with // spaces // 48 10 File byte size Decimal as cstring right padded with // spaces // 58 2 File magic 0x60 0x0A // Make sure there is enough data for the file header and bail if not if (!data.ValidOffsetForDataOfSize(offset, 60)) return LLDB_INVALID_OFFSET; str.assign((const char *)data.GetData(&offset, 16), 16); if (str.find("#1/") == 0) { // If the name is longer than 16 bytes, or contains an embedded space // then it will use this format where the length of the name is // here and the name characters are after this header. ar_name_len = strtoul(str.c_str() + 3, &err, 10); } else { // Strip off any trailing spaces. const size_t last_pos = str.find_last_not_of(' '); if (last_pos != std::string::npos) { if (last_pos + 1 < 16) str.erase(last_pos + 1); } ar_name.SetCString(str.c_str()); } str.assign((const char *)data.GetData(&offset, 12), 12); ar_date = strtoul(str.c_str(), &err, 10); str.assign((const char *)data.GetData(&offset, 6), 6); ar_uid = strtoul(str.c_str(), &err, 10); str.assign((const char *)data.GetData(&offset, 6), 6); ar_gid = strtoul(str.c_str(), &err, 10); str.assign((const char *)data.GetData(&offset, 8), 8); ar_mode = strtoul(str.c_str(), &err, 8); str.assign((const char *)data.GetData(&offset, 10), 10); ar_size = strtoul(str.c_str(), &err, 10); str.assign((const char *)data.GetData(&offset, 2), 2); if (str == ARFMAG) { if (ar_name_len > 0) { const void *ar_name_ptr = data.GetData(&offset, ar_name_len); // Make sure there was enough data for the string value and bail if not if (ar_name_ptr == NULL) return LLDB_INVALID_OFFSET; str.assign((const char *)ar_name_ptr, ar_name_len); ar_name.SetCString(str.c_str()); } ar_file_offset = offset; ar_file_size = ar_size - ar_name_len; return offset; } return LLDB_INVALID_OFFSET; } ObjectContainerBSDArchive::Archive::Archive(const lldb_private::ArchSpec &arch, const llvm::sys::TimePoint<> &time, lldb::offset_t file_offset, lldb_private::DataExtractor &data) : m_arch(arch), m_time(time), m_file_offset(file_offset), m_objects(), m_data(data) {} ObjectContainerBSDArchive::Archive::~Archive() {} size_t ObjectContainerBSDArchive::Archive::ParseObjects() { DataExtractor &data = m_data; std::string str; lldb::offset_t offset = 0; str.assign((const char *)data.GetData(&offset, SARMAG), SARMAG); if (str == ARMAG) { Object obj; do { offset = obj.Extract(data, offset); if (offset == LLDB_INVALID_OFFSET) break; size_t obj_idx = m_objects.size(); m_objects.push_back(obj); // Insert all of the C strings out of order for now... - m_object_name_to_index_map.Append(obj.ar_name.GetStringRef(), obj_idx); + m_object_name_to_index_map.Append(obj.ar_name, obj_idx); offset += obj.ar_file_size; obj.Clear(); } while (data.ValidOffset(offset)); // Now sort all of the object name pointers m_object_name_to_index_map.Sort(); } return m_objects.size(); } ObjectContainerBSDArchive::Object * ObjectContainerBSDArchive::Archive::FindObject( const ConstString &object_name, const llvm::sys::TimePoint<> &object_mod_time) { const ObjectNameToIndexMap::Entry *match = - m_object_name_to_index_map.FindFirstValueForName( - object_name.GetStringRef()); + m_object_name_to_index_map.FindFirstValueForName(object_name); if (match) { if (object_mod_time != llvm::sys::TimePoint<>()) { const uint64_t object_date = llvm::sys::toTimeT(object_mod_time); if (m_objects[match->value].ar_date == object_date) return &m_objects[match->value]; const ObjectNameToIndexMap::Entry *next_match = m_object_name_to_index_map.FindNextValueForName(match); while (next_match) { if (m_objects[next_match->value].ar_date == object_date) return &m_objects[next_match->value]; next_match = m_object_name_to_index_map.FindNextValueForName(next_match); } } else { return &m_objects[match->value]; } } return NULL; } ObjectContainerBSDArchive::Archive::shared_ptr ObjectContainerBSDArchive::Archive::FindCachedArchive( const FileSpec &file, const ArchSpec &arch, const llvm::sys::TimePoint<> &time, lldb::offset_t file_offset) { std::lock_guard guard(Archive::GetArchiveCacheMutex()); shared_ptr archive_sp; Archive::Map &archive_map = Archive::GetArchiveCache(); Archive::Map::iterator pos = archive_map.find(file); // Don't cache a value for "archive_map.end()" below since we might // delete an archive entry... while (pos != archive_map.end() && pos->first == file) { bool match = true; if (arch.IsValid() && pos->second->GetArchitecture().IsCompatibleMatch(arch) == false) match = false; else if (file_offset != LLDB_INVALID_OFFSET && pos->second->GetFileOffset() != file_offset) match = false; if (match) { if (pos->second->GetModificationTime() == time) { return pos->second; } else { // We have a file at the same path with the same architecture // whose modification time doesn't match. It doesn't make sense // for us to continue to use this BSD archive since we cache only // the object info which consists of file time info and also the // file offset and file size of any contained objects. Since // this information is now out of date, we won't get the correct // information if we go and extract the file data, so we should // remove the old and outdated entry. archive_map.erase(pos); pos = archive_map.find(file); continue; // Continue to next iteration so we don't increment pos // below... } } ++pos; } return archive_sp; } ObjectContainerBSDArchive::Archive::shared_ptr ObjectContainerBSDArchive::Archive::ParseAndCacheArchiveForFile( const FileSpec &file, const ArchSpec &arch, const llvm::sys::TimePoint<> &time, lldb::offset_t file_offset, DataExtractor &data) { shared_ptr archive_sp(new Archive(arch, time, file_offset, data)); if (archive_sp) { const size_t num_objects = archive_sp->ParseObjects(); if (num_objects > 0) { std::lock_guard guard( Archive::GetArchiveCacheMutex()); Archive::GetArchiveCache().insert(std::make_pair(file, archive_sp)); } else { archive_sp.reset(); } } return archive_sp; } ObjectContainerBSDArchive::Archive::Map & ObjectContainerBSDArchive::Archive::GetArchiveCache() { static Archive::Map g_archive_map; return g_archive_map; } std::recursive_mutex & ObjectContainerBSDArchive::Archive::GetArchiveCacheMutex() { static std::recursive_mutex g_archive_map_mutex; return g_archive_map_mutex; } void ObjectContainerBSDArchive::Initialize() { PluginManager::RegisterPlugin(GetPluginNameStatic(), GetPluginDescriptionStatic(), CreateInstance, GetModuleSpecifications); } void ObjectContainerBSDArchive::Terminate() { PluginManager::UnregisterPlugin(CreateInstance); } lldb_private::ConstString ObjectContainerBSDArchive::GetPluginNameStatic() { static ConstString g_name("bsd-archive"); return g_name; } const char *ObjectContainerBSDArchive::GetPluginDescriptionStatic() { return "BSD Archive object container reader."; } ObjectContainer *ObjectContainerBSDArchive::CreateInstance( const lldb::ModuleSP &module_sp, DataBufferSP &data_sp, lldb::offset_t data_offset, const FileSpec *file, lldb::offset_t file_offset, lldb::offset_t length) { ConstString object_name(module_sp->GetObjectName()); if (!object_name) return nullptr; if (data_sp) { // We have data, which means this is the first 512 bytes of the file // Check to see if the magic bytes match and if they do, read the entire // table of contents for the archive and cache it DataExtractor data; data.SetData(data_sp, data_offset, length); if (file && data_sp && ObjectContainerBSDArchive::MagicBytesMatch(data)) { Timer scoped_timer( LLVM_PRETTY_FUNCTION, "ObjectContainerBSDArchive::CreateInstance (module = %s, file = " "%p, file_offset = 0x%8.8" PRIx64 ", file_size = 0x%8.8" PRIx64 ")", module_sp->GetFileSpec().GetPath().c_str(), static_cast(file), static_cast(file_offset), static_cast(length)); // Map the entire .a file to be sure that we don't lose any data if the // file gets updated by a new build while this .a file is being used for // debugging DataBufferSP archive_data_sp = DataBufferLLVM::CreateSliceFromPath(file->GetPath(), length, file_offset); if (!archive_data_sp) return nullptr; lldb::offset_t archive_data_offset = 0; Archive::shared_ptr archive_sp(Archive::FindCachedArchive( *file, module_sp->GetArchitecture(), module_sp->GetModificationTime(), file_offset)); std::unique_ptr container_ap( new ObjectContainerBSDArchive(module_sp, archive_data_sp, archive_data_offset, file, file_offset, length)); if (container_ap.get()) { if (archive_sp) { // We already have this archive in our cache, use it container_ap->SetArchive(archive_sp); return container_ap.release(); } else if (container_ap->ParseHeader()) return container_ap.release(); } } } else { // No data, just check for a cached archive Archive::shared_ptr archive_sp(Archive::FindCachedArchive( *file, module_sp->GetArchitecture(), module_sp->GetModificationTime(), file_offset)); if (archive_sp) { std::unique_ptr container_ap( new ObjectContainerBSDArchive(module_sp, data_sp, data_offset, file, file_offset, length)); if (container_ap.get()) { // We already have this archive in our cache, use it container_ap->SetArchive(archive_sp); return container_ap.release(); } } } return NULL; } bool ObjectContainerBSDArchive::MagicBytesMatch(const DataExtractor &data) { uint32_t offset = 0; const char *armag = (const char *)data.PeekData(offset, sizeof(ar_hdr)); if (armag && ::strncmp(armag, ARMAG, SARMAG) == 0) { armag += offsetof(struct ar_hdr, ar_fmag) + SARMAG; if (strncmp(armag, ARFMAG, 2) == 0) return true; } return false; } ObjectContainerBSDArchive::ObjectContainerBSDArchive( const lldb::ModuleSP &module_sp, DataBufferSP &data_sp, lldb::offset_t data_offset, const lldb_private::FileSpec *file, lldb::offset_t file_offset, lldb::offset_t size) : ObjectContainer(module_sp, file, file_offset, size, data_sp, data_offset), m_archive_sp() {} void ObjectContainerBSDArchive::SetArchive(Archive::shared_ptr &archive_sp) { m_archive_sp = archive_sp; } ObjectContainerBSDArchive::~ObjectContainerBSDArchive() {} bool ObjectContainerBSDArchive::ParseHeader() { if (m_archive_sp.get() == NULL) { if (m_data.GetByteSize() > 0) { ModuleSP module_sp(GetModule()); if (module_sp) { m_archive_sp = Archive::ParseAndCacheArchiveForFile( m_file, module_sp->GetArchitecture(), module_sp->GetModificationTime(), m_offset, m_data); } // Clear the m_data that contains the entire archive // data and let our m_archive_sp hold onto the data. m_data.Clear(); } } return m_archive_sp.get() != NULL; } void ObjectContainerBSDArchive::Dump(Stream *s) const { s->Printf("%p: ", static_cast(this)); s->Indent(); const size_t num_archs = GetNumArchitectures(); const size_t num_objects = GetNumObjects(); s->Printf("ObjectContainerBSDArchive, num_archs = %" PRIu64 ", num_objects = %" PRIu64 "", (uint64_t)num_archs, (uint64_t)num_objects); uint32_t i; ArchSpec arch; s->IndentMore(); for (i = 0; i < num_archs; i++) { s->Indent(); GetArchitectureAtIndex(i, arch); s->Printf("arch[%u] = %s\n", i, arch.GetArchitectureName()); } for (i = 0; i < num_objects; i++) { s->Indent(); s->Printf("object[%u] = %s\n", i, GetObjectNameAtIndex(i)); } s->IndentLess(); s->EOL(); } ObjectFileSP ObjectContainerBSDArchive::GetObjectFile(const FileSpec *file) { ModuleSP module_sp(GetModule()); if (module_sp) { if (module_sp->GetObjectName() && m_archive_sp) { Object *object = m_archive_sp->FindObject( module_sp->GetObjectName(), module_sp->GetObjectModificationTime()); if (object) { lldb::offset_t data_offset = object->ar_file_offset; return ObjectFile::FindPlugin( module_sp, file, m_offset + object->ar_file_offset, object->ar_file_size, m_archive_sp->GetData().GetSharedDataBuffer(), data_offset); } } } return ObjectFileSP(); } //------------------------------------------------------------------ // PluginInterface protocol //------------------------------------------------------------------ lldb_private::ConstString ObjectContainerBSDArchive::GetPluginName() { return GetPluginNameStatic(); } uint32_t ObjectContainerBSDArchive::GetPluginVersion() { return 1; } size_t ObjectContainerBSDArchive::GetModuleSpecifications( const lldb_private::FileSpec &file, lldb::DataBufferSP &data_sp, lldb::offset_t data_offset, lldb::offset_t file_offset, lldb::offset_t file_size, lldb_private::ModuleSpecList &specs) { // We have data, which means this is the first 512 bytes of the file // Check to see if the magic bytes match and if they do, read the entire // table of contents for the archive and cache it DataExtractor data; data.SetData(data_sp, data_offset, data_sp->GetByteSize()); if (!file || !data_sp || !ObjectContainerBSDArchive::MagicBytesMatch(data)) return 0; const size_t initial_count = specs.GetSize(); llvm::sys::TimePoint<> file_mod_time = FileSystem::GetModificationTime(file); Archive::shared_ptr archive_sp( Archive::FindCachedArchive(file, ArchSpec(), file_mod_time, file_offset)); bool set_archive_arch = false; if (!archive_sp) { set_archive_arch = true; data_sp = DataBufferLLVM::CreateSliceFromPath(file.GetPath(), file_size, file_offset); if (data_sp) { data.SetData(data_sp, 0, data_sp->GetByteSize()); archive_sp = Archive::ParseAndCacheArchiveForFile( file, ArchSpec(), file_mod_time, file_offset, data); } } if (archive_sp) { const size_t num_objects = archive_sp->GetNumObjects(); for (size_t idx = 0; idx < num_objects; ++idx) { const Object *object = archive_sp->GetObjectAtIndex(idx); if (object) { const lldb::offset_t object_file_offset = file_offset + object->ar_file_offset; if (object->ar_file_offset < file_size && file_size > object_file_offset) { if (ObjectFile::GetModuleSpecifications( file, object_file_offset, file_size - object_file_offset, specs)) { ModuleSpec &spec = specs.GetModuleSpecRefAtIndex(specs.GetSize() - 1); llvm::sys::TimePoint<> object_mod_time( std::chrono::seconds(object->ar_date)); spec.GetObjectName() = object->ar_name; spec.SetObjectOffset(object_file_offset); spec.SetObjectSize(file_size - object_file_offset); spec.GetObjectModificationTime() = object_mod_time; } } } } } const size_t end_count = specs.GetSize(); size_t num_specs_added = end_count - initial_count; if (set_archive_arch && num_specs_added > 0) { // The archive was created but we didn't have an architecture // so we need to set it for (size_t i = initial_count; i < end_count; ++i) { ModuleSpec module_spec; if (specs.GetModuleSpecAtIndex(i, module_spec)) { if (module_spec.GetArchitecture().IsValid()) { archive_sp->SetArchitecture(module_spec.GetArchitecture()); break; } } } } return num_specs_added; } Index: vendor/lldb/dist/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp =================================================================== --- vendor/lldb/dist/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp (revision 317691) +++ vendor/lldb/dist/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp (revision 317692) @@ -1,3466 +1,3466 @@ //===-- ObjectFileELF.cpp ------------------------------------- -*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #include "ObjectFileELF.h" #include #include #include #include "lldb/Core/ArchSpec.h" #include "lldb/Core/FileSpecList.h" #include "lldb/Core/Module.h" #include "lldb/Core/ModuleSpec.h" #include "lldb/Core/PluginManager.h" #include "lldb/Core/Section.h" #include "lldb/Core/Timer.h" #include "lldb/Symbol/DWARFCallFrameInfo.h" #include "lldb/Symbol/SymbolContext.h" #include "lldb/Target/SectionLoadList.h" #include "lldb/Target/Target.h" #include "lldb/Utility/DataBufferLLVM.h" #include "lldb/Utility/Error.h" #include "lldb/Utility/Log.h" #include "lldb/Utility/Stream.h" #include "llvm/ADT/PointerUnion.h" #include "llvm/ADT/StringRef.h" #include "llvm/Support/ARMBuildAttributes.h" #include "llvm/Support/MathExtras.h" #include "llvm/Support/MemoryBuffer.h" #include "llvm/Support/MipsABIFlags.h" #define CASE_AND_STREAM(s, def, width) \ case def: \ s->Printf("%-*s", width, #def); \ break; using namespace lldb; using namespace lldb_private; using namespace elf; using namespace llvm::ELF; namespace { // ELF note owner definitions const char *const LLDB_NT_OWNER_FREEBSD = "FreeBSD"; const char *const LLDB_NT_OWNER_GNU = "GNU"; const char *const LLDB_NT_OWNER_NETBSD = "NetBSD"; const char *const LLDB_NT_OWNER_OPENBSD = "OpenBSD"; const char *const LLDB_NT_OWNER_CSR = "csr"; const char *const LLDB_NT_OWNER_ANDROID = "Android"; const char *const LLDB_NT_OWNER_CORE = "CORE"; const char *const LLDB_NT_OWNER_LINUX = "LINUX"; // ELF note type definitions const elf_word LLDB_NT_FREEBSD_ABI_TAG = 0x01; const elf_word LLDB_NT_FREEBSD_ABI_SIZE = 4; const elf_word LLDB_NT_GNU_ABI_TAG = 0x01; const elf_word LLDB_NT_GNU_ABI_SIZE = 16; const elf_word LLDB_NT_GNU_BUILD_ID_TAG = 0x03; const elf_word LLDB_NT_NETBSD_ABI_TAG = 0x01; const elf_word LLDB_NT_NETBSD_ABI_SIZE = 4; // GNU ABI note OS constants const elf_word LLDB_NT_GNU_ABI_OS_LINUX = 0x00; 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 /// @brief Generic wrapper for ELFRel and ELFRela. /// /// This helper class allows us to parse both ELFRel and ELFRela relocation /// entries in a generic manner. class ELFRelocation { public: /// Constructs an ELFRelocation entry with a personality as given by @p /// type. /// /// @param type Either DT_REL or DT_RELA. Any other value is invalid. ELFRelocation(unsigned type); ~ELFRelocation(); bool Parse(const lldb_private::DataExtractor &data, lldb::offset_t *offset); static unsigned RelocType32(const ELFRelocation &rel); static unsigned RelocType64(const ELFRelocation &rel); static unsigned RelocSymbol32(const ELFRelocation &rel); static unsigned RelocSymbol64(const ELFRelocation &rel); static unsigned RelocOffset32(const ELFRelocation &rel); static unsigned RelocOffset64(const ELFRelocation &rel); static unsigned RelocAddend32(const ELFRelocation &rel); static unsigned RelocAddend64(const ELFRelocation &rel); private: typedef llvm::PointerUnion RelocUnion; RelocUnion reloc; }; ELFRelocation::ELFRelocation(unsigned type) { if (type == DT_REL || type == SHT_REL) reloc = new ELFRel(); else if (type == DT_RELA || type == SHT_RELA) reloc = new ELFRela(); else { assert(false && "unexpected relocation type"); reloc = static_cast(NULL); } } ELFRelocation::~ELFRelocation() { if (reloc.is()) delete reloc.get(); else delete reloc.get(); } bool ELFRelocation::Parse(const lldb_private::DataExtractor &data, lldb::offset_t *offset) { if (reloc.is()) return reloc.get()->Parse(data, offset); else return reloc.get()->Parse(data, offset); } unsigned ELFRelocation::RelocType32(const ELFRelocation &rel) { if (rel.reloc.is()) return ELFRel::RelocType32(*rel.reloc.get()); else return ELFRela::RelocType32(*rel.reloc.get()); } unsigned ELFRelocation::RelocType64(const ELFRelocation &rel) { if (rel.reloc.is()) return ELFRel::RelocType64(*rel.reloc.get()); else return ELFRela::RelocType64(*rel.reloc.get()); } unsigned ELFRelocation::RelocSymbol32(const ELFRelocation &rel) { if (rel.reloc.is()) return ELFRel::RelocSymbol32(*rel.reloc.get()); else return ELFRela::RelocSymbol32(*rel.reloc.get()); } unsigned ELFRelocation::RelocSymbol64(const ELFRelocation &rel) { if (rel.reloc.is()) return ELFRel::RelocSymbol64(*rel.reloc.get()); else return ELFRela::RelocSymbol64(*rel.reloc.get()); } unsigned ELFRelocation::RelocOffset32(const ELFRelocation &rel) { if (rel.reloc.is()) return rel.reloc.get()->r_offset; else return rel.reloc.get()->r_offset; } unsigned ELFRelocation::RelocOffset64(const ELFRelocation &rel) { if (rel.reloc.is()) return rel.reloc.get()->r_offset; else return rel.reloc.get()->r_offset; } unsigned ELFRelocation::RelocAddend32(const ELFRelocation &rel) { if (rel.reloc.is()) return 0; else return rel.reloc.get()->r_addend; } unsigned ELFRelocation::RelocAddend64(const ELFRelocation &rel) { if (rel.reloc.is()) return 0; else return rel.reloc.get()->r_addend; } } // end anonymous namespace bool ELFNote::Parse(const DataExtractor &data, lldb::offset_t *offset) { // Read all fields. if (data.GetU32(offset, &n_namesz, 3) == NULL) return false; // The name field is required to be nul-terminated, and n_namesz // includes the terminating nul in observed implementations (contrary // to the ELF-64 spec). A special case is needed for cores generated // by some older Linux versions, which write a note named "CORE" // without a nul terminator and n_namesz = 4. if (n_namesz == 4) { char buf[4]; if (data.ExtractBytes(*offset, 4, data.GetByteOrder(), buf) != 4) return false; if (strncmp(buf, "CORE", 4) == 0) { n_name = "CORE"; *offset += 4; return true; } } const char *cstr = data.GetCStr(offset, llvm::alignTo(n_namesz, 4)); if (cstr == NULL) { Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_SYMBOLS)); if (log) log->Printf("Failed to parse note name lacking nul terminator"); return false; } n_name = cstr; return true; } static uint32_t kalimbaVariantFromElfFlags(const elf::elf_word e_flags) { const uint32_t dsp_rev = e_flags & 0xFF; uint32_t kal_arch_variant = LLDB_INVALID_CPUTYPE; switch (dsp_rev) { // TODO(mg11) Support more variants case 10: kal_arch_variant = llvm::Triple::KalimbaSubArch_v3; break; case 14: kal_arch_variant = llvm::Triple::KalimbaSubArch_v4; break; case 17: case 20: kal_arch_variant = llvm::Triple::KalimbaSubArch_v5; break; default: break; } return kal_arch_variant; } static uint32_t mipsVariantFromElfFlags (const elf::ELFHeader &header) { const uint32_t mips_arch = header.e_flags & llvm::ELF::EF_MIPS_ARCH; uint32_t endian = header.e_ident[EI_DATA]; uint32_t arch_variant = ArchSpec::eMIPSSubType_unknown; uint32_t fileclass = header.e_ident[EI_CLASS]; // If there aren't any elf flags available (e.g core elf file) then return default // 32 or 64 bit arch (without any architecture revision) based on object file's class. if (header.e_type == ET_CORE) { switch (fileclass) { case llvm::ELF::ELFCLASS32: return (endian == ELFDATA2LSB) ? ArchSpec::eMIPSSubType_mips32el : ArchSpec::eMIPSSubType_mips32; case llvm::ELF::ELFCLASS64: return (endian == ELFDATA2LSB) ? ArchSpec::eMIPSSubType_mips64el : ArchSpec::eMIPSSubType_mips64; default: return arch_variant; } } switch (mips_arch) { case llvm::ELF::EF_MIPS_ARCH_1: case llvm::ELF::EF_MIPS_ARCH_2: case llvm::ELF::EF_MIPS_ARCH_32: return (endian == ELFDATA2LSB) ? ArchSpec::eMIPSSubType_mips32el : ArchSpec::eMIPSSubType_mips32; case llvm::ELF::EF_MIPS_ARCH_32R2: return (endian == ELFDATA2LSB) ? ArchSpec::eMIPSSubType_mips32r2el : ArchSpec::eMIPSSubType_mips32r2; case llvm::ELF::EF_MIPS_ARCH_32R6: return (endian == ELFDATA2LSB) ? ArchSpec::eMIPSSubType_mips32r6el : ArchSpec::eMIPSSubType_mips32r6; case llvm::ELF::EF_MIPS_ARCH_3: case llvm::ELF::EF_MIPS_ARCH_4: case llvm::ELF::EF_MIPS_ARCH_5: case llvm::ELF::EF_MIPS_ARCH_64: return (endian == ELFDATA2LSB) ? ArchSpec::eMIPSSubType_mips64el : ArchSpec::eMIPSSubType_mips64; case llvm::ELF::EF_MIPS_ARCH_64R2: return (endian == ELFDATA2LSB) ? ArchSpec::eMIPSSubType_mips64r2el : ArchSpec::eMIPSSubType_mips64r2; case llvm::ELF::EF_MIPS_ARCH_64R6: return (endian == ELFDATA2LSB) ? ArchSpec::eMIPSSubType_mips64r6el : ArchSpec::eMIPSSubType_mips64r6; default: break; } return arch_variant; } static uint32_t subTypeFromElfHeader(const elf::ELFHeader &header) { if (header.e_machine == llvm::ELF::EM_MIPS) return mipsVariantFromElfFlags(header); return llvm::ELF::EM_CSR_KALIMBA == header.e_machine ? kalimbaVariantFromElfFlags(header.e_flags) : LLDB_INVALID_CPUTYPE; } //! The kalimba toolchain identifies a code section as being //! one with the SHT_PROGBITS set in the section sh_type and the top //! bit in the 32-bit address field set. static lldb::SectionType kalimbaSectionType(const elf::ELFHeader &header, const elf::ELFSectionHeader §_hdr) { if (llvm::ELF::EM_CSR_KALIMBA != header.e_machine) { return eSectionTypeOther; } if (llvm::ELF::SHT_NOBITS == sect_hdr.sh_type) { return eSectionTypeZeroFill; } if (llvm::ELF::SHT_PROGBITS == sect_hdr.sh_type) { const lldb::addr_t KAL_CODE_BIT = 1 << 31; return KAL_CODE_BIT & sect_hdr.sh_addr ? eSectionTypeCode : eSectionTypeData; } return eSectionTypeOther; } // Arbitrary constant used as UUID prefix for core files. const uint32_t ObjectFileELF::g_core_uuid_magic(0xE210C); //------------------------------------------------------------------ // Static methods. //------------------------------------------------------------------ void ObjectFileELF::Initialize() { PluginManager::RegisterPlugin(GetPluginNameStatic(), GetPluginDescriptionStatic(), CreateInstance, CreateMemoryInstance, GetModuleSpecifications); } void ObjectFileELF::Terminate() { PluginManager::UnregisterPlugin(CreateInstance); } lldb_private::ConstString ObjectFileELF::GetPluginNameStatic() { static ConstString g_name("elf"); return g_name; } const char *ObjectFileELF::GetPluginDescriptionStatic() { return "ELF object file reader."; } ObjectFile *ObjectFileELF::CreateInstance(const lldb::ModuleSP &module_sp, DataBufferSP &data_sp, lldb::offset_t data_offset, const lldb_private::FileSpec *file, lldb::offset_t file_offset, lldb::offset_t length) { if (!data_sp) { data_sp = DataBufferLLVM::CreateSliceFromPath(file->GetPath(), length, file_offset); if (!data_sp) return nullptr; data_offset = 0; } assert(data_sp); if (data_sp->GetByteSize() <= (llvm::ELF::EI_NIDENT + data_offset)) return nullptr; const uint8_t *magic = data_sp->GetBytes() + data_offset; if (!ELFHeader::MagicBytesMatch(magic)) return nullptr; // Update the data to contain the entire file if it doesn't already if (data_sp->GetByteSize() < length) { data_sp = DataBufferLLVM::CreateSliceFromPath(file->GetPath(), length, file_offset); if (!data_sp) return nullptr; data_offset = 0; magic = data_sp->GetBytes(); } unsigned address_size = ELFHeader::AddressSizeInBytes(magic); if (address_size == 4 || address_size == 8) { std::unique_ptr objfile_ap(new ObjectFileELF( module_sp, data_sp, data_offset, file, file_offset, length)); ArchSpec spec; if (objfile_ap->GetArchitecture(spec) && objfile_ap->SetModulesArchitecture(spec)) return objfile_ap.release(); } return NULL; } ObjectFile *ObjectFileELF::CreateMemoryInstance( const lldb::ModuleSP &module_sp, DataBufferSP &data_sp, const lldb::ProcessSP &process_sp, lldb::addr_t header_addr) { if (data_sp && data_sp->GetByteSize() > (llvm::ELF::EI_NIDENT)) { const uint8_t *magic = data_sp->GetBytes(); if (ELFHeader::MagicBytesMatch(magic)) { unsigned address_size = ELFHeader::AddressSizeInBytes(magic); if (address_size == 4 || address_size == 8) { std::auto_ptr objfile_ap( new ObjectFileELF(module_sp, data_sp, process_sp, header_addr)); ArchSpec spec; if (objfile_ap->GetArchitecture(spec) && objfile_ap->SetModulesArchitecture(spec)) return objfile_ap.release(); } } } return NULL; } bool ObjectFileELF::MagicBytesMatch(DataBufferSP &data_sp, lldb::addr_t data_offset, lldb::addr_t data_length) { if (data_sp && data_sp->GetByteSize() > (llvm::ELF::EI_NIDENT + data_offset)) { const uint8_t *magic = data_sp->GetBytes() + data_offset; return ELFHeader::MagicBytesMatch(magic); } 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); } uint32_t ObjectFileELF::CalculateELFNotesSegmentsCRC32( const ProgramHeaderColl &program_headers, DataExtractor &object_data) { typedef ProgramHeaderCollConstIter Iter; uint32_t core_notes_crc = 0; for (Iter I = program_headers.begin(); I != program_headers.end(); ++I) { if (I->p_type == llvm::ELF::PT_NOTE) { const elf_off ph_offset = I->p_offset; const size_t ph_size = I->p_filesz; DataExtractor segment_data; if (segment_data.SetData(object_data, ph_offset, ph_size) != ph_size) { // The ELF program header contained incorrect data, // probably corefile is incomplete or corrupted. break; } core_notes_crc = calc_crc32(core_notes_crc, segment_data.GetDataStart(), segment_data.GetByteSize()); } } return core_notes_crc; } static const char *OSABIAsCString(unsigned char osabi_byte) { #define _MAKE_OSABI_CASE(x) \ case x: \ return #x switch (osabi_byte) { _MAKE_OSABI_CASE(ELFOSABI_NONE); _MAKE_OSABI_CASE(ELFOSABI_HPUX); _MAKE_OSABI_CASE(ELFOSABI_NETBSD); _MAKE_OSABI_CASE(ELFOSABI_GNU); _MAKE_OSABI_CASE(ELFOSABI_HURD); _MAKE_OSABI_CASE(ELFOSABI_SOLARIS); _MAKE_OSABI_CASE(ELFOSABI_AIX); _MAKE_OSABI_CASE(ELFOSABI_IRIX); _MAKE_OSABI_CASE(ELFOSABI_FREEBSD); _MAKE_OSABI_CASE(ELFOSABI_TRU64); _MAKE_OSABI_CASE(ELFOSABI_MODESTO); _MAKE_OSABI_CASE(ELFOSABI_OPENBSD); _MAKE_OSABI_CASE(ELFOSABI_OPENVMS); _MAKE_OSABI_CASE(ELFOSABI_NSK); _MAKE_OSABI_CASE(ELFOSABI_AROS); _MAKE_OSABI_CASE(ELFOSABI_FENIXOS); _MAKE_OSABI_CASE(ELFOSABI_C6000_ELFABI); _MAKE_OSABI_CASE(ELFOSABI_C6000_LINUX); _MAKE_OSABI_CASE(ELFOSABI_ARM); _MAKE_OSABI_CASE(ELFOSABI_STANDALONE); default: return ""; } #undef _MAKE_OSABI_CASE } // // WARNING : This function is being deprecated // It's functionality has moved to ArchSpec::SetArchitecture // This function is only being kept to validate the move. // // TODO : Remove this function static bool GetOsFromOSABI(unsigned char osabi_byte, llvm::Triple::OSType &ostype) { switch (osabi_byte) { case ELFOSABI_AIX: ostype = llvm::Triple::OSType::AIX; break; case ELFOSABI_FREEBSD: ostype = llvm::Triple::OSType::FreeBSD; break; case ELFOSABI_GNU: ostype = llvm::Triple::OSType::Linux; break; case ELFOSABI_NETBSD: ostype = llvm::Triple::OSType::NetBSD; break; case ELFOSABI_OPENBSD: ostype = llvm::Triple::OSType::OpenBSD; break; case ELFOSABI_SOLARIS: ostype = llvm::Triple::OSType::Solaris; break; default: ostype = llvm::Triple::OSType::UnknownOS; } return ostype != llvm::Triple::OSType::UnknownOS; } size_t ObjectFileELF::GetModuleSpecifications( const lldb_private::FileSpec &file, lldb::DataBufferSP &data_sp, lldb::offset_t data_offset, lldb::offset_t file_offset, lldb::offset_t length, lldb_private::ModuleSpecList &specs) { Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_MODULES)); const size_t initial_count = specs.GetSize(); if (ObjectFileELF::MagicBytesMatch(data_sp, 0, data_sp->GetByteSize())) { DataExtractor data; data.SetData(data_sp); elf::ELFHeader header; lldb::offset_t header_offset = data_offset; if (header.Parse(data, &header_offset)) { if (data_sp) { ModuleSpec spec(file); const uint32_t sub_type = subTypeFromElfHeader(header); spec.GetArchitecture().SetArchitecture( eArchTypeELF, header.e_machine, sub_type, header.e_ident[EI_OSABI]); if (spec.GetArchitecture().IsValid()) { llvm::Triple::OSType ostype; llvm::Triple::VendorType vendor; 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])); // SetArchitecture should have set the vendor to unknown vendor = spec.GetArchitecture().GetTriple().getVendor(); assert(vendor == llvm::Triple::UnknownVendor); UNUSED_IF_ASSERT_DISABLED(vendor); // // Validate it is ok to remove GetOsFromOSABI 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()); } // In case there is header extension in the section #0, the header // we parsed above could have sentinel values for e_phnum, e_shnum, // and e_shstrndx. In this case we need to reparse the header // with a bigger data source to get the actual values. size_t section_header_end = header.e_shoff + header.e_shentsize; if (header.HasHeaderExtension() && section_header_end > data_sp->GetByteSize()) { data_sp = DataBufferLLVM::CreateSliceFromPath( file.GetPath(), section_header_end, file_offset); if (data_sp) { data.SetData(data_sp); lldb::offset_t header_offset = data_offset; header.Parse(data, &header_offset); } } // Try to get the UUID from the section list. Usually that's at the // end, so map the file in if we don't have it already. section_header_end = header.e_shoff + header.e_shnum * header.e_shentsize; if (section_header_end > data_sp->GetByteSize()) { data_sp = DataBufferLLVM::CreateSliceFromPath( file.GetPath(), section_header_end, file_offset); if (data_sp) data.SetData(data_sp); } uint32_t gnu_debuglink_crc = 0; std::string gnu_debuglink_file; SectionHeaderColl section_headers; lldb_private::UUID &uuid = spec.GetUUID(); using namespace std::placeholders; const SetDataFunction set_data = std::bind(&ObjectFileELF::SetData, std::cref(data), _1, _2, _3); GetSectionHeaderInfo(section_headers, set_data, header, uuid, gnu_debuglink_file, gnu_debuglink_crc, spec.GetArchitecture()); 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()); if (!uuid.IsValid()) { uint32_t core_notes_crc = 0; if (!gnu_debuglink_crc) { lldb_private::Timer scoped_timer( LLVM_PRETTY_FUNCTION, "Calculating module crc32 %s with size %" PRIu64 " KiB", file.GetLastPathComponent().AsCString(), (file.GetByteSize() - file_offset) / 1024); // For core files - which usually don't happen to have a // gnu_debuglink, and are pretty bulky - calculating whole // contents crc32 would be too much of luxury. Thus we will need // to fallback to something simpler. if (header.e_type == llvm::ELF::ET_CORE) { size_t program_headers_end = header.e_phoff + header.e_phnum * header.e_phentsize; if (program_headers_end > data_sp->GetByteSize()) { data_sp = DataBufferLLVM::CreateSliceFromPath( file.GetPath(), program_headers_end, file_offset); if (data_sp) data.SetData(data_sp); } ProgramHeaderColl program_headers; GetProgramHeaderInfo(program_headers, set_data, header); size_t segment_data_end = 0; for (ProgramHeaderCollConstIter I = program_headers.begin(); I != program_headers.end(); ++I) { segment_data_end = std::max( I->p_offset + I->p_filesz, segment_data_end); } if (segment_data_end > data_sp->GetByteSize()) { data_sp = DataBufferLLVM::CreateSliceFromPath( file.GetPath(), segment_data_end, file_offset); if (data_sp) data.SetData(data_sp); } core_notes_crc = CalculateELFNotesSegmentsCRC32(program_headers, data); } else { // Need to map entire file into memory to calculate the crc. data_sp = DataBufferLLVM::CreateSliceFromPath(file.GetPath(), -1, file_offset); if (data_sp) { data.SetData(data_sp); gnu_debuglink_crc = calc_gnu_debuglink_crc32( data.GetDataStart(), data.GetByteSize()); } } } if (gnu_debuglink_crc) { // Use 4 bytes of crc from the .gnu_debuglink section. uint32_t uuidt[4] = {gnu_debuglink_crc, 0, 0, 0}; uuid.SetBytes(uuidt, sizeof(uuidt)); } else if (core_notes_crc) { // Use 8 bytes - first 4 bytes for *magic* prefix, mainly to make // it look different form // .gnu_debuglink crc followed by 4 bytes of note segments crc. uint32_t uuidt[4] = {g_core_uuid_magic, core_notes_crc, 0, 0}; uuid.SetBytes(uuidt, sizeof(uuidt)); } } specs.Append(spec); } } } } return specs.GetSize() - initial_count; } //------------------------------------------------------------------ // PluginInterface protocol //------------------------------------------------------------------ lldb_private::ConstString ObjectFileELF::GetPluginName() { return GetPluginNameStatic(); } uint32_t ObjectFileELF::GetPluginVersion() { return m_plugin_version; } //------------------------------------------------------------------ // ObjectFile protocol //------------------------------------------------------------------ ObjectFileELF::ObjectFileELF(const lldb::ModuleSP &module_sp, 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_ap(), m_entry_point_address(), m_arch_spec() { 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_ap(), m_entry_point_address(), m_arch_spec() { ::memset(&m_header, 0, sizeof(m_header)); } ObjectFileELF::~ObjectFileELF() {} bool ObjectFileELF::IsExecutable() const { return ((m_header.e_type & ET_EXEC) != 0) || (m_header.e_entry != 0); } bool ObjectFileELF::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) { if (!value_is_offset) { bool found_offset = false; for (size_t i = 1, count = GetProgramHeaderCount(); i <= count; ++i) { const elf::ELFProgramHeader *header = GetProgramHeaderByIndex(i); if (header == nullptr) continue; if (header->p_type != PT_LOAD || header->p_offset != 0) continue; value = value - header->p_vaddr; found_offset = true; break; } if (!found_offset) return false; } const size_t num_sections = section_list->GetSize(); size_t sect_idx = 0; for (sect_idx = 0; sect_idx < num_sections; ++sect_idx) { // Iterate through the object file sections to find all // of the sections that have SHF_ALLOC in their flag bits. SectionSP section_sp(section_list->GetSectionAtIndex(sect_idx)); if (section_sp && section_sp->Test(SHF_ALLOC)) { lldb::addr_t load_addr = section_sp->GetFileAddress(); // We don't want to update the load address of a section with type // eSectionTypeAbsoluteAddress as they already have the absolute load // address // already specified if (section_sp->GetType() != eSectionTypeAbsoluteAddress) load_addr += value; // On 32-bit systems the load address have to fit into 4 bytes. The // rest of // the bytes are the overflow from the addition. if (GetAddressByteSize() == 4) load_addr &= 0xFFFFFFFF; if (target.GetSectionLoadList().SetSectionLoadAddress(section_sp, load_addr)) ++num_loaded_sections; } } return num_loaded_sections > 0; } } return false; } ByteOrder ObjectFileELF::GetByteOrder() const { if (m_header.e_ident[EI_DATA] == ELFDATA2MSB) return eByteOrderBig; if (m_header.e_ident[EI_DATA] == ELFDATA2LSB) return eByteOrderLittle; return eByteOrderInvalid; } uint32_t ObjectFileELF::GetAddressByteSize() const { return m_data.GetAddressByteSize(); } AddressClass ObjectFileELF::GetAddressClass(addr_t file_addr) { Symtab *symtab = GetSymtab(); if (!symtab) return eAddressClassUnknown; // The address class is determined based on the symtab. Ask it from the object // file what // contains the symtab information. ObjectFile *symtab_objfile = symtab->GetObjectFile(); if (symtab_objfile != nullptr && symtab_objfile != this) return symtab_objfile->GetAddressClass(file_addr); auto res = ObjectFile::GetAddressClass(file_addr); if (res != eAddressClassCode) return res; auto ub = m_address_class_map.upper_bound(file_addr); if (ub == m_address_class_map.begin()) { // No entry in the address class map before the address. Return // default address class for an address in a code section. return eAddressClassCode; } // Move iterator to the address class entry preceding address --ub; return ub->second; } size_t ObjectFileELF::SectionIndex(const SectionHeaderCollIter &I) { return std::distance(m_section_headers.begin(), I) + 1u; } size_t ObjectFileELF::SectionIndex(const SectionHeaderCollConstIter &I) const { return std::distance(m_section_headers.begin(), I) + 1u; } bool ObjectFileELF::ParseHeader() { lldb::offset_t offset = 0; if (!m_header.Parse(m_data, &offset)) return false; if (!IsInMemory()) return true; // For in memory object files m_data might not contain the full object file. // Try to load it // until the end of the "Section header table" what is at the end of the ELF // file. addr_t file_size = m_header.e_shoff + m_header.e_shnum * m_header.e_shentsize; if (m_data.GetByteSize() < file_size) { ProcessSP process_sp(m_process_wp.lock()); if (!process_sp) return false; DataBufferSP data_sp = ReadMemory(process_sp, m_memory_addr, file_size); if (!data_sp) return false; m_data.SetData(data_sp, 0, file_size); } return true; } bool ObjectFileELF::GetUUID(lldb_private::UUID *uuid) { // Need to parse the section list to get the UUIDs, so make sure that's been // done. if (!ParseSectionHeaders() && GetType() != ObjectFile::eTypeCoreFile) return false; if (m_uuid.IsValid()) { // We have the full build id uuid. *uuid = m_uuid; return true; } else if (GetType() == ObjectFile::eTypeCoreFile) { uint32_t core_notes_crc = 0; if (!ParseProgramHeaders()) return false; core_notes_crc = CalculateELFNotesSegmentsCRC32(m_program_headers, m_data); if (core_notes_crc) { // Use 8 bytes - first 4 bytes for *magic* prefix, mainly to make it // look different form .gnu_debuglink crc - followed by 4 bytes of note // segments crc. uint32_t uuidt[4] = {g_core_uuid_magic, core_notes_crc, 0, 0}; m_uuid.SetBytes(uuidt, sizeof(uuidt)); } } else { if (!m_gnu_debuglink_crc) m_gnu_debuglink_crc = calc_gnu_debuglink_crc32(m_data.GetDataStart(), m_data.GetByteSize()); if (m_gnu_debuglink_crc) { // Use 4 bytes of crc from the .gnu_debuglink section. uint32_t uuidt[4] = {m_gnu_debuglink_crc, 0, 0, 0}; m_uuid.SetBytes(uuidt, sizeof(uuidt)); } } if (m_uuid.IsValid()) { *uuid = m_uuid; return true; } return false; } lldb_private::FileSpecList ObjectFileELF::GetDebugSymbolFilePaths() { FileSpecList file_spec_list; if (!m_gnu_debuglink_file.empty()) { FileSpec file_spec(m_gnu_debuglink_file, false); file_spec_list.Append(file_spec); } return file_spec_list; } uint32_t ObjectFileELF::GetDependentModules(FileSpecList &files) { size_t num_modules = ParseDependentModules(); uint32_t num_specs = 0; for (unsigned i = 0; i < num_modules; ++i) { if (files.AppendIfUnique(m_filespec_ap->GetFileSpecAtIndex(i))) num_specs++; } return num_specs; } Address ObjectFileELF::GetImageInfoAddress(Target *target) { if (!ParseDynamicSymbols()) return Address(); SectionList *section_list = GetSectionList(); if (!section_list) return Address(); // Find the SHT_DYNAMIC (.dynamic) section. SectionSP dynsym_section_sp( section_list->FindSectionByType(eSectionTypeELFDynamicLinkInfo, true)); if (!dynsym_section_sp) return Address(); assert(dynsym_section_sp->GetObjectFile() == this); user_id_t dynsym_id = dynsym_section_sp->GetID(); const ELFSectionHeaderInfo *dynsym_hdr = GetSectionHeaderByIndex(dynsym_id); if (!dynsym_hdr) return Address(); for (size_t i = 0; i < m_dynamic_symbols.size(); ++i) { ELFDynamic &symbol = m_dynamic_symbols[i]; if (symbol.d_tag == DT_DEBUG) { // Compute the offset as the number of previous entries plus the // size of d_tag. addr_t offset = i * dynsym_hdr->sh_entsize + GetAddressByteSize(); return Address(dynsym_section_sp, offset); } // MIPS executables uses DT_MIPS_RLD_MAP_REL to support PIE. DT_MIPS_RLD_MAP // exists in non-PIE. else if ((symbol.d_tag == DT_MIPS_RLD_MAP || symbol.d_tag == DT_MIPS_RLD_MAP_REL) && target) { addr_t offset = i * dynsym_hdr->sh_entsize + GetAddressByteSize(); addr_t dyn_base = dynsym_section_sp->GetLoadBaseAddress(target); if (dyn_base == LLDB_INVALID_ADDRESS) return Address(); Error error; if (symbol.d_tag == DT_MIPS_RLD_MAP) { // DT_MIPS_RLD_MAP tag stores an absolute address of the debug pointer. Address addr; if (target->ReadPointerFromMemory(dyn_base + offset, false, error, addr)) return addr; } if (symbol.d_tag == DT_MIPS_RLD_MAP_REL) { // DT_MIPS_RLD_MAP_REL tag stores the offset to the debug pointer, // relative to the address of the tag. uint64_t rel_offset; rel_offset = target->ReadUnsignedIntegerFromMemory( dyn_base + offset, false, GetAddressByteSize(), UINT64_MAX, error); if (error.Success() && rel_offset != UINT64_MAX) { Address addr; addr_t debug_ptr_address = dyn_base + (offset - GetAddressByteSize()) + rel_offset; addr.SetOffset(debug_ptr_address); return addr; } } } } return Address(); } lldb_private::Address ObjectFileELF::GetEntryPointAddress() { if (m_entry_point_address.IsValid()) return m_entry_point_address; if (!ParseHeader() || !IsExecutable()) return m_entry_point_address; SectionList *section_list = GetSectionList(); addr_t offset = m_header.e_entry; if (!section_list) m_entry_point_address.SetOffset(offset); else m_entry_point_address.ResolveAddressUsingFileSections(offset, section_list); return m_entry_point_address; } //---------------------------------------------------------------------- // ParseDependentModules //---------------------------------------------------------------------- size_t ObjectFileELF::ParseDependentModules() { if (m_filespec_ap.get()) return m_filespec_ap->GetSize(); m_filespec_ap.reset(new FileSpecList()); if (!ParseSectionHeaders()) return 0; SectionList *section_list = GetSectionList(); if (!section_list) return 0; // Find the SHT_DYNAMIC section. Section *dynsym = section_list->FindSectionByType(eSectionTypeELFDynamicLinkInfo, true) .get(); if (!dynsym) return 0; assert(dynsym->GetObjectFile() == this); const ELFSectionHeaderInfo *header = GetSectionHeaderByIndex(dynsym->GetID()); if (!header) return 0; // sh_link: section header index of string table used by entries in the // section. Section *dynstr = section_list->FindSectionByID(header->sh_link + 1).get(); if (!dynstr) return 0; DataExtractor dynsym_data; DataExtractor dynstr_data; if (ReadSectionData(dynsym, dynsym_data) && ReadSectionData(dynstr, dynstr_data)) { ELFDynamic symbol; const lldb::offset_t section_size = dynsym_data.GetByteSize(); lldb::offset_t offset = 0; // The only type of entries we are concerned with are tagged DT_NEEDED, // yielding the name of a required library. while (offset < section_size) { if (!symbol.Parse(dynsym_data, &offset)) break; if (symbol.d_tag != DT_NEEDED) continue; uint32_t str_index = static_cast(symbol.d_val); const char *lib_name = dynstr_data.PeekCStr(str_index); m_filespec_ap->Append(FileSpec(lib_name, true)); } } return m_filespec_ap->GetSize(); } //---------------------------------------------------------------------- // GetProgramHeaderInfo //---------------------------------------------------------------------- size_t ObjectFileELF::GetProgramHeaderInfo(ProgramHeaderColl &program_headers, const SetDataFunction &set_data, const ELFHeader &header) { // We have already parsed the program headers if (!program_headers.empty()) return program_headers.size(); // If there are no program headers to read we are done. if (header.e_phnum == 0) return 0; program_headers.resize(header.e_phnum); if (program_headers.size() != header.e_phnum) return 0; const size_t ph_size = header.e_phnum * header.e_phentsize; const elf_off ph_offset = header.e_phoff; DataExtractor data; if (set_data(data, ph_offset, ph_size) != ph_size) return 0; uint32_t idx; lldb::offset_t offset; for (idx = 0, offset = 0; idx < header.e_phnum; ++idx) { if (program_headers[idx].Parse(data, &offset) == false) break; } if (idx < program_headers.size()) program_headers.resize(idx); return program_headers.size(); } //---------------------------------------------------------------------- // ParseProgramHeaders //---------------------------------------------------------------------- size_t ObjectFileELF::ParseProgramHeaders() { using namespace std::placeholders; return GetProgramHeaderInfo( m_program_headers, std::bind(&ObjectFileELF::SetDataWithReadMemoryFallback, this, _1, _2, _3), m_header); } lldb_private::Error ObjectFileELF::RefineModuleDetailsFromNote(lldb_private::DataExtractor &data, lldb_private::ArchSpec &arch_spec, lldb_private::UUID &uuid) { Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_MODULES)); Error error; lldb::offset_t offset = 0; while (true) { // Parse the note header. If this fails, bail out. const lldb::offset_t note_offset = offset; ELFNote note = ELFNote(); if (!note.Parse(data, &offset)) { // We're done. return error; } if (log) log->Printf("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) && (note.n_type == LLDB_NT_FREEBSD_ABI_TAG) && (note.n_descsz == LLDB_NT_FREEBSD_ABI_SIZE)) { // Pull out the min version info. uint32_t version_info; if (data.GetU32(&offset, &version_info, 1) == nullptr) { error.SetErrorString("failed to read FreeBSD ABI note payload"); return error; } // Convert the version info into a major/minor number. const uint32_t version_major = version_info / 100000; const uint32_t version_minor = (version_info / 1000) % 100; char os_name[32]; snprintf(os_name, sizeof(os_name), "freebsd%" PRIu32 ".%" PRIu32, version_major, version_minor); // Set the elf OS version to FreeBSD. Also clear the vendor. 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(version_info % 1000)); } // Process GNU ELF notes. else if (note.n_name == LLDB_NT_OWNER_GNU) { switch (note.n_type) { case LLDB_NT_GNU_ABI_TAG: if (note.n_descsz == LLDB_NT_GNU_ABI_SIZE) { // Pull out the min OS version supporting the ABI. uint32_t version_info[4]; if (data.GetU32(&offset, &version_info[0], note.n_descsz / 4) == nullptr) { error.SetErrorString("failed to read GNU ABI note payload"); return error; } // Set the OS per the OS field. switch (version_info[0]) { case LLDB_NT_GNU_ABI_OS_LINUX: 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]); // 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. break; case LLDB_NT_GNU_ABI_OS_HURD: 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]); 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]); 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]); break; } } break; case LLDB_NT_GNU_BUILD_ID_TAG: // Only bother processing this if we don't already have the uuid set. if (!uuid.IsValid()) { // 16 bytes is UUID|MD5, 20 bytes is SHA1. Other linkers may produce a // build-id of a different // length. Accept it as long as it's at least 4 bytes as it will be // better than our own crc32. if (note.n_descsz >= 4 && note.n_descsz <= 20) { uint8_t uuidbuf[20]; if (data.GetU8(&offset, &uuidbuf, note.n_descsz) == nullptr) { error.SetErrorString("failed to read GNU_BUILD_ID note payload"); return error; } // Save the build id as the UUID for the module. uuid.SetBytes(uuidbuf, note.n_descsz); } } break; } if (arch_spec.IsMIPS() && arch_spec.GetTriple().getOS() == llvm::Triple::OSType::UnknownOS) // The note.n_name == LLDB_NT_OWNER_GNU is valid for Linux platform arch_spec.GetTriple().setOS(llvm::Triple::OSType::Linux); } // Process NetBSD ELF notes. else if ((note.n_name == LLDB_NT_OWNER_NETBSD) && (note.n_type == LLDB_NT_NETBSD_ABI_TAG) && (note.n_descsz == LLDB_NT_NETBSD_ABI_SIZE)) { // Pull out the min version info. uint32_t version_info; if (data.GetU32(&offset, &version_info, 1) == nullptr) { error.SetErrorString("failed to read NetBSD ABI note payload"); return error; } // Set the elf OS version to NetBSD. Also clear the vendor. arch_spec.GetTriple().setOS(llvm::Triple::OSType::NetBSD); arch_spec.GetTriple().setVendor(llvm::Triple::VendorType::UnknownVendor); if (log) log->Printf( "ObjectFileELF::%s detected NetBSD, min version constant %" PRIu32, __FUNCTION__, version_info); } // Process OpenBSD ELF notes. else if (note.n_name == LLDB_NT_OWNER_OPENBSD) { // Set the elf OS version to OpenBSD. Also clear the vendor. arch_spec.GetTriple().setOS(llvm::Triple::OSType::OpenBSD); arch_spec.GetTriple().setVendor(llvm::Triple::VendorType::UnknownVendor); } // Process CSR kalimba notes else if ((note.n_type == LLDB_NT_GNU_ABI_TAG) && (note.n_name == LLDB_NT_OWNER_CSR)) { arch_spec.GetTriple().setOS(llvm::Triple::OSType::UnknownOS); arch_spec.GetTriple().setVendor(llvm::Triple::VendorType::CSR); // TODO At some point the description string could be processed. // It could provide a steer towards the kalimba variant which // this ELF targets. if (note.n_descsz) { const char *cstr = data.GetCStr(&offset, llvm::alignTo(note.n_descsz, 4)); (void)cstr; } } else if (note.n_name == LLDB_NT_OWNER_ANDROID) { arch_spec.GetTriple().setOS(llvm::Triple::OSType::Linux); arch_spec.GetTriple().setEnvironment( llvm::Triple::EnvironmentType::Android); } else if (note.n_name == LLDB_NT_OWNER_LINUX) { // This is sometimes found in core files and usually contains extended // register info arch_spec.GetTriple().setOS(llvm::Triple::OSType::Linux); } else if (note.n_name == LLDB_NT_OWNER_CORE) { // Parse the NT_FILE to look for stuff in paths to shared libraries // As the contents look like this in a 64 bit ELF core file: // count = 0x000000000000000a (10) // page_size = 0x0000000000001000 (4096) // Index start end file_ofs path // ===== ------------------ ------------------ ------------------ // ------------------------------------- // [ 0] 0x0000000000400000 0x0000000000401000 0x0000000000000000 // /tmp/a.out // [ 1] 0x0000000000600000 0x0000000000601000 0x0000000000000000 // /tmp/a.out // [ 2] 0x0000000000601000 0x0000000000602000 0x0000000000000001 // /tmp/a.out // [ 3] 0x00007fa79c9ed000 0x00007fa79cba8000 0x0000000000000000 // /lib/x86_64-linux-gnu/libc-2.19.so // [ 4] 0x00007fa79cba8000 0x00007fa79cda7000 0x00000000000001bb // /lib/x86_64-linux-gnu/libc-2.19.so // [ 5] 0x00007fa79cda7000 0x00007fa79cdab000 0x00000000000001ba // /lib/x86_64-linux-gnu/libc-2.19.so // [ 6] 0x00007fa79cdab000 0x00007fa79cdad000 0x00000000000001be // /lib/x86_64-linux-gnu/libc-2.19.so // [ 7] 0x00007fa79cdb2000 0x00007fa79cdd5000 0x0000000000000000 // /lib/x86_64-linux-gnu/ld-2.19.so // [ 8] 0x00007fa79cfd4000 0x00007fa79cfd5000 0x0000000000000022 // /lib/x86_64-linux-gnu/ld-2.19.so // [ 9] 0x00007fa79cfd5000 0x00007fa79cfd6000 0x0000000000000023 // /lib/x86_64-linux-gnu/ld-2.19.so // In the 32 bit ELFs the count, page_size, start, end, file_ofs are // uint32_t // For reference: see readelf source code (in binutils). if (note.n_type == NT_FILE) { uint64_t count = data.GetAddress(&offset); const char *cstr; data.GetAddress(&offset); // Skip page size offset += count * 3 * data.GetAddressByteSize(); // Skip all start/end/file_ofs for (size_t i = 0; i < count; ++i) { cstr = data.GetCStr(&offset); if (cstr == nullptr) { error.SetErrorStringWithFormat("ObjectFileELF::%s trying to read " "at an offset after the end " "(GetCStr returned nullptr)", __FUNCTION__); return error; } llvm::StringRef path(cstr); if (path.contains("/lib/x86_64-linux-gnu") || path.contains("/lib/i386-linux-gnu")) { arch_spec.GetTriple().setOS(llvm::Triple::OSType::Linux); break; } } if (arch_spec.IsMIPS() && arch_spec.GetTriple().getOS() == llvm::Triple::OSType::UnknownOS) // In case of MIPSR6, the LLDB_NT_OWNER_GNU note is missing // for some cases (e.g. compile with -nostdlib) // Hence set OS to Linux arch_spec.GetTriple().setOS(llvm::Triple::OSType::Linux); } } // Calculate the offset of the next note just in case "offset" has been used // to poke at the contents of the note data offset = note_offset + note.GetByteSize(); } return error; } void ObjectFileELF::ParseARMAttributes(DataExtractor &data, uint64_t length, ArchSpec &arch_spec) { lldb::offset_t Offset = 0; uint8_t FormatVersion = data.GetU8(&Offset); if (FormatVersion != llvm::ARMBuildAttrs::Format_Version) return; Offset = Offset + sizeof(uint32_t); // Section Length llvm::StringRef VendorName = data.GetCStr(&Offset); if (VendorName != "aeabi") return; if (arch_spec.GetTriple().getEnvironment() == llvm::Triple::UnknownEnvironment) arch_spec.GetTriple().setEnvironment(llvm::Triple::EABI); while (Offset < length) { uint8_t Tag = data.GetU8(&Offset); uint32_t Size = data.GetU32(&Offset); if (Tag != llvm::ARMBuildAttrs::File || Size == 0) continue; while (Offset < length) { uint64_t Tag = data.GetULEB128(&Offset); switch (Tag) { default: if (Tag < 32) data.GetULEB128(&Offset); else if (Tag % 2 == 0) data.GetULEB128(&Offset); else data.GetCStr(&Offset); break; case llvm::ARMBuildAttrs::CPU_raw_name: case llvm::ARMBuildAttrs::CPU_name: data.GetCStr(&Offset); break; case llvm::ARMBuildAttrs::ABI_VFP_args: { uint64_t VFPArgs = data.GetULEB128(&Offset); if (VFPArgs == llvm::ARMBuildAttrs::BaseAAPCS) { if (arch_spec.GetTriple().getEnvironment() == llvm::Triple::UnknownEnvironment || arch_spec.GetTriple().getEnvironment() == llvm::Triple::EABIHF) arch_spec.GetTriple().setEnvironment(llvm::Triple::EABI); arch_spec.SetFlags(ArchSpec::eARM_abi_soft_float); } else if (VFPArgs == llvm::ARMBuildAttrs::HardFPAAPCS) { if (arch_spec.GetTriple().getEnvironment() == llvm::Triple::UnknownEnvironment || arch_spec.GetTriple().getEnvironment() == llvm::Triple::EABI) arch_spec.GetTriple().setEnvironment(llvm::Triple::EABIHF); arch_spec.SetFlags(ArchSpec::eARM_abi_hard_float); } break; } } } } } //---------------------------------------------------------------------- // GetSectionHeaderInfo //---------------------------------------------------------------------- size_t ObjectFileELF::GetSectionHeaderInfo(SectionHeaderColl §ion_headers, const SetDataFunction &set_data, const elf::ELFHeader &header, lldb_private::UUID &uuid, std::string &gnu_debuglink_file, uint32_t &gnu_debuglink_crc, ArchSpec &arch_spec) { // Don't reparse the section headers if we already did that. if (!section_headers.empty()) return section_headers.size(); // Only initialize the arch_spec to okay defaults if they're not already set. // We'll refine this with note data as we parse the notes. if (arch_spec.GetTriple().getOS() == llvm::Triple::OSType::UnknownOS) { llvm::Triple::OSType ostype; llvm::Triple::OSType spec_ostype; const uint32_t sub_type = subTypeFromElfHeader(header); arch_spec.SetArchitecture(eArchTypeELF, header.e_machine, sub_type, header.e_ident[EI_OSABI]); // Validate if it is ok to remove GetOsFromOSABI. // Note, that now the OS is determined based on EI_OSABI flag and // the info extracted from ELF notes (see RefineModuleDetailsFromNote). // However in some cases that still might be not enough: for example // a shared library might not have any notes at all // and have EI_OSABI flag set to System V, // as result the OS will be set to UnknownOS. GetOsFromOSABI(header.e_ident[EI_OSABI], ostype); spec_ostype = arch_spec.GetTriple().getOS(); assert(spec_ostype == ostype); UNUSED_IF_ASSERT_DISABLED(spec_ostype); } if (arch_spec.GetMachine() == llvm::Triple::mips || arch_spec.GetMachine() == llvm::Triple::mipsel || arch_spec.GetMachine() == llvm::Triple::mips64 || arch_spec.GetMachine() == llvm::Triple::mips64el) { switch (header.e_flags & llvm::ELF::EF_MIPS_ARCH_ASE) { case llvm::ELF::EF_MIPS_MICROMIPS: arch_spec.SetFlags(ArchSpec::eMIPSAse_micromips); break; case llvm::ELF::EF_MIPS_ARCH_ASE_M16: arch_spec.SetFlags(ArchSpec::eMIPSAse_mips16); break; case llvm::ELF::EF_MIPS_ARCH_ASE_MDMX: arch_spec.SetFlags(ArchSpec::eMIPSAse_mdmx); break; default: break; } } if (arch_spec.GetMachine() == llvm::Triple::arm || arch_spec.GetMachine() == llvm::Triple::thumb) { if (header.e_flags & llvm::ELF::EF_ARM_SOFT_FLOAT) arch_spec.SetFlags(ArchSpec::eARM_abi_soft_float); else if (header.e_flags & llvm::ELF::EF_ARM_VFP_FLOAT) arch_spec.SetFlags(ArchSpec::eARM_abi_hard_float); } // If there are no section headers we are done. if (header.e_shnum == 0) return 0; Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_MODULES)); section_headers.resize(header.e_shnum); if (section_headers.size() != header.e_shnum) return 0; const size_t sh_size = header.e_shnum * header.e_shentsize; const elf_off sh_offset = header.e_shoff; DataExtractor sh_data; if (set_data(sh_data, sh_offset, sh_size) != sh_size) return 0; uint32_t idx; lldb::offset_t offset; for (idx = 0, offset = 0; idx < header.e_shnum; ++idx) { if (section_headers[idx].Parse(sh_data, &offset) == false) break; } if (idx < section_headers.size()) section_headers.resize(idx); const unsigned strtab_idx = header.e_shstrndx; if (strtab_idx && strtab_idx < section_headers.size()) { const ELFSectionHeaderInfo &sheader = section_headers[strtab_idx]; const size_t byte_size = sheader.sh_size; const Elf64_Off offset = sheader.sh_offset; lldb_private::DataExtractor shstr_data; if (set_data(shstr_data, offset, byte_size) == byte_size) { for (SectionHeaderCollIter I = section_headers.begin(); I != section_headers.end(); ++I) { static ConstString g_sect_name_gnu_debuglink(".gnu_debuglink"); const ELFSectionHeaderInfo &sheader = *I; const uint64_t section_size = sheader.sh_type == SHT_NOBITS ? 0 : sheader.sh_size; ConstString name(shstr_data.PeekCStr(I->sh_name)); I->section_name = name; if (arch_spec.IsMIPS()) { uint32_t arch_flags = arch_spec.GetFlags(); DataExtractor data; if (sheader.sh_type == SHT_MIPS_ABIFLAGS) { if (section_size && (set_data(data, sheader.sh_offset, section_size) == section_size)) { // MIPS ASE Mask is at offset 12 in MIPS.abiflags section lldb::offset_t offset = 12; // MIPS ABI Flags Version: 0 arch_flags |= data.GetU32(&offset); // The floating point ABI is at offset 7 offset = 7; switch (data.GetU8(&offset)) { case llvm::Mips::Val_GNU_MIPS_ABI_FP_ANY: arch_flags |= lldb_private::ArchSpec::eMIPS_ABI_FP_ANY; break; case llvm::Mips::Val_GNU_MIPS_ABI_FP_DOUBLE: arch_flags |= lldb_private::ArchSpec::eMIPS_ABI_FP_DOUBLE; break; case llvm::Mips::Val_GNU_MIPS_ABI_FP_SINGLE: arch_flags |= lldb_private::ArchSpec::eMIPS_ABI_FP_SINGLE; break; case llvm::Mips::Val_GNU_MIPS_ABI_FP_SOFT: arch_flags |= lldb_private::ArchSpec::eMIPS_ABI_FP_SOFT; break; case llvm::Mips::Val_GNU_MIPS_ABI_FP_OLD_64: arch_flags |= lldb_private::ArchSpec::eMIPS_ABI_FP_OLD_64; break; case llvm::Mips::Val_GNU_MIPS_ABI_FP_XX: arch_flags |= lldb_private::ArchSpec::eMIPS_ABI_FP_XX; break; case llvm::Mips::Val_GNU_MIPS_ABI_FP_64: arch_flags |= lldb_private::ArchSpec::eMIPS_ABI_FP_64; break; case llvm::Mips::Val_GNU_MIPS_ABI_FP_64A: arch_flags |= lldb_private::ArchSpec::eMIPS_ABI_FP_64A; break; } } } // Settings appropriate ArchSpec ABI Flags switch (header.e_flags & llvm::ELF::EF_MIPS_ABI) { case llvm::ELF::EF_MIPS_ABI_O32: arch_flags |= lldb_private::ArchSpec::eMIPSABI_O32; break; case EF_MIPS_ABI_O64: arch_flags |= lldb_private::ArchSpec::eMIPSABI_O64; break; case EF_MIPS_ABI_EABI32: arch_flags |= lldb_private::ArchSpec::eMIPSABI_EABI32; break; case EF_MIPS_ABI_EABI64: arch_flags |= lldb_private::ArchSpec::eMIPSABI_EABI64; break; default: // ABI Mask doesn't cover N32 and N64 ABI. if (header.e_ident[EI_CLASS] == llvm::ELF::ELFCLASS64) arch_flags |= lldb_private::ArchSpec::eMIPSABI_N64; else if (header.e_flags && llvm::ELF::EF_MIPS_ABI2) arch_flags |= lldb_private::ArchSpec::eMIPSABI_N32; break; } arch_spec.SetFlags(arch_flags); } if (arch_spec.GetMachine() == llvm::Triple::arm || arch_spec.GetMachine() == llvm::Triple::thumb) { DataExtractor data; if (sheader.sh_type == SHT_ARM_ATTRIBUTES && section_size != 0 && set_data(data, sheader.sh_offset, section_size) == section_size) ParseARMAttributes(data, section_size, arch_spec); } if (name == g_sect_name_gnu_debuglink) { DataExtractor data; if (section_size && (set_data(data, sheader.sh_offset, section_size) == section_size)) { lldb::offset_t gnu_debuglink_offset = 0; gnu_debuglink_file = data.GetCStr(&gnu_debuglink_offset); gnu_debuglink_offset = llvm::alignTo(gnu_debuglink_offset, 4); data.GetU32(&gnu_debuglink_offset, &gnu_debuglink_crc, 1); } } // Process ELF note section entries. bool is_note_header = (sheader.sh_type == SHT_NOTE); // The section header ".note.android.ident" is stored as a // PROGBITS type header but it is actually a note header. static ConstString g_sect_name_android_ident(".note.android.ident"); if (!is_note_header && name == g_sect_name_android_ident) is_note_header = true; if (is_note_header) { // Allow notes to refine module info. DataExtractor data; if (section_size && (set_data(data, sheader.sh_offset, section_size) == section_size)) { Error error = RefineModuleDetailsFromNote(data, arch_spec, uuid); if (error.Fail()) { if (log) log->Printf("ObjectFileELF::%s ELF note processing failed: %s", __FUNCTION__, error.AsCString()); } } } } // Make any unknown triple components to be unspecified unknowns. if (arch_spec.GetTriple().getVendor() == llvm::Triple::UnknownVendor) arch_spec.GetTriple().setVendorName(llvm::StringRef()); if (arch_spec.GetTriple().getOS() == llvm::Triple::UnknownOS) arch_spec.GetTriple().setOSName(llvm::StringRef()); return section_headers.size(); } } section_headers.clear(); return 0; } size_t ObjectFileELF::GetProgramHeaderCount() { return ParseProgramHeaders(); } const elf::ELFProgramHeader * ObjectFileELF::GetProgramHeaderByIndex(lldb::user_id_t id) { if (!id || !ParseProgramHeaders()) return NULL; if (--id < m_program_headers.size()) return &m_program_headers[id]; return NULL; } DataExtractor ObjectFileELF::GetSegmentDataByIndex(lldb::user_id_t id) { const elf::ELFProgramHeader *segment_header = GetProgramHeaderByIndex(id); if (segment_header == NULL) return DataExtractor(); return DataExtractor(m_data, segment_header->p_offset, segment_header->p_filesz); } -std::string +llvm::StringRef ObjectFileELF::StripLinkerSymbolAnnotations(llvm::StringRef symbol_name) const { size_t pos = symbol_name.find('@'); - return symbol_name.substr(0, pos).str(); + return symbol_name.substr(0, pos); } //---------------------------------------------------------------------- // ParseSectionHeaders //---------------------------------------------------------------------- size_t ObjectFileELF::ParseSectionHeaders() { using namespace std::placeholders; return GetSectionHeaderInfo( m_section_headers, std::bind(&ObjectFileELF::SetDataWithReadMemoryFallback, this, _1, _2, _3), m_header, m_uuid, m_gnu_debuglink_file, m_gnu_debuglink_crc, m_arch_spec); } lldb::offset_t ObjectFileELF::SetData(const lldb_private::DataExtractor &src, lldb_private::DataExtractor &dst, lldb::offset_t offset, lldb::offset_t length) { return dst.SetData(src, offset, length); } lldb::offset_t ObjectFileELF::SetDataWithReadMemoryFallback(lldb_private::DataExtractor &dst, lldb::offset_t offset, lldb::offset_t length) { if (offset + length <= m_data.GetByteSize()) return dst.SetData(m_data, offset, length); const auto process_sp = m_process_wp.lock(); if (process_sp != nullptr) { addr_t file_size = offset + length; DataBufferSP data_sp = ReadMemory(process_sp, m_memory_addr, file_size); if (!data_sp) return false; m_data.SetData(data_sp, 0, file_size); } return dst.SetData(m_data, offset, length); } const ObjectFileELF::ELFSectionHeaderInfo * ObjectFileELF::GetSectionHeaderByIndex(lldb::user_id_t id) { if (!id || !ParseSectionHeaders()) return NULL; if (--id < m_section_headers.size()) return &m_section_headers[id]; return NULL; } lldb::user_id_t ObjectFileELF::GetSectionIndexByName(const char *name) { if (!name || !name[0] || !ParseSectionHeaders()) return 0; for (size_t i = 1; i < m_section_headers.size(); ++i) if (m_section_headers[i].section_name == ConstString(name)) return i; return 0; } void ObjectFileELF::CreateSections(SectionList &unified_section_list) { if (!m_sections_ap.get() && ParseSectionHeaders()) { m_sections_ap.reset(new SectionList()); for (SectionHeaderCollIter I = m_section_headers.begin(); I != m_section_headers.end(); ++I) { const ELFSectionHeaderInfo &header = *I; ConstString &name = I->section_name; const uint64_t file_size = header.sh_type == SHT_NOBITS ? 0 : header.sh_size; const uint64_t vm_size = header.sh_flags & SHF_ALLOC ? header.sh_size : 0; static ConstString g_sect_name_text(".text"); static ConstString g_sect_name_data(".data"); static ConstString g_sect_name_bss(".bss"); static ConstString g_sect_name_tdata(".tdata"); static ConstString g_sect_name_tbss(".tbss"); static ConstString g_sect_name_dwarf_debug_abbrev(".debug_abbrev"); static ConstString g_sect_name_dwarf_debug_addr(".debug_addr"); 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_macinfo(".debug_macinfo"); static ConstString g_sect_name_dwarf_debug_macro(".debug_macro"); 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_str_offsets( ".debug_str_offsets"); static ConstString g_sect_name_dwarf_debug_abbrev_dwo( ".debug_abbrev.dwo"); static ConstString g_sect_name_dwarf_debug_info_dwo(".debug_info.dwo"); static ConstString g_sect_name_dwarf_debug_line_dwo(".debug_line.dwo"); static ConstString g_sect_name_dwarf_debug_macro_dwo(".debug_macro.dwo"); static ConstString g_sect_name_dwarf_debug_loc_dwo(".debug_loc.dwo"); static ConstString g_sect_name_dwarf_debug_str_dwo(".debug_str.dwo"); static ConstString g_sect_name_dwarf_debug_str_offsets_dwo( ".debug_str_offsets.dwo"); static ConstString g_sect_name_eh_frame(".eh_frame"); static ConstString g_sect_name_arm_exidx(".ARM.exidx"); static ConstString g_sect_name_arm_extab(".ARM.extab"); static ConstString g_sect_name_go_symtab(".gosymtab"); SectionType sect_type = eSectionTypeOther; bool is_thread_specific = false; if (name == g_sect_name_text) sect_type = eSectionTypeCode; else if (name == g_sect_name_data) sect_type = eSectionTypeData; else if (name == g_sect_name_bss) sect_type = eSectionTypeZeroFill; else if (name == g_sect_name_tdata) { sect_type = eSectionTypeData; is_thread_specific = true; } else if (name == g_sect_name_tbss) { sect_type = eSectionTypeZeroFill; is_thread_specific = true; } // .debug_abbrev – Abbreviations used in the .debug_info section // .debug_aranges – Lookup table for mapping addresses to compilation // units // .debug_frame – Call frame information // .debug_info – The core DWARF information section // .debug_line – Line number information // .debug_loc – Location lists used in DW_AT_location attributes // .debug_macinfo – Macro information // .debug_pubnames – Lookup table for mapping object and function names to // compilation units // .debug_pubtypes – Lookup table for mapping type names to compilation // units // .debug_ranges – Address ranges used in DW_AT_ranges attributes // .debug_str – String table used in .debug_info // MISSING? .gnu_debugdata - "mini debuginfo / MiniDebugInfo" section, // http://sourceware.org/gdb/onlinedocs/gdb/MiniDebugInfo.html // MISSING? .debug-index - // http://src.chromium.org/viewvc/chrome/trunk/src/build/gdb-add-index?pathrev=144644 // MISSING? .debug_types - Type descriptions from DWARF 4? See // http://gcc.gnu.org/wiki/DwarfSeparateTypeInfo else if (name == g_sect_name_dwarf_debug_abbrev) sect_type = eSectionTypeDWARFDebugAbbrev; else if (name == g_sect_name_dwarf_debug_addr) sect_type = eSectionTypeDWARFDebugAddr; else if (name == g_sect_name_dwarf_debug_aranges) sect_type = eSectionTypeDWARFDebugAranges; else if (name == g_sect_name_dwarf_debug_frame) sect_type = eSectionTypeDWARFDebugFrame; else if (name == g_sect_name_dwarf_debug_info) sect_type = eSectionTypeDWARFDebugInfo; else if (name == g_sect_name_dwarf_debug_line) sect_type = eSectionTypeDWARFDebugLine; else if (name == g_sect_name_dwarf_debug_loc) sect_type = eSectionTypeDWARFDebugLoc; else if (name == g_sect_name_dwarf_debug_macinfo) sect_type = eSectionTypeDWARFDebugMacInfo; else if (name == g_sect_name_dwarf_debug_macro) sect_type = eSectionTypeDWARFDebugMacro; else if (name == g_sect_name_dwarf_debug_pubnames) sect_type = eSectionTypeDWARFDebugPubNames; else if (name == g_sect_name_dwarf_debug_pubtypes) sect_type = eSectionTypeDWARFDebugPubTypes; else if (name == g_sect_name_dwarf_debug_ranges) sect_type = eSectionTypeDWARFDebugRanges; else if (name == g_sect_name_dwarf_debug_str) sect_type = eSectionTypeDWARFDebugStr; else if (name == g_sect_name_dwarf_debug_str_offsets) sect_type = eSectionTypeDWARFDebugStrOffsets; else if (name == g_sect_name_dwarf_debug_abbrev_dwo) sect_type = eSectionTypeDWARFDebugAbbrev; else if (name == g_sect_name_dwarf_debug_info_dwo) sect_type = eSectionTypeDWARFDebugInfo; else if (name == g_sect_name_dwarf_debug_line_dwo) sect_type = eSectionTypeDWARFDebugLine; else if (name == g_sect_name_dwarf_debug_macro_dwo) sect_type = eSectionTypeDWARFDebugMacro; else if (name == g_sect_name_dwarf_debug_loc_dwo) sect_type = eSectionTypeDWARFDebugLoc; else if (name == g_sect_name_dwarf_debug_str_dwo) sect_type = eSectionTypeDWARFDebugStr; else if (name == g_sect_name_dwarf_debug_str_offsets_dwo) sect_type = eSectionTypeDWARFDebugStrOffsets; else if (name == g_sect_name_eh_frame) sect_type = eSectionTypeEHFrame; else if (name == g_sect_name_arm_exidx) sect_type = eSectionTypeARMexidx; else if (name == g_sect_name_arm_extab) sect_type = eSectionTypeARMextab; else if (name == g_sect_name_go_symtab) sect_type = eSectionTypeGoSymtab; const uint32_t permissions = ((header.sh_flags & SHF_ALLOC) ? ePermissionsReadable : 0u) | ((header.sh_flags & SHF_WRITE) ? ePermissionsWritable : 0u) | ((header.sh_flags & SHF_EXECINSTR) ? ePermissionsExecutable : 0u); switch (header.sh_type) { case SHT_SYMTAB: assert(sect_type == eSectionTypeOther); sect_type = eSectionTypeELFSymbolTable; break; case SHT_DYNSYM: assert(sect_type == eSectionTypeOther); sect_type = eSectionTypeELFDynamicSymbols; break; case SHT_RELA: case SHT_REL: assert(sect_type == eSectionTypeOther); sect_type = eSectionTypeELFRelocationEntries; break; case SHT_DYNAMIC: assert(sect_type == eSectionTypeOther); sect_type = eSectionTypeELFDynamicLinkInfo; break; } if (eSectionTypeOther == sect_type) { // the kalimba toolchain assumes that ELF section names are free-form. // It does // support linkscripts which (can) give rise to various arbitrarily // named // sections being "Code" or "Data". sect_type = kalimbaSectionType(m_header, header); } const uint32_t target_bytes_size = (eSectionTypeData == sect_type || eSectionTypeZeroFill == sect_type) ? m_arch_spec.GetDataByteSize() : eSectionTypeCode == sect_type ? m_arch_spec.GetCodeByteSize() : 1; elf::elf_xword log2align = (header.sh_addralign == 0) ? 0 : llvm::Log2_64(header.sh_addralign); SectionSP section_sp(new Section( GetModule(), // Module to which this section belongs. this, // ObjectFile to which this section belongs and should read // section data from. SectionIndex(I), // Section ID. name, // Section name. sect_type, // Section type. header.sh_addr, // VM address. vm_size, // VM size in bytes of this section. header.sh_offset, // Offset of this section in the file. file_size, // Size of the section as found in the file. log2align, // Alignment of the section header.sh_flags, // Flags for this section. target_bytes_size)); // Number of host bytes per target byte section_sp->SetPermissions(permissions); if (is_thread_specific) section_sp->SetIsThreadSpecific(is_thread_specific); m_sections_ap->AddSection(section_sp); } } if (m_sections_ap.get()) { if (GetType() == eTypeDebugInfo) { static const SectionType g_sections[] = { eSectionTypeDWARFDebugAbbrev, eSectionTypeDWARFDebugAddr, eSectionTypeDWARFDebugAranges, eSectionTypeDWARFDebugFrame, eSectionTypeDWARFDebugInfo, eSectionTypeDWARFDebugLine, eSectionTypeDWARFDebugLoc, eSectionTypeDWARFDebugMacInfo, eSectionTypeDWARFDebugPubNames, eSectionTypeDWARFDebugPubTypes, eSectionTypeDWARFDebugRanges, eSectionTypeDWARFDebugStr, eSectionTypeDWARFDebugStrOffsets, eSectionTypeELFSymbolTable, }; SectionList *elf_section_list = m_sections_ap.get(); for (size_t idx = 0; idx < sizeof(g_sections) / sizeof(g_sections[0]); ++idx) { SectionType section_type = g_sections[idx]; SectionSP section_sp( elf_section_list->FindSectionByType(section_type, true)); if (section_sp) { SectionSP module_section_sp( unified_section_list.FindSectionByType(section_type, true)); if (module_section_sp) unified_section_list.ReplaceSection(module_section_sp->GetID(), section_sp); else unified_section_list.AddSection(section_sp); } } } else { unified_section_list = *m_sections_ap; } } } // Find the arm/aarch64 mapping symbol character in the given symbol name. // Mapping symbols have the // form of "$[.]*". Additionally we recognize cases when the mapping // symbol prefixed by // an arbitrary string because if a symbol prefix added to each symbol in the // object file with // objcopy then the mapping symbols are also prefixed. static char FindArmAarch64MappingSymbol(const char *symbol_name) { if (!symbol_name) return '\0'; const char *dollar_pos = ::strchr(symbol_name, '$'); if (!dollar_pos || dollar_pos[1] == '\0') return '\0'; if (dollar_pos[2] == '\0' || dollar_pos[2] == '.') return dollar_pos[1]; return '\0'; } #define STO_MIPS_ISA (3 << 6) #define STO_MICROMIPS (2 << 6) #define IS_MICROMIPS(ST_OTHER) (((ST_OTHER)&STO_MIPS_ISA) == STO_MICROMIPS) // private unsigned ObjectFileELF::ParseSymbols(Symtab *symtab, user_id_t start_id, SectionList *section_list, const size_t num_symbols, const DataExtractor &symtab_data, const DataExtractor &strtab_data) { ELFSymbol symbol; lldb::offset_t offset = 0; static ConstString text_section_name(".text"); static ConstString init_section_name(".init"); static ConstString fini_section_name(".fini"); static ConstString ctors_section_name(".ctors"); static ConstString dtors_section_name(".dtors"); static ConstString data_section_name(".data"); static ConstString rodata_section_name(".rodata"); static ConstString rodata1_section_name(".rodata1"); static ConstString data2_section_name(".data1"); static ConstString bss_section_name(".bss"); static ConstString opd_section_name(".opd"); // For ppc64 // On Android the oatdata and the oatexec symbols in the oat and odex files // covers the full // .text section what causes issues with displaying unusable symbol name to // the user and very // slow unwinding speed because the instruction emulation based unwind plans // try to emulate all // instructions in these symbols. Don't add these symbols to the symbol list // as they have no // use for the debugger and they are causing a lot of trouble. // Filtering can't be restricted to Android because this special object file // don't contain the // note section specifying the environment to Android but the custom extension // and file name // makes it highly unlikely that this will collide with anything else. ConstString file_extension = m_file.GetFileNameExtension(); bool skip_oatdata_oatexec = file_extension == ConstString("oat") || file_extension == ConstString("odex"); ArchSpec arch; GetArchitecture(arch); ModuleSP module_sp(GetModule()); SectionList *module_section_list = module_sp ? module_sp->GetSectionList() : nullptr; // Local cache to avoid doing a FindSectionByName for each symbol. The "const // char*" key must // came from a ConstString object so they can be compared by pointer std::unordered_map section_name_to_section; unsigned i; for (i = 0; i < num_symbols; ++i) { if (symbol.Parse(symtab_data, &offset) == false) break; const char *symbol_name = strtab_data.PeekCStr(symbol.st_name); if (!symbol_name) symbol_name = ""; // No need to add non-section symbols that have no names if (symbol.getType() != STT_SECTION && (symbol_name == nullptr || symbol_name[0] == '\0')) continue; // Skipping oatdata and oatexec sections if it is requested. See details // above the // definition of skip_oatdata_oatexec for the reasons. if (skip_oatdata_oatexec && (::strcmp(symbol_name, "oatdata") == 0 || ::strcmp(symbol_name, "oatexec") == 0)) continue; SectionSP symbol_section_sp; SymbolType symbol_type = eSymbolTypeInvalid; Elf64_Half section_idx = symbol.st_shndx; switch (section_idx) { case SHN_ABS: symbol_type = eSymbolTypeAbsolute; break; case SHN_UNDEF: symbol_type = eSymbolTypeUndefined; break; default: symbol_section_sp = section_list->GetSectionAtIndex(section_idx); break; } // If a symbol is undefined do not process it further even if it has a STT // type if (symbol_type != eSymbolTypeUndefined) { switch (symbol.getType()) { default: case STT_NOTYPE: // The symbol's type is not specified. break; case STT_OBJECT: // The symbol is associated with a data object, such as a variable, // an array, etc. symbol_type = eSymbolTypeData; break; case STT_FUNC: // The symbol is associated with a function or other executable code. symbol_type = eSymbolTypeCode; break; case STT_SECTION: // The symbol is associated with a section. Symbol table entries of // this type exist primarily for relocation and normally have // STB_LOCAL binding. break; case STT_FILE: // Conventionally, the symbol's name gives the name of the source // file associated with the object file. A file symbol has STB_LOCAL // binding, its section index is SHN_ABS, and it precedes the other // STB_LOCAL symbols for the file, if it is present. symbol_type = eSymbolTypeSourceFile; break; case STT_GNU_IFUNC: // The symbol is associated with an indirect function. The actual // function will be resolved if it is referenced. symbol_type = eSymbolTypeResolver; break; } } if (symbol_type == eSymbolTypeInvalid && symbol.getType() != STT_SECTION) { if (symbol_section_sp) { const ConstString §_name = symbol_section_sp->GetName(); if (sect_name == text_section_name || sect_name == init_section_name || sect_name == fini_section_name || sect_name == ctors_section_name || sect_name == dtors_section_name) { symbol_type = eSymbolTypeCode; } else if (sect_name == data_section_name || sect_name == data2_section_name || sect_name == rodata_section_name || sect_name == rodata1_section_name || sect_name == bss_section_name) { symbol_type = eSymbolTypeData; } } } int64_t symbol_value_offset = 0; uint32_t additional_flags = 0; if (arch.IsValid()) { if (arch.GetMachine() == llvm::Triple::arm) { if (symbol.getBinding() == STB_LOCAL) { char mapping_symbol = FindArmAarch64MappingSymbol(symbol_name); if (symbol_type == eSymbolTypeCode) { switch (mapping_symbol) { case 'a': // $a[.]* - marks an ARM instruction sequence m_address_class_map[symbol.st_value] = eAddressClassCode; break; case 'b': case 't': // $b[.]* - marks a THUMB BL instruction sequence // $t[.]* - marks a THUMB instruction sequence m_address_class_map[symbol.st_value] = eAddressClassCodeAlternateISA; break; case 'd': // $d[.]* - marks a data item sequence (e.g. lit pool) m_address_class_map[symbol.st_value] = eAddressClassData; break; } } if (mapping_symbol) continue; } } else if (arch.GetMachine() == llvm::Triple::aarch64) { if (symbol.getBinding() == STB_LOCAL) { char mapping_symbol = FindArmAarch64MappingSymbol(symbol_name); if (symbol_type == eSymbolTypeCode) { switch (mapping_symbol) { case 'x': // $x[.]* - marks an A64 instruction sequence m_address_class_map[symbol.st_value] = eAddressClassCode; break; case 'd': // $d[.]* - marks a data item sequence (e.g. lit pool) m_address_class_map[symbol.st_value] = eAddressClassData; break; } } if (mapping_symbol) continue; } } if (arch.GetMachine() == llvm::Triple::arm) { if (symbol_type == eSymbolTypeCode) { if (symbol.st_value & 1) { // Subtracting 1 from the address effectively unsets // the low order bit, which results in the address // actually pointing to the beginning of the symbol. // This delta will be used below in conjunction with // symbol.st_value to produce the final symbol_value // that we store in the symtab. symbol_value_offset = -1; m_address_class_map[symbol.st_value ^ 1] = eAddressClassCodeAlternateISA; } else { // This address is ARM m_address_class_map[symbol.st_value] = eAddressClassCode; } } } /* * MIPS: * The bit #0 of an address is used for ISA mode (1 for microMIPS, 0 for * MIPS). * This allows processor to switch between microMIPS and MIPS without any * need * for special mode-control register. However, apart from .debug_line, * none of * the ELF/DWARF sections set the ISA bit (for symbol or section). Use * st_other * flag to check whether the symbol is microMIPS and then set the address * class * accordingly. */ const llvm::Triple::ArchType llvm_arch = arch.GetMachine(); if (llvm_arch == llvm::Triple::mips || llvm_arch == llvm::Triple::mipsel || llvm_arch == llvm::Triple::mips64 || llvm_arch == llvm::Triple::mips64el) { if (IS_MICROMIPS(symbol.st_other)) m_address_class_map[symbol.st_value] = eAddressClassCodeAlternateISA; else if ((symbol.st_value & 1) && (symbol_type == eSymbolTypeCode)) { symbol.st_value = symbol.st_value & (~1ull); m_address_class_map[symbol.st_value] = eAddressClassCodeAlternateISA; } else { if (symbol_type == eSymbolTypeCode) m_address_class_map[symbol.st_value] = eAddressClassCode; else if (symbol_type == eSymbolTypeData) m_address_class_map[symbol.st_value] = eAddressClassData; else m_address_class_map[symbol.st_value] = eAddressClassUnknown; } } } // symbol_value_offset may contain 0 for ARM symbols or -1 for THUMB // symbols. See above for // more details. uint64_t symbol_value = symbol.st_value + symbol_value_offset; if (symbol_section_sp == nullptr && section_idx == SHN_ABS && symbol.st_size != 0) { // We don't have a section for a symbol with non-zero size. Create a new // section for it // so the address range covered by the symbol is also covered by the // module (represented // through the section list). It is needed so module lookup for the // addresses covered // by this symbol will be successfull. This case happens for absolute // symbols. ConstString fake_section_name(std::string(".absolute.") + symbol_name); symbol_section_sp = std::make_shared
(module_sp, this, SHN_ABS, fake_section_name, eSectionTypeAbsoluteAddress, symbol_value, symbol.st_size, 0, 0, 0, SHF_ALLOC); module_section_list->AddSection(symbol_section_sp); section_list->AddSection(symbol_section_sp); } if (symbol_section_sp && CalculateType() != ObjectFile::Type::eTypeObjectFile) symbol_value -= symbol_section_sp->GetFileAddress(); if (symbol_section_sp && module_section_list && module_section_list != section_list) { const ConstString §_name = symbol_section_sp->GetName(); auto section_it = section_name_to_section.find(sect_name.GetCString()); if (section_it == section_name_to_section.end()) section_it = section_name_to_section .emplace(sect_name.GetCString(), module_section_list->FindSectionByName(sect_name)) .first; - if (section_it->second && section_it->second->GetFileSize()) + if (section_it->second) symbol_section_sp = section_it->second; } 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 // temporarily. 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); // Now append the suffix back to mangled and unmangled names. Only do it if // the // demangling was successful (string is not empty). if (has_suffix) { llvm::StringRef suffix = symbol_ref.substr(version_pos); llvm::StringRef mangled_name = mangled.GetMangledName().GetStringRef(); if (!mangled_name.empty()) mangled.SetMangledName(ConstString((mangled_name + suffix).str())); ConstString demangled = mangled.GetDemangledName(lldb::eLanguageTypeUnknown); llvm::StringRef demangled_name = demangled.GetStringRef(); if (!demangled_name.empty()) mangled.SetDemangledName(ConstString((demangled_name + suffix).str())); } // In ELF all symbol should have a valid size but it is not true for some // function symbols // coming from hand written assembly. As none of the function symbol should // have 0 size we // try to calculate the size for these symbols in the symtab with saying // that their original // size is not valid. bool symbol_size_valid = symbol.st_size != 0 || symbol.getType() != STT_FUNC; Symbol dc_symbol( i + start_id, // ID is the original symbol table index. mangled, symbol_type, // Type of this symbol is_global, // Is this globally visible? false, // Is this symbol debug info? false, // Is this symbol a trampoline? false, // Is this symbol artificial? AddressRange(symbol_section_sp, // Section in which this symbol is // defined or null. symbol_value, // Offset in section or symbol value. symbol.st_size), // Size in bytes of this symbol. symbol_size_valid, // Symbol size is valid has_suffix, // Contains linker annotations? flags); // Symbol flags. symtab->AddSymbol(dc_symbol); } return i; } unsigned ObjectFileELF::ParseSymbolTable(Symtab *symbol_table, user_id_t start_id, lldb_private::Section *symtab) { if (symtab->GetObjectFile() != this) { // If the symbol table section is owned by a different object file, have it // do the // parsing. ObjectFileELF *obj_file_elf = static_cast(symtab->GetObjectFile()); return obj_file_elf->ParseSymbolTable(symbol_table, start_id, symtab); } // Get section list for this object file. SectionList *section_list = m_sections_ap.get(); if (!section_list) return 0; user_id_t symtab_id = symtab->GetID(); const ELFSectionHeaderInfo *symtab_hdr = GetSectionHeaderByIndex(symtab_id); assert(symtab_hdr->sh_type == SHT_SYMTAB || symtab_hdr->sh_type == SHT_DYNSYM); // sh_link: section header index of associated string table. // Section ID's are ones based. user_id_t strtab_id = symtab_hdr->sh_link + 1; Section *strtab = section_list->FindSectionByID(strtab_id).get(); if (symtab && strtab) { assert(symtab->GetObjectFile() == this); assert(strtab->GetObjectFile() == this); DataExtractor symtab_data; DataExtractor strtab_data; if (ReadSectionData(symtab, symtab_data) && ReadSectionData(strtab, strtab_data)) { size_t num_symbols = symtab_data.GetByteSize() / symtab_hdr->sh_entsize; return ParseSymbols(symbol_table, start_id, section_list, num_symbols, symtab_data, strtab_data); } } return 0; } size_t ObjectFileELF::ParseDynamicSymbols() { if (m_dynamic_symbols.size()) return m_dynamic_symbols.size(); SectionList *section_list = GetSectionList(); if (!section_list) return 0; // Find the SHT_DYNAMIC section. Section *dynsym = section_list->FindSectionByType(eSectionTypeELFDynamicLinkInfo, true) .get(); if (!dynsym) return 0; assert(dynsym->GetObjectFile() == this); ELFDynamic symbol; DataExtractor dynsym_data; if (ReadSectionData(dynsym, dynsym_data)) { const lldb::offset_t section_size = dynsym_data.GetByteSize(); lldb::offset_t cursor = 0; while (cursor < section_size) { if (!symbol.Parse(dynsym_data, &cursor)) break; m_dynamic_symbols.push_back(symbol); } } return m_dynamic_symbols.size(); } const ELFDynamic *ObjectFileELF::FindDynamicSymbol(unsigned tag) { if (!ParseDynamicSymbols()) return NULL; DynamicSymbolCollIter I = m_dynamic_symbols.begin(); DynamicSymbolCollIter E = m_dynamic_symbols.end(); for (; I != E; ++I) { ELFDynamic *symbol = &*I; if (symbol->d_tag == tag) return symbol; } return NULL; } unsigned ObjectFileELF::PLTRelocationType() { // DT_PLTREL // This member specifies the type of relocation entry to which the // procedure linkage table refers. The d_val member holds DT_REL or // DT_RELA, as appropriate. All relocations in a procedure linkage table // must use the same relocation. const ELFDynamic *symbol = FindDynamicSymbol(DT_PLTREL); if (symbol) return symbol->d_val; return 0; } // Returns the size of the normal plt entries and the offset of the first normal // plt entry. The // 0th entry in the plt table is usually a resolution entry which have different // size in some // architectures then the rest of the plt entries. static std::pair GetPltEntrySizeAndOffset(const ELFSectionHeader *rel_hdr, const ELFSectionHeader *plt_hdr) { const elf_xword num_relocations = rel_hdr->sh_size / rel_hdr->sh_entsize; // Clang 3.3 sets entsize to 4 for 32-bit binaries, but the plt entries are 16 // bytes. // So round the entsize up by the alignment if addralign is set. elf_xword plt_entsize = plt_hdr->sh_addralign ? llvm::alignTo(plt_hdr->sh_entsize, plt_hdr->sh_addralign) : plt_hdr->sh_entsize; // Some linkers e.g ld for arm, fill plt_hdr->sh_entsize field incorrectly. // PLT entries relocation code in general requires multiple instruction and // should be greater than 4 bytes in most cases. Try to guess correct size // just in case. if (plt_entsize <= 4) { // The linker haven't set the plt_hdr->sh_entsize field. Try to guess the // size of the plt // entries based on the number of entries and the size of the plt section // with the // assumption that the size of the 0th entry is at least as big as the size // of the normal // entries and it isn't much bigger then that. if (plt_hdr->sh_addralign) plt_entsize = plt_hdr->sh_size / plt_hdr->sh_addralign / (num_relocations + 1) * plt_hdr->sh_addralign; else plt_entsize = plt_hdr->sh_size / (num_relocations + 1); } elf_xword plt_offset = plt_hdr->sh_size - num_relocations * plt_entsize; return std::make_pair(plt_entsize, plt_offset); } static unsigned ParsePLTRelocations( Symtab *symbol_table, user_id_t start_id, unsigned rel_type, const ELFHeader *hdr, const ELFSectionHeader *rel_hdr, const ELFSectionHeader *plt_hdr, const ELFSectionHeader *sym_hdr, const lldb::SectionSP &plt_section_sp, DataExtractor &rel_data, DataExtractor &symtab_data, DataExtractor &strtab_data) { ELFRelocation rel(rel_type); ELFSymbol symbol; lldb::offset_t offset = 0; uint64_t plt_offset, plt_entsize; std::tie(plt_entsize, plt_offset) = GetPltEntrySizeAndOffset(rel_hdr, plt_hdr); const elf_xword num_relocations = rel_hdr->sh_size / rel_hdr->sh_entsize; typedef unsigned (*reloc_info_fn)(const ELFRelocation &rel); reloc_info_fn reloc_type; reloc_info_fn reloc_symbol; if (hdr->Is32Bit()) { reloc_type = ELFRelocation::RelocType32; reloc_symbol = ELFRelocation::RelocSymbol32; } else { reloc_type = ELFRelocation::RelocType64; reloc_symbol = ELFRelocation::RelocSymbol64; } unsigned slot_type = hdr->GetRelocationJumpSlotType(); unsigned i; for (i = 0; i < num_relocations; ++i) { if (rel.Parse(rel_data, &offset) == false) break; if (reloc_type(rel) != slot_type) continue; lldb::offset_t symbol_offset = reloc_symbol(rel) * sym_hdr->sh_entsize; if (!symbol.Parse(symtab_data, &symbol_offset)) 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? true, // Is this symbol a trampoline? true, // Is this symbol artificial? plt_section_sp, // Section in which this symbol is defined or null. plt_index, // Offset in section or symbol value. plt_entsize, // Size in bytes of this symbol. true, // Size is valid false, // Contains linker annotations? 0); // Symbol flags. symbol_table->AddSymbol(jump_symbol); } return i; } unsigned ObjectFileELF::ParseTrampolineSymbols(Symtab *symbol_table, user_id_t start_id, const ELFSectionHeaderInfo *rel_hdr, user_id_t rel_id) { assert(rel_hdr->sh_type == SHT_RELA || rel_hdr->sh_type == SHT_REL); // The link field points to the associated symbol table. user_id_t symtab_id = rel_hdr->sh_link; // If the link field doesn't point to the appropriate symbol name table then // try to find it by name as some compiler don't fill in the link fields. if (!symtab_id) symtab_id = GetSectionIndexByName(".dynsym"); // Get PLT section. We cannot use rel_hdr->sh_info, since current linkers // point that to the .got.plt or .got section instead of .plt. user_id_t plt_id = GetSectionIndexByName(".plt"); if (!symtab_id || !plt_id) return 0; // Section ID's are ones based; symtab_id++; plt_id++; const ELFSectionHeaderInfo *plt_hdr = GetSectionHeaderByIndex(plt_id); if (!plt_hdr) return 0; const ELFSectionHeaderInfo *sym_hdr = GetSectionHeaderByIndex(symtab_id); if (!sym_hdr) return 0; SectionList *section_list = m_sections_ap.get(); if (!section_list) return 0; Section *rel_section = section_list->FindSectionByID(rel_id).get(); if (!rel_section) return 0; SectionSP plt_section_sp(section_list->FindSectionByID(plt_id)); if (!plt_section_sp) return 0; Section *symtab = section_list->FindSectionByID(symtab_id).get(); if (!symtab) return 0; // sh_link points to associated string table. Section *strtab = section_list->FindSectionByID(sym_hdr->sh_link + 1).get(); if (!strtab) return 0; DataExtractor rel_data; if (!ReadSectionData(rel_section, rel_data)) return 0; DataExtractor symtab_data; if (!ReadSectionData(symtab, symtab_data)) return 0; DataExtractor strtab_data; if (!ReadSectionData(strtab, strtab_data)) return 0; unsigned rel_type = PLTRelocationType(); if (!rel_type) return 0; return ParsePLTRelocations(symbol_table, start_id, rel_type, &m_header, rel_hdr, plt_hdr, sym_hdr, plt_section_sp, rel_data, symtab_data, strtab_data); } unsigned ObjectFileELF::RelocateSection( Symtab *symtab, const ELFHeader *hdr, const ELFSectionHeader *rel_hdr, const ELFSectionHeader *symtab_hdr, const ELFSectionHeader *debug_hdr, DataExtractor &rel_data, DataExtractor &symtab_data, DataExtractor &debug_data, Section *rel_section) { ELFRelocation rel(rel_hdr->sh_type); lldb::addr_t offset = 0; const unsigned num_relocations = rel_hdr->sh_size / rel_hdr->sh_entsize; typedef unsigned (*reloc_info_fn)(const ELFRelocation &rel); reloc_info_fn reloc_type; reloc_info_fn reloc_symbol; if (hdr->Is32Bit()) { reloc_type = ELFRelocation::RelocType32; reloc_symbol = ELFRelocation::RelocSymbol32; } else { reloc_type = ELFRelocation::RelocType64; reloc_symbol = ELFRelocation::RelocSymbol64; } for (unsigned i = 0; i < num_relocations; ++i) { if (rel.Parse(rel_data, &offset) == false) break; Symbol *symbol = NULL; if (hdr->Is32Bit()) { switch (reloc_type(rel)) { case R_386_32: case R_386_PC32: default: assert(false && "unexpected relocation type"); } } else { switch (reloc_type(rel)) { case R_X86_64_64: { symbol = symtab->FindSymbolByID(reloc_symbol(rel)); if (symbol) { addr_t value = symbol->GetAddressRef().GetFileAddress(); DataBufferSP &data_buffer_sp = debug_data.GetSharedDataBuffer(); uint64_t *dst = reinterpret_cast( data_buffer_sp->GetBytes() + rel_section->GetFileOffset() + ELFRelocation::RelocOffset64(rel)); *dst = value + ELFRelocation::RelocAddend64(rel); } break; } case R_X86_64_32: case R_X86_64_32S: { symbol = symtab->FindSymbolByID(reloc_symbol(rel)); if (symbol) { addr_t value = symbol->GetAddressRef().GetFileAddress(); value += ELFRelocation::RelocAddend32(rel); assert( (reloc_type(rel) == R_X86_64_32 && (value <= UINT32_MAX)) || (reloc_type(rel) == R_X86_64_32S && ((int64_t)value <= INT32_MAX && (int64_t)value >= INT32_MIN))); uint32_t truncated_addr = (value & 0xFFFFFFFF); DataBufferSP &data_buffer_sp = debug_data.GetSharedDataBuffer(); uint32_t *dst = reinterpret_cast( data_buffer_sp->GetBytes() + rel_section->GetFileOffset() + ELFRelocation::RelocOffset32(rel)); *dst = truncated_addr; } break; } case R_X86_64_PC32: default: assert(false && "unexpected relocation type"); } } } return 0; } unsigned ObjectFileELF::RelocateDebugSections(const ELFSectionHeader *rel_hdr, user_id_t rel_id) { assert(rel_hdr->sh_type == SHT_RELA || rel_hdr->sh_type == SHT_REL); // Parse in the section list if needed. SectionList *section_list = GetSectionList(); if (!section_list) return 0; // Section ID's are ones based. user_id_t symtab_id = rel_hdr->sh_link + 1; user_id_t debug_id = rel_hdr->sh_info + 1; const ELFSectionHeader *symtab_hdr = GetSectionHeaderByIndex(symtab_id); if (!symtab_hdr) return 0; const ELFSectionHeader *debug_hdr = GetSectionHeaderByIndex(debug_id); if (!debug_hdr) return 0; Section *rel = section_list->FindSectionByID(rel_id).get(); if (!rel) return 0; Section *symtab = section_list->FindSectionByID(symtab_id).get(); if (!symtab) return 0; Section *debug = section_list->FindSectionByID(debug_id).get(); if (!debug) return 0; DataExtractor rel_data; DataExtractor symtab_data; DataExtractor debug_data; if (ReadSectionData(rel, rel_data) && ReadSectionData(symtab, symtab_data) && ReadSectionData(debug, debug_data)) { RelocateSection(m_symtab_ap.get(), &m_header, rel_hdr, symtab_hdr, debug_hdr, rel_data, symtab_data, debug_data, debug); } return 0; } Symtab *ObjectFileELF::GetSymtab() { ModuleSP module_sp(GetModule()); if (!module_sp) return NULL; // We always want to use the main object file so we (hopefully) only have one // cached copy // of our symtab, dynamic sections, etc. ObjectFile *module_obj_file = module_sp->GetObjectFile(); if (module_obj_file && module_obj_file != this) return module_obj_file->GetSymtab(); if (m_symtab_ap.get() == NULL) { SectionList *section_list = module_sp->GetSectionList(); if (!section_list) return NULL; uint64_t symbol_id = 0; std::lock_guard guard(module_sp->GetMutex()); // Sharable objects and dynamic executables usually have 2 distinct symbol // tables, one named ".symtab", and the other ".dynsym". The dynsym is a // smaller // version of the symtab that only contains global symbols. The information // found // in the dynsym is therefore also found in the symtab, 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_ap.reset(new Symtab(symtab->GetObjectFile())); symbol_id += ParseSymbolTable(m_symtab_ap.get(), symbol_id, symtab); } // DT_JMPREL // If present, this entry's d_ptr member holds the address of // relocation // entries associated solely with the procedure linkage table. // Separating // these relocation entries lets the dynamic linker ignore them during // process initialization, if lazy binding is enabled. If this entry is // present, the related entries of types DT_PLTRELSZ and DT_PLTREL must // also be present. const ELFDynamic *symbol = FindDynamicSymbol(DT_JMPREL); if (symbol) { // Synthesize trampoline symbols to help navigate the PLT. addr_t addr = symbol->d_ptr; Section *reloc_section = section_list->FindSectionContainingFileAddress(addr).get(); if (reloc_section) { user_id_t reloc_id = reloc_section->GetID(); const ELFSectionHeaderInfo *reloc_header = GetSectionHeaderByIndex(reloc_id); assert(reloc_header); if (m_symtab_ap == nullptr) m_symtab_ap.reset(new Symtab(reloc_section->GetObjectFile())); ParseTrampolineSymbols(m_symtab_ap.get(), symbol_id, reloc_header, reloc_id); } } DWARFCallFrameInfo *eh_frame = GetUnwindTable().GetEHFrameInfo(); if (eh_frame) { if (m_symtab_ap == nullptr) m_symtab_ap.reset(new Symtab(this)); ParseUnwindSymbols(m_symtab_ap.get(), eh_frame); } // If we still don't have any symtab then create an empty instance to avoid // do the section // lookup next time. if (m_symtab_ap == nullptr) m_symtab_ap.reset(new Symtab(this)); m_symtab_ap->CalculateSymbolSizes(); } for (SectionHeaderCollIter I = m_section_headers.begin(); I != m_section_headers.end(); ++I) { if (I->sh_type == SHT_RELA || I->sh_type == SHT_REL) { if (CalculateType() == eTypeObjectFile) { const char *section_name = I->section_name.AsCString(""); if (strstr(section_name, ".rela.debug") || strstr(section_name, ".rel.debug")) { const ELFSectionHeader &reloc_header = *I; user_id_t reloc_id = SectionIndex(I); RelocateDebugSections(&reloc_header, reloc_id); } } } } return m_symtab_ap.get(); } void ObjectFileELF::ParseUnwindSymbols(Symtab *symbol_table, DWARFCallFrameInfo *eh_frame) { SectionList *section_list = GetSectionList(); if (!section_list) return; // First we save the new symbols into a separate list and add them to the // symbol table after // we colleced all symbols we want to add. This is neccessary because adding a // new symbol // invalidates the internal index of the symtab what causing the next lookup // to be slow because // it have to recalculate the index first. std::vector new_symbols; eh_frame->ForEachFDEEntries([this, symbol_table, section_list, &new_symbols]( lldb::addr_t file_addr, uint32_t size, dw_offset_t) { Symbol *symbol = symbol_table->FindSymbolAtFileAddress(file_addr); if (symbol) { if (!symbol->GetByteSizeIsValid()) { symbol->SetByteSize(size); symbol->SetSizeIsSynthesized(true); } } else { SectionSP section_sp = section_list->FindSectionContainingFileAddress(file_addr); if (section_sp) { addr_t offset = file_addr - section_sp->GetFileAddress(); const char *symbol_name = GetNextSyntheticSymbolName().GetCString(); uint64_t symbol_id = symbol_table->GetNumSymbols(); 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? false, // Is this symbol a trampoline? true, // Is this symbol artificial? section_sp, // Section in which this symbol is defined or null. offset, // Offset in section or symbol value. 0, // Size: Don't specify the size as an FDE can false, // Size is valid: cover multiple symbols. false, // Contains linker annotations? 0); // Symbol flags. new_symbols.push_back(eh_symbol); } } return true; }); for (const Symbol &s : new_symbols) symbol_table->AddSymbol(s); } bool ObjectFileELF::IsStripped() { // TODO: determine this for ELF return false; } //===----------------------------------------------------------------------===// // Dump // // Dump the specifics of the runtime file container (such as any headers // segments, sections, etc). //---------------------------------------------------------------------- void ObjectFileELF::Dump(Stream *s) { ModuleSP module_sp(GetModule()); if (!module_sp) { return; } std::lock_guard guard(module_sp->GetMutex()); s->Printf("%p: ", static_cast(this)); s->Indent(); s->PutCString("ObjectFileELF"); ArchSpec header_arch; GetArchitecture(header_arch); *s << ", file = '" << m_file << "', arch = " << header_arch.GetArchitectureName() << "\n"; DumpELFHeader(s, m_header); s->EOL(); DumpELFProgramHeaders(s); s->EOL(); DumpELFSectionHeaders(s); s->EOL(); SectionList *section_list = GetSectionList(); if (section_list) section_list->Dump(s, NULL, true, UINT32_MAX); Symtab *symtab = GetSymtab(); if (symtab) symtab->Dump(s, NULL, eSortOrderNone); s->EOL(); DumpDependentModules(s); s->EOL(); } //---------------------------------------------------------------------- // DumpELFHeader // // Dump the ELF header to the specified output stream //---------------------------------------------------------------------- void ObjectFileELF::DumpELFHeader(Stream *s, const ELFHeader &header) { s->PutCString("ELF Header\n"); s->Printf("e_ident[EI_MAG0 ] = 0x%2.2x\n", header.e_ident[EI_MAG0]); s->Printf("e_ident[EI_MAG1 ] = 0x%2.2x '%c'\n", header.e_ident[EI_MAG1], header.e_ident[EI_MAG1]); s->Printf("e_ident[EI_MAG2 ] = 0x%2.2x '%c'\n", header.e_ident[EI_MAG2], header.e_ident[EI_MAG2]); s->Printf("e_ident[EI_MAG3 ] = 0x%2.2x '%c'\n", header.e_ident[EI_MAG3], header.e_ident[EI_MAG3]); s->Printf("e_ident[EI_CLASS ] = 0x%2.2x\n", header.e_ident[EI_CLASS]); s->Printf("e_ident[EI_DATA ] = 0x%2.2x ", header.e_ident[EI_DATA]); DumpELFHeader_e_ident_EI_DATA(s, header.e_ident[EI_DATA]); s->Printf("\ne_ident[EI_VERSION] = 0x%2.2x\n", header.e_ident[EI_VERSION]); s->Printf("e_ident[EI_PAD ] = 0x%2.2x\n", header.e_ident[EI_PAD]); s->Printf("e_type = 0x%4.4x ", header.e_type); DumpELFHeader_e_type(s, header.e_type); s->Printf("\ne_machine = 0x%4.4x\n", header.e_machine); s->Printf("e_version = 0x%8.8x\n", header.e_version); s->Printf("e_entry = 0x%8.8" PRIx64 "\n", header.e_entry); s->Printf("e_phoff = 0x%8.8" PRIx64 "\n", header.e_phoff); s->Printf("e_shoff = 0x%8.8" PRIx64 "\n", header.e_shoff); s->Printf("e_flags = 0x%8.8x\n", header.e_flags); s->Printf("e_ehsize = 0x%4.4x\n", header.e_ehsize); s->Printf("e_phentsize = 0x%4.4x\n", header.e_phentsize); s->Printf("e_phnum = 0x%8.8x\n", header.e_phnum); s->Printf("e_shentsize = 0x%4.4x\n", header.e_shentsize); s->Printf("e_shnum = 0x%8.8x\n", header.e_shnum); s->Printf("e_shstrndx = 0x%8.8x\n", header.e_shstrndx); } //---------------------------------------------------------------------- // DumpELFHeader_e_type // // Dump an token value for the ELF header member e_type //---------------------------------------------------------------------- void ObjectFileELF::DumpELFHeader_e_type(Stream *s, elf_half e_type) { switch (e_type) { case ET_NONE: *s << "ET_NONE"; break; case ET_REL: *s << "ET_REL"; break; case ET_EXEC: *s << "ET_EXEC"; break; case ET_DYN: *s << "ET_DYN"; break; case ET_CORE: *s << "ET_CORE"; break; default: break; } } //---------------------------------------------------------------------- // DumpELFHeader_e_ident_EI_DATA // // Dump an token value for the ELF header member e_ident[EI_DATA] //---------------------------------------------------------------------- void ObjectFileELF::DumpELFHeader_e_ident_EI_DATA(Stream *s, unsigned char ei_data) { switch (ei_data) { case ELFDATANONE: *s << "ELFDATANONE"; break; case ELFDATA2LSB: *s << "ELFDATA2LSB - Little Endian"; break; case ELFDATA2MSB: *s << "ELFDATA2MSB - Big Endian"; break; default: break; } } //---------------------------------------------------------------------- // DumpELFProgramHeader // // Dump a single ELF program header to the specified output stream //---------------------------------------------------------------------- void ObjectFileELF::DumpELFProgramHeader(Stream *s, const ELFProgramHeader &ph) { DumpELFProgramHeader_p_type(s, ph.p_type); s->Printf(" %8.8" PRIx64 " %8.8" PRIx64 " %8.8" PRIx64, ph.p_offset, ph.p_vaddr, ph.p_paddr); s->Printf(" %8.8" PRIx64 " %8.8" PRIx64 " %8.8x (", ph.p_filesz, ph.p_memsz, ph.p_flags); DumpELFProgramHeader_p_flags(s, ph.p_flags); s->Printf(") %8.8" PRIx64, ph.p_align); } //---------------------------------------------------------------------- // DumpELFProgramHeader_p_type // // Dump an token value for the ELF program header member p_type which // describes the type of the program header // ---------------------------------------------------------------------- void ObjectFileELF::DumpELFProgramHeader_p_type(Stream *s, elf_word p_type) { const int kStrWidth = 15; switch (p_type) { CASE_AND_STREAM(s, PT_NULL, kStrWidth); CASE_AND_STREAM(s, PT_LOAD, kStrWidth); CASE_AND_STREAM(s, PT_DYNAMIC, kStrWidth); CASE_AND_STREAM(s, PT_INTERP, kStrWidth); CASE_AND_STREAM(s, PT_NOTE, kStrWidth); CASE_AND_STREAM(s, PT_SHLIB, kStrWidth); CASE_AND_STREAM(s, PT_PHDR, kStrWidth); CASE_AND_STREAM(s, PT_TLS, kStrWidth); CASE_AND_STREAM(s, PT_GNU_EH_FRAME, kStrWidth); default: s->Printf("0x%8.8x%*s", p_type, kStrWidth - 10, ""); break; } } //---------------------------------------------------------------------- // DumpELFProgramHeader_p_flags // // Dump an token value for the ELF program header member p_flags //---------------------------------------------------------------------- void ObjectFileELF::DumpELFProgramHeader_p_flags(Stream *s, elf_word p_flags) { *s << ((p_flags & PF_X) ? "PF_X" : " ") << (((p_flags & PF_X) && (p_flags & PF_W)) ? '+' : ' ') << ((p_flags & PF_W) ? "PF_W" : " ") << (((p_flags & PF_W) && (p_flags & PF_R)) ? '+' : ' ') << ((p_flags & PF_R) ? "PF_R" : " "); } //---------------------------------------------------------------------- // DumpELFProgramHeaders // // Dump all of the ELF program header to the specified output stream //---------------------------------------------------------------------- void ObjectFileELF::DumpELFProgramHeaders(Stream *s) { if (!ParseProgramHeaders()) return; s->PutCString("Program Headers\n"); s->PutCString("IDX p_type p_offset p_vaddr p_paddr " "p_filesz p_memsz p_flags p_align\n"); s->PutCString("==== --------------- -------- -------- -------- " "-------- -------- ------------------------- --------\n"); uint32_t idx = 0; for (ProgramHeaderCollConstIter I = m_program_headers.begin(); I != m_program_headers.end(); ++I, ++idx) { s->Printf("[%2u] ", idx); ObjectFileELF::DumpELFProgramHeader(s, *I); s->EOL(); } } //---------------------------------------------------------------------- // DumpELFSectionHeader // // Dump a single ELF section header to the specified output stream //---------------------------------------------------------------------- void ObjectFileELF::DumpELFSectionHeader(Stream *s, const ELFSectionHeaderInfo &sh) { s->Printf("%8.8x ", sh.sh_name); DumpELFSectionHeader_sh_type(s, sh.sh_type); s->Printf(" %8.8" PRIx64 " (", sh.sh_flags); DumpELFSectionHeader_sh_flags(s, sh.sh_flags); s->Printf(") %8.8" PRIx64 " %8.8" PRIx64 " %8.8" PRIx64, sh.sh_addr, sh.sh_offset, sh.sh_size); s->Printf(" %8.8x %8.8x", sh.sh_link, sh.sh_info); s->Printf(" %8.8" PRIx64 " %8.8" PRIx64, sh.sh_addralign, sh.sh_entsize); } //---------------------------------------------------------------------- // DumpELFSectionHeader_sh_type // // Dump an token value for the ELF section header member sh_type which // describes the type of the section //---------------------------------------------------------------------- void ObjectFileELF::DumpELFSectionHeader_sh_type(Stream *s, elf_word sh_type) { const int kStrWidth = 12; switch (sh_type) { CASE_AND_STREAM(s, SHT_NULL, kStrWidth); CASE_AND_STREAM(s, SHT_PROGBITS, kStrWidth); CASE_AND_STREAM(s, SHT_SYMTAB, kStrWidth); CASE_AND_STREAM(s, SHT_STRTAB, kStrWidth); CASE_AND_STREAM(s, SHT_RELA, kStrWidth); CASE_AND_STREAM(s, SHT_HASH, kStrWidth); CASE_AND_STREAM(s, SHT_DYNAMIC, kStrWidth); CASE_AND_STREAM(s, SHT_NOTE, kStrWidth); CASE_AND_STREAM(s, SHT_NOBITS, kStrWidth); CASE_AND_STREAM(s, SHT_REL, kStrWidth); CASE_AND_STREAM(s, SHT_SHLIB, kStrWidth); CASE_AND_STREAM(s, SHT_DYNSYM, kStrWidth); CASE_AND_STREAM(s, SHT_LOPROC, kStrWidth); CASE_AND_STREAM(s, SHT_HIPROC, kStrWidth); CASE_AND_STREAM(s, SHT_LOUSER, kStrWidth); CASE_AND_STREAM(s, SHT_HIUSER, kStrWidth); default: s->Printf("0x%8.8x%*s", sh_type, kStrWidth - 10, ""); break; } } //---------------------------------------------------------------------- // DumpELFSectionHeader_sh_flags // // Dump an token value for the ELF section header member sh_flags //---------------------------------------------------------------------- void ObjectFileELF::DumpELFSectionHeader_sh_flags(Stream *s, elf_xword sh_flags) { *s << ((sh_flags & SHF_WRITE) ? "WRITE" : " ") << (((sh_flags & SHF_WRITE) && (sh_flags & SHF_ALLOC)) ? '+' : ' ') << ((sh_flags & SHF_ALLOC) ? "ALLOC" : " ") << (((sh_flags & SHF_ALLOC) && (sh_flags & SHF_EXECINSTR)) ? '+' : ' ') << ((sh_flags & SHF_EXECINSTR) ? "EXECINSTR" : " "); } //---------------------------------------------------------------------- // DumpELFSectionHeaders // // Dump all of the ELF section header to the specified output stream //---------------------------------------------------------------------- void ObjectFileELF::DumpELFSectionHeaders(Stream *s) { if (!ParseSectionHeaders()) return; s->PutCString("Section Headers\n"); s->PutCString("IDX name type flags " "addr offset size link info addralgn " "entsize Name\n"); s->PutCString("==== -------- ------------ -------------------------------- " "-------- -------- -------- -------- -------- -------- " "-------- ====================\n"); uint32_t idx = 0; for (SectionHeaderCollConstIter I = m_section_headers.begin(); I != m_section_headers.end(); ++I, ++idx) { s->Printf("[%2u] ", idx); ObjectFileELF::DumpELFSectionHeader(s, *I); const char *section_name = I->section_name.AsCString(""); if (section_name) *s << ' ' << section_name << "\n"; } } void ObjectFileELF::DumpDependentModules(lldb_private::Stream *s) { size_t num_modules = ParseDependentModules(); if (num_modules > 0) { s->PutCString("Dependent Modules:\n"); for (unsigned i = 0; i < num_modules; ++i) { const FileSpec &spec = m_filespec_ap->GetFileSpecAtIndex(i); s->Printf(" %s\n", spec.GetFilename().GetCString()); } } } bool ObjectFileELF::GetArchitecture(ArchSpec &arch) { if (!ParseHeader()) return false; if (m_section_headers.empty()) { // Allow elf notes to be parsed which may affect the detected architecture. ParseSectionHeaders(); } if (CalculateType() == eTypeCoreFile && m_arch_spec.TripleOSIsUnspecifiedUnknown()) { // Core files don't have section headers yet they have PT_NOTE program // headers // that might shed more light on the architecture if (ParseProgramHeaders()) { for (size_t i = 1, count = GetProgramHeaderCount(); i <= count; ++i) { const elf::ELFProgramHeader *header = GetProgramHeaderByIndex(i); if (header && header->p_type == PT_NOTE && header->p_offset != 0 && header->p_filesz > 0) { DataExtractor data; if (data.SetData(m_data, header->p_offset, header->p_filesz) == header->p_filesz) { lldb_private::UUID uuid; RefineModuleDetailsFromNote(data, m_arch_spec, uuid); } } } } } arch = m_arch_spec; return true; } ObjectFile::Type ObjectFileELF::CalculateType() { switch (m_header.e_type) { case llvm::ELF::ET_NONE: // 0 - No file type return eTypeUnknown; case llvm::ELF::ET_REL: // 1 - Relocatable file return eTypeObjectFile; case llvm::ELF::ET_EXEC: // 2 - Executable file return eTypeExecutable; case llvm::ELF::ET_DYN: // 3 - Shared object file return eTypeSharedLibrary; case ET_CORE: // 4 - Core file return eTypeCoreFile; default: break; } return eTypeUnknown; } ObjectFile::Strata ObjectFileELF::CalculateStrata() { switch (m_header.e_type) { case llvm::ELF::ET_NONE: // 0 - No file type return eStrataUnknown; case llvm::ELF::ET_REL: // 1 - Relocatable file return eStrataUnknown; case llvm::ELF::ET_EXEC: // 2 - Executable file // TODO: is there any way to detect that an executable is a kernel // related executable by inspecting the program headers, section // headers, symbols, or any other flag bits??? return eStrataUser; case llvm::ELF::ET_DYN: // 3 - Shared object file // TODO: is there any way to detect that an shared library is a kernel // related executable by inspecting the program headers, section // headers, symbols, or any other flag bits??? return eStrataUnknown; case ET_CORE: // 4 - Core file // TODO: is there any way to detect that an core file is a kernel // related executable by inspecting the program headers, section // headers, symbols, or any other flag bits??? return eStrataUnknown; default: break; } return eStrataUnknown; } Index: vendor/lldb/dist/source/Plugins/ObjectFile/ELF/ObjectFileELF.h =================================================================== --- vendor/lldb/dist/source/Plugins/ObjectFile/ELF/ObjectFileELF.h (revision 317691) +++ vendor/lldb/dist/source/Plugins/ObjectFile/ELF/ObjectFileELF.h (revision 317692) @@ -1,392 +1,392 @@ //===-- ObjectFileELF.h --------------------------------------- -*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #ifndef liblldb_ObjectFileELF_h_ #define liblldb_ObjectFileELF_h_ // C Includes #include // C++ Includes #include #include // Other libraries and framework includes // Project includes #include "lldb/Core/ArchSpec.h" #include "lldb/Symbol/ObjectFile.h" #include "lldb/Utility/FileSpec.h" #include "lldb/Utility/UUID.h" #include "lldb/lldb-private.h" #include "ELFHeader.h" struct ELFNote { elf::elf_word n_namesz; elf::elf_word n_descsz; elf::elf_word n_type; std::string n_name; ELFNote() : n_namesz(0), n_descsz(0), n_type(0) {} /// Parse an ELFNote entry from the given DataExtractor starting at position /// \p offset. /// /// @param[in] data /// The DataExtractor to read from. /// /// @param[in,out] offset /// Pointer to an offset in the data. On return the offset will be /// advanced by the number of bytes read. /// /// @return /// True if the ELFRel entry was successfully read and false otherwise. bool Parse(const lldb_private::DataExtractor &data, lldb::offset_t *offset); size_t GetByteSize() const { return 12 + llvm::alignTo(n_namesz, 4) + llvm::alignTo(n_descsz, 4); } }; //------------------------------------------------------------------------------ /// @class ObjectFileELF /// @brief Generic ELF object file reader. /// /// This class provides a generic ELF (32/64 bit) reader plugin implementing the /// ObjectFile protocol. class ObjectFileELF : public lldb_private::ObjectFile { public: ~ObjectFileELF() override; //------------------------------------------------------------------ // Static Functions //------------------------------------------------------------------ static void Initialize(); static void Terminate(); static lldb_private::ConstString GetPluginNameStatic(); static const char *GetPluginDescriptionStatic(); static lldb_private::ObjectFile * CreateInstance(const lldb::ModuleSP &module_sp, lldb::DataBufferSP &data_sp, lldb::offset_t data_offset, const lldb_private::FileSpec *file, lldb::offset_t file_offset, lldb::offset_t length); static lldb_private::ObjectFile *CreateMemoryInstance( const lldb::ModuleSP &module_sp, lldb::DataBufferSP &data_sp, const lldb::ProcessSP &process_sp, lldb::addr_t header_addr); static size_t GetModuleSpecifications(const lldb_private::FileSpec &file, lldb::DataBufferSP &data_sp, lldb::offset_t data_offset, lldb::offset_t file_offset, lldb::offset_t length, lldb_private::ModuleSpecList &specs); static bool MagicBytesMatch(lldb::DataBufferSP &data_sp, lldb::addr_t offset, lldb::addr_t length); //------------------------------------------------------------------ // PluginInterface protocol //------------------------------------------------------------------ lldb_private::ConstString GetPluginName() override; uint32_t GetPluginVersion() override; //------------------------------------------------------------------ // ObjectFile Protocol. //------------------------------------------------------------------ bool ParseHeader() override; bool SetLoadAddress(lldb_private::Target &target, lldb::addr_t value, bool value_is_offset) override; lldb::ByteOrder GetByteOrder() const override; bool IsExecutable() const override; uint32_t GetAddressByteSize() const override; lldb::AddressClass GetAddressClass(lldb::addr_t file_addr) override; lldb_private::Symtab *GetSymtab() override; bool IsStripped() override; void CreateSections(lldb_private::SectionList &unified_section_list) override; void Dump(lldb_private::Stream *s) override; bool GetArchitecture(lldb_private::ArchSpec &arch) override; bool GetUUID(lldb_private::UUID *uuid) override; lldb_private::FileSpecList GetDebugSymbolFilePaths() override; uint32_t GetDependentModules(lldb_private::FileSpecList &files) override; lldb_private::Address GetImageInfoAddress(lldb_private::Target *target) override; lldb_private::Address GetEntryPointAddress() override; ObjectFile::Type CalculateType() override; ObjectFile::Strata CalculateStrata() override; // Returns number of program headers found in the ELF file. size_t GetProgramHeaderCount(); // Returns the program header with the given index. const elf::ELFProgramHeader *GetProgramHeaderByIndex(lldb::user_id_t id); // Returns segment data for the given index. lldb_private::DataExtractor GetSegmentDataByIndex(lldb::user_id_t id); - std::string + llvm::StringRef StripLinkerSymbolAnnotations(llvm::StringRef symbol_name) const override; private: ObjectFileELF(const lldb::ModuleSP &module_sp, lldb::DataBufferSP &data_sp, lldb::offset_t data_offset, const lldb_private::FileSpec *file, lldb::offset_t offset, lldb::offset_t length); ObjectFileELF(const lldb::ModuleSP &module_sp, lldb::DataBufferSP &header_data_sp, const lldb::ProcessSP &process_sp, lldb::addr_t header_addr); typedef std::vector ProgramHeaderColl; typedef ProgramHeaderColl::iterator ProgramHeaderCollIter; typedef ProgramHeaderColl::const_iterator ProgramHeaderCollConstIter; struct ELFSectionHeaderInfo : public elf::ELFSectionHeader { lldb_private::ConstString section_name; }; typedef std::vector SectionHeaderColl; typedef SectionHeaderColl::iterator SectionHeaderCollIter; typedef SectionHeaderColl::const_iterator SectionHeaderCollConstIter; typedef std::vector DynamicSymbolColl; typedef DynamicSymbolColl::iterator DynamicSymbolCollIter; typedef DynamicSymbolColl::const_iterator DynamicSymbolCollConstIter; typedef std::map FileAddressToAddressClassMap; typedef std::function SetDataFunction; /// Version of this reader common to all plugins based on this class. static const uint32_t m_plugin_version = 1; static const uint32_t g_core_uuid_magic; /// ELF file header. elf::ELFHeader m_header; /// ELF build ID. lldb_private::UUID m_uuid; /// ELF .gnu_debuglink file and crc data if available. std::string m_gnu_debuglink_file; uint32_t m_gnu_debuglink_crc; /// Collection of program headers. ProgramHeaderColl m_program_headers; /// Collection of section headers. SectionHeaderColl m_section_headers; /// Collection of symbols from the dynamic table. DynamicSymbolColl m_dynamic_symbols; /// List of file specifications corresponding to the modules (shared /// libraries) on which this object file depends. mutable std::unique_ptr m_filespec_ap; /// Cached value of the entry point for this module. lldb_private::Address m_entry_point_address; /// The architecture detected from parsing elf file contents. lldb_private::ArchSpec m_arch_spec; /// The address class for each symbol in the elf file FileAddressToAddressClassMap m_address_class_map; /// Returns a 1 based index of the given section header. size_t SectionIndex(const SectionHeaderCollIter &I); /// Returns a 1 based index of the given section header. size_t SectionIndex(const SectionHeaderCollConstIter &I) const; // Parses the ELF program headers. static size_t GetProgramHeaderInfo(ProgramHeaderColl &program_headers, const SetDataFunction &set_data, const elf::ELFHeader &header); // Finds PT_NOTE segments and calculates their crc sum. static uint32_t CalculateELFNotesSegmentsCRC32(const ProgramHeaderColl &program_headers, lldb_private::DataExtractor &data); /// Parses all section headers present in this object file and populates /// m_program_headers. This method will compute the header list only once. /// Returns the number of headers parsed. size_t ParseProgramHeaders(); /// Parses all section headers present in this object file and populates /// m_section_headers. This method will compute the header list only once. /// Returns the number of headers parsed. size_t ParseSectionHeaders(); static void ParseARMAttributes(lldb_private::DataExtractor &data, uint64_t length, lldb_private::ArchSpec &arch_spec); /// Parses the elf section headers and returns the uuid, debug link name, crc, /// archspec. static size_t GetSectionHeaderInfo(SectionHeaderColl §ion_headers, const SetDataFunction &set_data, const elf::ELFHeader &header, lldb_private::UUID &uuid, std::string &gnu_debuglink_file, uint32_t &gnu_debuglink_crc, lldb_private::ArchSpec &arch_spec); /// Scans the dynamic section and locates all dependent modules (shared /// libraries) populating m_filespec_ap. This method will compute the /// dependent module list only once. Returns the number of dependent /// modules parsed. size_t ParseDependentModules(); /// Parses the dynamic symbol table and populates m_dynamic_symbols. The /// vector retains the order as found in the object file. Returns the /// number of dynamic symbols parsed. size_t ParseDynamicSymbols(); /// Populates m_symtab_ap will all non-dynamic linker symbols. This method /// will parse the symbols only once. Returns the number of symbols parsed. unsigned ParseSymbolTable(lldb_private::Symtab *symbol_table, lldb::user_id_t start_id, lldb_private::Section *symtab); /// Helper routine for ParseSymbolTable(). unsigned ParseSymbols(lldb_private::Symtab *symbol_table, lldb::user_id_t start_id, lldb_private::SectionList *section_list, const size_t num_symbols, const lldb_private::DataExtractor &symtab_data, const lldb_private::DataExtractor &strtab_data); /// Scans the relocation entries and adds a set of artificial symbols to the /// given symbol table for each PLT slot. Returns the number of symbols /// added. unsigned ParseTrampolineSymbols(lldb_private::Symtab *symbol_table, lldb::user_id_t start_id, const ELFSectionHeaderInfo *rela_hdr, lldb::user_id_t section_id); void ParseUnwindSymbols(lldb_private::Symtab *symbol_table, lldb_private::DWARFCallFrameInfo *eh_frame); /// Relocates debug sections unsigned RelocateDebugSections(const elf::ELFSectionHeader *rel_hdr, lldb::user_id_t rel_id); unsigned RelocateSection(lldb_private::Symtab *symtab, const elf::ELFHeader *hdr, const elf::ELFSectionHeader *rel_hdr, const elf::ELFSectionHeader *symtab_hdr, const elf::ELFSectionHeader *debug_hdr, lldb_private::DataExtractor &rel_data, lldb_private::DataExtractor &symtab_data, lldb_private::DataExtractor &debug_data, lldb_private::Section *rel_section); /// Loads the section name string table into m_shstr_data. Returns the /// number of bytes constituting the table. size_t GetSectionHeaderStringTable(); /// Utility method for looking up a section given its name. Returns the /// index of the corresponding section or zero if no section with the given /// name can be found (note that section indices are always 1 based, and so /// section index 0 is never valid). lldb::user_id_t GetSectionIndexByName(const char *name); // Returns the ID of the first section that has the given type. lldb::user_id_t GetSectionIndexByType(unsigned type); /// Returns the section header with the given id or NULL. const ELFSectionHeaderInfo *GetSectionHeaderByIndex(lldb::user_id_t id); /// @name ELF header dump routines //@{ static void DumpELFHeader(lldb_private::Stream *s, const elf::ELFHeader &header); static void DumpELFHeader_e_ident_EI_DATA(lldb_private::Stream *s, unsigned char ei_data); static void DumpELFHeader_e_type(lldb_private::Stream *s, elf::elf_half e_type); //@} /// @name ELF program header dump routines //@{ void DumpELFProgramHeaders(lldb_private::Stream *s); static void DumpELFProgramHeader(lldb_private::Stream *s, const elf::ELFProgramHeader &ph); static void DumpELFProgramHeader_p_type(lldb_private::Stream *s, elf::elf_word p_type); static void DumpELFProgramHeader_p_flags(lldb_private::Stream *s, elf::elf_word p_flags); //@} /// @name ELF section header dump routines //@{ void DumpELFSectionHeaders(lldb_private::Stream *s); static void DumpELFSectionHeader(lldb_private::Stream *s, const ELFSectionHeaderInfo &sh); static void DumpELFSectionHeader_sh_type(lldb_private::Stream *s, elf::elf_word sh_type); static void DumpELFSectionHeader_sh_flags(lldb_private::Stream *s, elf::elf_xword sh_flags); //@} /// ELF dependent module dump routine. void DumpDependentModules(lldb_private::Stream *s); const elf::ELFDynamic *FindDynamicSymbol(unsigned tag); unsigned PLTRelocationType(); static lldb_private::Error RefineModuleDetailsFromNote(lldb_private::DataExtractor &data, lldb_private::ArchSpec &arch_spec, lldb_private::UUID &uuid); static lldb::offset_t SetData(const lldb_private::DataExtractor &src, lldb_private::DataExtractor &dst, lldb::offset_t offset, lldb::offset_t length); lldb::offset_t SetDataWithReadMemoryFallback(lldb_private::DataExtractor &dst, lldb::offset_t offset, lldb::offset_t length); }; #endif // liblldb_ObjectFileELF_h_ Index: vendor/lldb/dist/source/Plugins/Platform/Android/PlatformAndroidRemoteGDBServer.cpp =================================================================== --- vendor/lldb/dist/source/Plugins/Platform/Android/PlatformAndroidRemoteGDBServer.cpp (revision 317691) +++ vendor/lldb/dist/source/Plugins/Platform/Android/PlatformAndroidRemoteGDBServer.cpp (revision 317692) @@ -1,233 +1,233 @@ //===-- PlatformAndroidRemoteGDBServer.cpp ----------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // Other libraries and framework includes #include "lldb/Host/ConnectionFileDescriptor.h" #include "lldb/Host/common/TCPSocket.h" #include "lldb/Utility/Error.h" #include "lldb/Utility/Log.h" #include "lldb/Utility/UriParser.h" #include "PlatformAndroidRemoteGDBServer.h" #include using namespace lldb; using namespace lldb_private; using namespace platform_android; static const lldb::pid_t g_remote_platform_pid = 0; // Alias for the process id of lldb-platform static Error ForwardPortWithAdb( const uint16_t local_port, const uint16_t remote_port, llvm::StringRef remote_socket_name, const llvm::Optional &socket_namespace, std::string &device_id) { Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PLATFORM)); AdbClient adb; auto error = AdbClient::CreateByDeviceID(device_id, adb); if (error.Fail()) return error; device_id = adb.GetDeviceID(); if (log) log->Printf("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); 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); if (!socket_namespace) return Error("Invalid socket namespace"); return adb.SetPortForwarding(local_port, remote_socket_name, *socket_namespace); } static Error DeleteForwardPortWithAdb(uint16_t local_port, const std::string &device_id) { AdbClient adb(device_id); return adb.DeletePortForwarding(local_port); } static Error FindUnusedPort(uint16_t &port) { Error error; - std::unique_ptr tcp_socket(new TCPSocket(false, error)); + std::unique_ptr tcp_socket(new TCPSocket(true, false)); if (error.Fail()) return error; error = tcp_socket->Listen("127.0.0.1:0", 1); if (error.Success()) port = tcp_socket->GetLocalPortNumber(); return error; } PlatformAndroidRemoteGDBServer::PlatformAndroidRemoteGDBServer() {} PlatformAndroidRemoteGDBServer::~PlatformAndroidRemoteGDBServer() { for (const auto &it : m_port_forwards) DeleteForwardPortWithAdb(it.second, m_device_id); } bool PlatformAndroidRemoteGDBServer::LaunchGDBServer(lldb::pid_t &pid, std::string &connect_url) { uint16_t remote_port = 0; std::string socket_name; if (!m_gdb_client.LaunchGDBServer("127.0.0.1", pid, remote_port, socket_name)) return false; Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PLATFORM)); 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()); return error.Success(); } bool PlatformAndroidRemoteGDBServer::KillSpawnedProcess(lldb::pid_t pid) { DeleteForwardPort(pid); return m_gdb_client.KillSpawnedProcess(pid); } Error PlatformAndroidRemoteGDBServer::ConnectRemote(Args &args) { m_device_id.clear(); if (args.GetArgumentCount() != 1) return Error("\"platform connect\" takes a single argument: "); int remote_port; llvm::StringRef scheme, host, path; const char *url = args.GetArgumentAtIndex(0); if (!url) return Error("URL is null."); if (!UriParser::Parse(url, scheme, host, remote_port, path)) return Error("Invalid URL: %s", url); if (host != "localhost") m_device_id = host; m_socket_namespace.reset(); if (scheme == ConnectionFileDescriptor::UNIX_CONNECT_SCHEME) m_socket_namespace = AdbClient::UnixSocketNamespaceFileSystem; else if (scheme == ConnectionFileDescriptor::UNIX_ABSTRACT_CONNECT_SCHEME) m_socket_namespace = AdbClient::UnixSocketNamespaceAbstract; std::string connect_url; auto error = MakeConnectURL(g_remote_platform_pid, (remote_port < 0) ? 0 : remote_port, path, connect_url); if (error.Fail()) return error; args.ReplaceArgumentAtIndex(0, connect_url); Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PLATFORM)); if (log) log->Printf("Rewritten platform connect URL: %s", connect_url.c_str()); error = PlatformRemoteGDBServer::ConnectRemote(args); if (error.Fail()) DeleteForwardPort(g_remote_platform_pid); return error; } Error PlatformAndroidRemoteGDBServer::DisconnectRemote() { DeleteForwardPort(g_remote_platform_pid); return PlatformRemoteGDBServer::DisconnectRemote(); } void PlatformAndroidRemoteGDBServer::DeleteForwardPort(lldb::pid_t pid) { Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PLATFORM)); auto it = m_port_forwards.find(pid); if (it == m_port_forwards.end()) return; 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()); } m_port_forwards.erase(it); } Error PlatformAndroidRemoteGDBServer::MakeConnectURL( const lldb::pid_t pid, const uint16_t remote_port, llvm::StringRef remote_socket_name, std::string &connect_url) { static const int kAttempsNum = 5; Error error; // There is a race possibility that somebody will occupy // a port while we're in between FindUnusedPort and ForwardPortWithAdb - // adding the loop to mitigate such problem. for (auto i = 0; i < kAttempsNum; ++i) { uint16_t local_port = 0; error = FindUnusedPort(local_port); if (error.Fail()) return error; error = ForwardPortWithAdb(local_port, remote_port, remote_socket_name, m_socket_namespace, m_device_id); if (error.Success()) { m_port_forwards[pid] = local_port; std::ostringstream url_str; url_str << "connect://localhost:" << local_port; connect_url = url_str.str(); break; } } return error; } lldb::ProcessSP PlatformAndroidRemoteGDBServer::ConnectProcess( llvm::StringRef connect_url, llvm::StringRef plugin_name, lldb_private::Debugger &debugger, lldb_private::Target *target, lldb_private::Error &error) { // We don't have the pid of the remote gdbserver when it isn't started by us // but we still want // to store the list of port forwards we set up in our port forward map. // Generate a fake pid for // these cases what won't collide with any other valid pid on android. static lldb::pid_t s_remote_gdbserver_fake_pid = 0xffffffffffffffffULL; int remote_port; llvm::StringRef scheme, host, path; if (!UriParser::Parse(connect_url, scheme, host, remote_port, path)) { error.SetErrorStringWithFormat("Invalid URL: %s", connect_url.str().c_str()); return nullptr; } std::string new_connect_url; error = MakeConnectURL(s_remote_gdbserver_fake_pid--, (remote_port < 0) ? 0 : remote_port, path, new_connect_url); if (error.Fail()) return nullptr; return PlatformRemoteGDBServer::ConnectProcess(new_connect_url, plugin_name, debugger, target, error); } Index: vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp =================================================================== --- vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp (revision 317691) +++ vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp (revision 317692) @@ -1,4151 +1,4149 @@ //===-- DWARFASTParserClang.cpp ---------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #include #include "DWARFASTParserClang.h" #include "DWARFCompileUnit.h" #include "DWARFDIE.h" #include "DWARFDIECollection.h" #include "DWARFDebugInfo.h" #include "DWARFDeclContext.h" #include "DWARFDefines.h" #include "SymbolFileDWARF.h" #include "SymbolFileDWARFDebugMap.h" #include "UniqueDWARFASTType.h" #include "Plugins/Language/ObjC/ObjCLanguage.h" #include "lldb/Core/Module.h" #include "lldb/Core/Value.h" #include "lldb/Host/Host.h" #include "lldb/Interpreter/Args.h" #include "lldb/Symbol/ClangASTImporter.h" #include "lldb/Symbol/ClangExternalASTSourceCommon.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/TypeList.h" #include "lldb/Symbol/TypeMap.h" #include "lldb/Target/Language.h" #include "lldb/Utility/LLDBAssert.h" #include "lldb/Utility/Log.h" #include "lldb/Utility/StreamString.h" #include "clang/AST/DeclCXX.h" #include "clang/AST/DeclObjC.h" #include #include //#define ENABLE_DEBUG_PRINTF // COMMENT OUT THIS LINE PRIOR TO CHECKIN #ifdef ENABLE_DEBUG_PRINTF #include #define DEBUG_PRINTF(fmt, ...) printf(fmt, __VA_ARGS__) #else #define DEBUG_PRINTF(fmt, ...) #endif using namespace lldb; using namespace lldb_private; DWARFASTParserClang::DWARFASTParserClang(ClangASTContext &ast) : m_ast(ast), m_die_to_decl_ctx(), m_decl_ctx_to_die() {} DWARFASTParserClang::~DWARFASTParserClang() {} static AccessType DW_ACCESS_to_AccessType(uint32_t dwarf_accessibility) { switch (dwarf_accessibility) { case DW_ACCESS_public: return eAccessPublic; case DW_ACCESS_private: return eAccessPrivate; case DW_ACCESS_protected: return eAccessProtected; default: break; } return eAccessNone; } static bool DeclKindIsCXXClass(clang::Decl::Kind decl_kind) { switch (decl_kind) { case clang::Decl::CXXRecord: case clang::Decl::ClassTemplateSpecialization: return true; default: break; } 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_ap) { m_clang_ast_importer_ap.reset(new ClangASTImporter); } return *m_clang_ast_importer_ap; } TypeSP DWARFASTParserClang::ParseTypeFromDWO(const DWARFDIE &die, Log *log) { ModuleSP dwo_module_sp = die.GetContainingDWOModule(); if (dwo_module_sp) { // This type comes from an external DWO module std::vector dwo_context; die.GetDWOContext(dwo_context); TypeMap dwo_types; if (dwo_module_sp->GetSymbolVendor()->FindTypes(dwo_context, true, dwo_types)) { const size_t num_dwo_types = dwo_types.GetSize(); if (num_dwo_types == 1) { // 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 TypeSP dwo_type_sp = dwo_types.GetTypeAtIndex(0); if (dwo_type_sp) { lldb_private::CompilerType dwo_type = dwo_type_sp->GetForwardCompilerType(); lldb_private::CompilerType type = GetClangASTImporter().CopyType(m_ast, dwo_type); // printf ("copied_qual_type: ast = %p, clang_type = %p, name = // '%s'\n", m_ast, copied_qual_type.getAsOpaquePtr(), // external_type->GetName().GetCString()); if (type) { SymbolFileDWARF *dwarf = die.GetDWARF(); TypeSP type_sp(new Type(die.GetID(), dwarf, dwo_type_sp->GetName(), dwo_type_sp->GetByteSize(), NULL, LLDB_INVALID_UID, Type::eEncodingInvalid, &dwo_type_sp->GetDeclaration(), type, Type::eResolveStateForward)); dwarf->GetTypeList()->Insert(type_sp); dwarf->GetDIEToType()[die.GetDIE()] = type_sp.get(); clang::TagDecl *tag_decl = ClangASTContext::GetAsTagDecl(type); if (tag_decl) LinkDeclContextToDIE(tag_decl, die); else { clang::DeclContext *defn_decl_ctx = GetCachedClangDeclContextForDIE(die); if (defn_decl_ctx) LinkDeclContextToDIE(defn_decl_ctx, die); } return type_sp; } } } } } return TypeSP(); } TypeSP DWARFASTParserClang::ParseTypeFromDWARF(const SymbolContext &sc, const DWARFDIE &die, Log *log, bool *type_is_new_ptr) { TypeSP type_sp; if (type_is_new_ptr) *type_is_new_ptr = false; AccessType accessibility = eAccessNone; if (die) { SymbolFileDWARF *dwarf = die.GetDWARF(); if (log) { DWARFDIE context_die; clang::DeclContext *context = GetClangDeclContextContainingDIE(die, &context_die); dwarf->GetObjectFile()->GetModule()->LogMessage( log, "SymbolFileDWARF::ParseType (die = 0x%8.8x, decl_ctx = %p (die " "0x%8.8x)) %s name = '%s')", die.GetOffset(), static_cast(context), context_die.GetOffset(), die.GetTagAsCString(), die.GetName()); } // // Log *log (LogChannelDWARF::GetLogIfAll(DWARF_LOG_DEBUG_INFO)); // if (log && dwarf_cu) // { // StreamString s; // die->DumpLocation (this, dwarf_cu, s); // dwarf->GetObjectFile()->GetModule()->LogMessage (log, // "SymbolFileDwarf::%s %s", __FUNCTION__, s.GetData()); // // } Type *type_ptr = dwarf->GetDIEToType().lookup(die.GetDIE()); TypeList *type_list = dwarf->GetTypeList(); if (type_ptr == NULL) { if (type_is_new_ptr) *type_is_new_ptr = true; const dw_tag_t tag = die.Tag(); bool is_forward_declaration = false; DWARFAttributes attributes; const char *type_name_cstr = NULL; ConstString type_name_const_str; Type::ResolveState resolve_state = Type::eResolveStateUnresolved; uint64_t byte_size = 0; Declaration decl; Type::EncodingDataType encoding_data_type = Type::eEncodingIsUID; CompilerType clang_type; DWARFFormValue form_value; dw_attr_t attr; switch (tag) { case DW_TAG_typedef: case DW_TAG_base_type: case DW_TAG_pointer_type: case DW_TAG_reference_type: case DW_TAG_rvalue_reference_type: case DW_TAG_const_type: case DW_TAG_restrict_type: case DW_TAG_volatile_type: case DW_TAG_unspecified_type: { // Set a bit that lets us know that we are currently parsing this dwarf->GetDIEToType()[die.GetDIE()] = DIE_IS_BEING_PARSED; const size_t num_attributes = die.GetAttributes(attributes); uint32_t encoding = 0; DWARFFormValue encoding_uid; if (num_attributes > 0) { uint32_t i; for (i = 0; i < num_attributes; ++i) { attr = attributes.AttributeAtIndex(i); if (attributes.ExtractFormValueAtIndex(i, form_value)) { switch (attr) { case DW_AT_decl_file: decl.SetFile(sc.comp_unit->GetSupportFiles().GetFileSpecAtIndex( form_value.Unsigned())); break; case DW_AT_decl_line: decl.SetLine(form_value.Unsigned()); break; case DW_AT_decl_column: decl.SetColumn(form_value.Unsigned()); break; case DW_AT_name: type_name_cstr = form_value.AsCString(); // Work around a bug in llvm-gcc where they give a name to a // reference type which doesn't // include the "&"... if (tag == DW_TAG_reference_type) { if (strchr(type_name_cstr, '&') == NULL) type_name_cstr = NULL; } if (type_name_cstr) type_name_const_str.SetCString(type_name_cstr); break; case DW_AT_byte_size: byte_size = form_value.Unsigned(); break; case DW_AT_encoding: encoding = form_value.Unsigned(); break; case DW_AT_type: encoding_uid = form_value; break; default: case DW_AT_sibling: break; } } } } if (tag == DW_TAG_typedef && encoding_uid.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 = dwarf->GetDIE(DIERef(encoding_uid)); // 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 (strcmp(type_name_cstr, "nullptr_t") == 0 || strcmp(type_name_cstr, "decltype(nullptr)") == 0) { 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( type_name_cstr, encoding, byte_size * 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) && sc.comp_unit != NULL) { 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; encoding_uid.Clear(); resolve_state = Type::eResolveStateFull; } } break; } } } } bool translation_unit_is_objc = (sc.comp_unit->GetLanguage() == eLanguageTypeObjC || sc.comp_unit->GetLanguage() == eLanguageTypeObjC_plus_plus); if (translation_unit_is_objc) { if (type_name_cstr != NULL) { 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 (type_name_const_str == 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; encoding_uid.Clear(); resolve_state = Type::eResolveStateFull; } else if (type_name_const_str == 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; encoding_uid.Clear(); resolve_state = Type::eResolveStateFull; } else if (type_name_const_str == 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; encoding_uid.Clear(); resolve_state = Type::eResolveStateFull; } } else if (encoding_data_type == Type::eEncodingIsPointerUID && encoding_uid.IsValid()) { // Clang sometimes erroneously emits id as objc_object*. In that // case we fix up the type to "id". const DWARFDIE encoding_die = dwarf->GetDIE(DIERef(encoding_uid)); 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; encoding_uid.Clear(); resolve_state = Type::eResolveStateFull; } } } } } } type_sp.reset( new Type(die.GetID(), dwarf, type_name_const_str, byte_size, NULL, DIERef(encoding_uid).GetUID(dwarf), encoding_data_type, &decl, clang_type, resolve_state)); dwarf->GetDIEToType()[die.GetDIE()] = type_sp.get(); // Type* encoding_type = // GetUniquedTypeForDIEOffset(encoding_uid, type_sp, // NULL, 0, 0, false); // if (encoding_type != NULL) // { // if (encoding_type != DIE_IS_BEING_PARSED) // type_sp->SetEncodingType(encoding_type); // else // m_indirect_fixups.push_back(type_sp.get()); // } } break; case DW_TAG_structure_type: case DW_TAG_union_type: case DW_TAG_class_type: { // Set a bit that lets us know that we are currently parsing this dwarf->GetDIEToType()[die.GetDIE()] = DIE_IS_BEING_PARSED; bool byte_size_valid = false; LanguageType class_language = eLanguageTypeUnknown; bool is_complete_objc_class = false; // bool struct_is_class = false; const size_t num_attributes = die.GetAttributes(attributes); if (num_attributes > 0) { uint32_t i; for (i = 0; i < num_attributes; ++i) { attr = attributes.AttributeAtIndex(i); if (attributes.ExtractFormValueAtIndex(i, form_value)) { switch (attr) { case DW_AT_decl_file: if (die.GetCU()->DW_AT_decl_file_attributes_are_invalid()) { // llvm-gcc outputs invalid DW_AT_decl_file attributes that // always // point to the compile unit file, so we clear this invalid // value // so that we can still unique types efficiently. decl.SetFile(FileSpec("", false)); } else decl.SetFile( sc.comp_unit->GetSupportFiles().GetFileSpecAtIndex( form_value.Unsigned())); break; case DW_AT_decl_line: decl.SetLine(form_value.Unsigned()); break; case DW_AT_decl_column: decl.SetColumn(form_value.Unsigned()); break; case DW_AT_name: type_name_cstr = form_value.AsCString(); type_name_const_str.SetCString(type_name_cstr); break; case DW_AT_byte_size: byte_size = form_value.Unsigned(); byte_size_valid = true; break; case DW_AT_accessibility: accessibility = DW_ACCESS_to_AccessType(form_value.Unsigned()); break; case DW_AT_declaration: is_forward_declaration = form_value.Boolean(); break; case DW_AT_APPLE_runtime_class: class_language = (LanguageType)form_value.Signed(); break; case DW_AT_APPLE_objc_complete_type: is_complete_objc_class = form_value.Signed(); break; case DW_AT_allocated: case DW_AT_associated: case DW_AT_data_location: case DW_AT_description: case DW_AT_start_scope: case DW_AT_visibility: default: case DW_AT_sibling: break; } } } } // 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 unique_ast_entry_ap( new UniqueDWARFASTType()); ConstString unique_typename(type_name_const_str); Declaration unique_decl(decl); if (type_name_const_str) { LanguageType die_language = die.GetLanguage(); if (Language::LanguageIsCPlusPlus(die_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, byte_size_valid ? byte_size : -1, *unique_ast_entry_ap)) { type_sp = unique_ast_entry_ap->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 (byte_size_valid && byte_size == 0 && type_name_cstr && die.HasChildren() == false && sc.comp_unit->GetLanguage() == 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. is_forward_declaration = true; } if (class_language == eLanguageTypeObjC || class_language == eLanguageTypeObjC_plus_plus) { if (!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, type_name_const_str, 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, type_name_const_str, 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(this), die.GetOffset(), DW_TAG_value_to_name(tag), type_name_cstr, 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 (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(this), die.GetOffset(), DW_TAG_value_to_name(tag), type_name_cstr); } // 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(this), die.GetOffset(), DW_TAG_value_to_name(tag), type_name_cstr, 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->DebugInfo()->GetDIE(DIERef(type_sp->GetID(), dwarf))); 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 (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)) accessibility = default_accessibility; } ClangASTMetadata metadata; metadata.SetUserID(die.GetID()); metadata.SetIsDynamicCXXType(dwarf->ClassOrStructIsVirtual(die)); if (type_name_cstr && strchr(type_name_cstr, '<')) { ClangASTContext::TemplateParameterInfos template_param_infos; if (ParseTemplateParameterInfos(die, template_param_infos)) { clang::ClassTemplateDecl *class_template_decl = m_ast.ParseClassTemplateDecl(decl_ctx, accessibility, type_name_cstr, tag_decl_kind, template_param_infos); 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, accessibility, type_name_cstr, tag_decl_kind, 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.reset(new Type(die.GetID(), dwarf, type_name_const_str, byte_size, NULL, LLDB_INVALID_UID, Type::eEncodingIsUID, &decl, clang_type, Type::eResolveStateForward)); type_sp->SetIsCompleteObjCClass(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_ap->m_type_sp = type_sp; unique_ast_entry_ap->m_die = die; unique_ast_entry_ap->m_declaration = unique_decl; unique_ast_entry_ap->m_byte_size = byte_size; dwarf->GetUniqueDWARFASTTypeMap().Insert(unique_typename, *unique_ast_entry_ap); if (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(); is_forward_declaration = false; break; default: child_die = child_die.GetSibling(); break; } } } if (!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() == false) { // 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(), type_name_cstr); } 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 (class_language != eLanguageTypeObjC && 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.GetDIERef(); m_ast.SetHasExternalStorage(clang_type.GetOpaqueQualType(), true); } } } break; case DW_TAG_enumeration_type: { // Set a bit that lets us know that we are currently parsing this dwarf->GetDIEToType()[die.GetDIE()] = DIE_IS_BEING_PARSED; DWARFFormValue encoding_form; const size_t num_attributes = die.GetAttributes(attributes); if (num_attributes > 0) { uint32_t i; for (i = 0; i < num_attributes; ++i) { attr = attributes.AttributeAtIndex(i); if (attributes.ExtractFormValueAtIndex(i, form_value)) { switch (attr) { case DW_AT_decl_file: decl.SetFile(sc.comp_unit->GetSupportFiles().GetFileSpecAtIndex( form_value.Unsigned())); break; case DW_AT_decl_line: decl.SetLine(form_value.Unsigned()); break; case DW_AT_decl_column: decl.SetColumn(form_value.Unsigned()); break; case DW_AT_name: type_name_cstr = form_value.AsCString(); type_name_const_str.SetCString(type_name_cstr); break; case DW_AT_type: encoding_form = form_value; break; case DW_AT_byte_size: byte_size = form_value.Unsigned(); break; case DW_AT_accessibility: break; // accessibility = // DW_ACCESS_to_AccessType(form_value.Unsigned()); break; case DW_AT_declaration: is_forward_declaration = form_value.Boolean(); break; case DW_AT_allocated: case DW_AT_associated: case DW_AT_bit_stride: case DW_AT_byte_stride: case DW_AT_data_location: case DW_AT_description: case DW_AT_start_scope: case DW_AT_visibility: case DW_AT_specification: case DW_AT_abstract_origin: case DW_AT_sibling: break; } } } if (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(this), die.GetOffset(), DW_TAG_value_to_name(tag), type_name_cstr, 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->DebugInfo()->GetDIE( DIERef(type_sp->GetID(), dwarf))); 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 (encoding_form.IsValid()) { Type *enumerator_type = dwarf->ResolveTypeUID(DIERef(encoding_form)); if (enumerator_type) enumerator_clang_type = enumerator_type->GetFullCompilerType(); } if (!enumerator_clang_type) { if (byte_size > 0) { enumerator_clang_type = m_ast.GetBuiltinTypeForDWARFEncodingAndBitSize( NULL, DW_ATE_signed, byte_size * 8); } else { enumerator_clang_type = m_ast.GetBasicType(eBasicTypeInt); } } clang_type = m_ast.CreateEnumerationType( type_name_cstr, GetClangDeclContextContainingDIE(die, nullptr), decl, enumerator_clang_type); } else { enumerator_clang_type = m_ast.GetEnumerationIntegerType(clang_type.GetOpaqueQualType()); } LinkDeclContextToDIE( ClangASTContext::GetDeclContextForType(clang_type), die); type_sp.reset(new Type( die.GetID(), dwarf, type_name_const_str, byte_size, NULL, DIERef(encoding_form).GetUID(dwarf), Type::eEncodingIsUID, &decl, clang_type, Type::eResolveStateForward)); if (ClangASTContext::StartTagDeclarationDefinition(clang_type)) { if (die.HasChildren()) { SymbolContext cu_sc(die.GetLLDBCompileUnit()); bool is_signed = false; enumerator_clang_type.IsIntegerType(is_signed); ParseChildEnumerators(cu_sc, clang_type, is_signed, type_sp->GetByteSize(), 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(), type_name_cstr); } } } break; case DW_TAG_inlined_subroutine: case DW_TAG_subprogram: case DW_TAG_subroutine_type: { // Set a bit that lets us know that we are currently parsing this dwarf->GetDIEToType()[die.GetDIE()] = DIE_IS_BEING_PARSED; DWARFFormValue type_die_form; bool is_variadic = false; bool is_inline = false; bool is_static = false; bool is_virtual = false; bool is_explicit = false; bool is_artificial = false; bool has_template_params = false; DWARFFormValue specification_die_form; DWARFFormValue abstract_origin_die_form; dw_offset_t object_pointer_die_offset = DW_INVALID_OFFSET; unsigned type_quals = 0; clang::StorageClass storage = clang::SC_None; //, Extern, Static, PrivateExtern const size_t num_attributes = die.GetAttributes(attributes); if (num_attributes > 0) { uint32_t i; for (i = 0; i < num_attributes; ++i) { attr = attributes.AttributeAtIndex(i); if (attributes.ExtractFormValueAtIndex(i, form_value)) { switch (attr) { case DW_AT_decl_file: decl.SetFile(sc.comp_unit->GetSupportFiles().GetFileSpecAtIndex( form_value.Unsigned())); break; case DW_AT_decl_line: decl.SetLine(form_value.Unsigned()); break; case DW_AT_decl_column: decl.SetColumn(form_value.Unsigned()); break; case DW_AT_name: type_name_cstr = form_value.AsCString(); type_name_const_str.SetCString(type_name_cstr); break; case DW_AT_linkage_name: case DW_AT_MIPS_linkage_name: break; // mangled = // form_value.AsCString(&dwarf->get_debug_str_data()); // break; case DW_AT_type: type_die_form = form_value; break; case DW_AT_accessibility: accessibility = DW_ACCESS_to_AccessType(form_value.Unsigned()); break; case DW_AT_declaration: break; // is_forward_declaration = form_value.Boolean(); break; case DW_AT_inline: is_inline = form_value.Boolean(); break; case DW_AT_virtuality: is_virtual = form_value.Boolean(); break; case DW_AT_explicit: is_explicit = form_value.Boolean(); break; case DW_AT_artificial: is_artificial = form_value.Boolean(); break; case DW_AT_external: if (form_value.Unsigned()) { if (storage == clang::SC_None) storage = clang::SC_Extern; else storage = clang::SC_PrivateExtern; } break; case DW_AT_specification: specification_die_form = form_value; break; case DW_AT_abstract_origin: abstract_origin_die_form = form_value; break; case DW_AT_object_pointer: object_pointer_die_offset = form_value.Reference(); break; case DW_AT_allocated: case DW_AT_associated: case DW_AT_address_class: case DW_AT_calling_convention: case DW_AT_data_location: case DW_AT_elemental: case DW_AT_entry_pc: case DW_AT_frame_base: case DW_AT_high_pc: case DW_AT_low_pc: case DW_AT_prototyped: case DW_AT_pure: case DW_AT_ranges: case DW_AT_recursive: case DW_AT_return_addr: case DW_AT_segment: case DW_AT_start_scope: case DW_AT_static_link: case DW_AT_trampoline: case DW_AT_visibility: case DW_AT_vtable_elem_location: case DW_AT_description: case DW_AT_sibling: break; } } } } std::string object_pointer_name; if (object_pointer_die_offset != DW_INVALID_OFFSET) { DWARFDIE object_pointer_die = die.GetDIE(object_pointer_die_offset); if (object_pointer_die) { const char *object_pointer_name_cstr = object_pointer_die.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 (type_die_form.IsValid()) func_type = dwarf->ResolveTypeUID(DIERef(type_die_form)); if (func_type) return_clang_type = func_type->GetForwardCompilerType(); else return_clang_type = m_ast.GetBasicType(eBasicTypeVoid); std::vector function_param_types; std::vector 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(sc, 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 (type_name_cstr) { bool type_handled = false; if (tag == DW_TAG_subprogram || tag == DW_TAG_inlined_subroutine) { ObjCLanguage::MethodName objc_method(type_name_cstr, 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 (accessibility == eAccessNone) accessibility = eAccessPublic; clang::ObjCMethodDecl *objc_method_decl = m_ast.AddMethodToObjCObjectType( class_opaque_type, type_name_cstr, clang_type, accessibility, 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"... SymbolFileDWARF *class_symfile = NULL; DWARFDIE class_type_die; SymbolFileDWARFDebugMap *debug_map_symfile = dwarf->GetDebugMapSymfile(); if (debug_map_symfile) { class_symfile = debug_map_symfile->GetSymbolFileByOSOIndex( SymbolFileDWARFDebugMap::GetOSOIndexFromUserID( class_type->GetID())); class_type_die = class_symfile->DebugInfo()->GetDIE( DIERef(class_type->GetID(), dwarf)); } else { class_symfile = dwarf; class_type_die = dwarf->DebugInfo()->GetDIE( DIERef(class_type->GetID(), dwarf)); } if (class_type_die) { DWARFDIECollection 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 (specification_die_form.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 = dwarf->DebugInfo()->GetDIE( DIERef(specification_die_form)); 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.8" PRIx64 ") has no decl\n", die.GetID(), specification_die_form.Reference()); } type_handled = true; } else if (abstract_origin_die_form.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 = dwarf->DebugInfo()->GetDIE( DIERef(abstract_origin_die_form)); 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.8" PRIx64 ") has no decl\n", die.GetID(), abstract_origin_die_form.Reference()); } 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() == std::string(type_name_cstr)) { 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", type_name_cstr, 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 (accessibility == eAccessNone) accessibility = eAccessPublic; clang::CXXMethodDecl *cxx_method_decl = m_ast.AddMethodToCXXRecordType( class_opaque_type.GetOpaqueQualType(), type_name_cstr, clang_type, accessibility, is_virtual, is_static, is_inline, is_explicit, is_attr_used, 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(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. // type_handled = true; } } } } } } if (!type_handled) { clang::FunctionDecl *function_decl = nullptr; if (abstract_origin_die_form.IsValid()) { DWARFDIE abs_die = dwarf->DebugInfo()->GetDIE(DIERef(abstract_origin_die_form)); SymbolContext sc; if (dwarf->ResolveType(abs_die)) { function_decl = llvm::dyn_cast_or_null( 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, type_name_cstr, clang_type, storage, is_inline); // if (template_param_infos.GetSize() > // 0) // { // clang::FunctionTemplateDecl // *func_template_decl = // CreateFunctionTemplateDecl // (containing_decl_ctx, // function_decl, // type_name_cstr, // template_param_infos); // // CreateFunctionTemplateSpecializationInfo // (function_decl, // func_template_decl, // template_param_infos); // } // Add the decl to our DIE to decl context map 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()); 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(function_decl)); } m_ast.SetMetadata(function_decl, metadata); } } } } type_sp.reset(new Type(die.GetID(), dwarf, type_name_const_str, 0, NULL, LLDB_INVALID_UID, Type::eEncodingIsUID, &decl, clang_type, Type::eResolveStateFull)); assert(type_sp.get()); } break; case DW_TAG_array_type: { // Set a bit that lets us know that we are currently parsing this dwarf->GetDIEToType()[die.GetDIE()] = DIE_IS_BEING_PARSED; DWARFFormValue type_die_form; int64_t first_index = 0; uint32_t byte_stride = 0; uint32_t bit_stride = 0; bool is_vector = false; const size_t num_attributes = die.GetAttributes(attributes); if (num_attributes > 0) { uint32_t i; for (i = 0; i < num_attributes; ++i) { attr = attributes.AttributeAtIndex(i); if (attributes.ExtractFormValueAtIndex(i, form_value)) { switch (attr) { case DW_AT_decl_file: decl.SetFile(sc.comp_unit->GetSupportFiles().GetFileSpecAtIndex( form_value.Unsigned())); break; case DW_AT_decl_line: decl.SetLine(form_value.Unsigned()); break; case DW_AT_decl_column: decl.SetColumn(form_value.Unsigned()); break; case DW_AT_name: type_name_cstr = form_value.AsCString(); type_name_const_str.SetCString(type_name_cstr); break; case DW_AT_type: type_die_form = form_value; break; case DW_AT_byte_size: break; // byte_size = form_value.Unsigned(); break; case DW_AT_byte_stride: byte_stride = form_value.Unsigned(); break; case DW_AT_bit_stride: bit_stride = form_value.Unsigned(); break; case DW_AT_GNU_vector: is_vector = form_value.Boolean(); break; case DW_AT_accessibility: break; // accessibility = // DW_ACCESS_to_AccessType(form_value.Unsigned()); break; case DW_AT_declaration: break; // is_forward_declaration = form_value.Boolean(); break; case DW_AT_allocated: case DW_AT_associated: case DW_AT_data_location: case DW_AT_description: case DW_AT_ordering: case DW_AT_start_scope: case DW_AT_visibility: case DW_AT_specification: case DW_AT_abstract_origin: case DW_AT_sibling: break; } } } DEBUG_PRINTF("0x%8.8" PRIx64 ": %s (\"%s\")\n", die.GetID(), DW_TAG_value_to_name(tag), type_name_cstr); DIERef type_die_ref(type_die_form); Type *element_type = dwarf->ResolveTypeUID(type_die_ref); if (element_type) { std::vector element_orders; ParseChildArrayInfo(sc, die, first_index, element_orders, byte_stride, bit_stride); if (byte_stride == 0 && bit_stride == 0) byte_stride = element_type->GetByteSize(); CompilerType array_element_type = element_type->GetForwardCompilerType(); if (ClangASTContext::IsCXXClassType(array_element_type) && array_element_type.GetCompleteType() == false) { ModuleSP module_sp = die.GetModule(); if (module_sp) { if (die.GetCU()->GetProducer() == DWARFCompileUnit::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 -fno-limit-debug-info or " "disable -gmodule", die.GetOffset(), type_die_ref.die_offset); 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_ref.die_offset, die.GetLLDBCompileUnit() ? die.GetLLDBCompileUnit()->GetPath().c_str() : "the source file"); } // 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_ref.die_offset); } } uint64_t array_element_bit_stride = byte_stride * 8 + bit_stride; if (element_orders.size() > 0) { uint64_t num_elements = 0; std::vector::const_reverse_iterator pos; std::vector::const_reverse_iterator end = element_orders.rend(); for (pos = element_orders.rbegin(); pos != end; ++pos) { num_elements = *pos; clang_type = m_ast.CreateArrayType(array_element_type, num_elements, 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, is_vector); } ConstString empty_name; type_sp.reset(new Type( die.GetID(), dwarf, empty_name, array_element_bit_stride / 8, NULL, DIERef(type_die_form).GetUID(dwarf), Type::eEncodingIsUID, &decl, clang_type, Type::eResolveStateFull)); type_sp->SetEncodingType(element_type); } } } break; case DW_TAG_ptr_to_member_type: { DWARFFormValue type_die_form; DWARFFormValue containing_type_die_form; const size_t num_attributes = die.GetAttributes(attributes); if (num_attributes > 0) { uint32_t i; for (i = 0; i < num_attributes; ++i) { attr = attributes.AttributeAtIndex(i); if (attributes.ExtractFormValueAtIndex(i, form_value)) { switch (attr) { case DW_AT_type: type_die_form = form_value; break; case DW_AT_containing_type: containing_type_die_form = form_value; break; } } } Type *pointee_type = dwarf->ResolveTypeUID(DIERef(type_die_form)); Type *class_type = dwarf->ResolveTypeUID(DIERef(containing_type_die_form)); CompilerType pointee_clang_type = pointee_type->GetForwardCompilerType(); CompilerType class_clang_type = class_type->GetLayoutCompilerType(); clang_type = ClangASTContext::CreateMemberPointerType( class_clang_type, pointee_clang_type); byte_size = clang_type.GetByteSize(nullptr); type_sp.reset(new Type(die.GetID(), dwarf, type_name_const_str, byte_size, NULL, LLDB_INVALID_UID, Type::eEncodingIsUID, NULL, clang_type, Type::eResolveStateForward)); } break; } default: dwarf->GetObjectFile()->GetModule()->ReportError( "{0x%8.8x}: unhandled type tag 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)); break; } if (type_sp.get()) { DWARFDIE sc_parent_die = SymbolFileDWARF::GetParentSymbolContextDIE(die); dw_tag_t sc_parent_tag = sc_parent_die.Tag(); SymbolContextScope *symbol_context_scope = NULL; if (sc_parent_tag == DW_TAG_compile_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; } if (symbol_context_scope != NULL) { 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(); } } else if (type_ptr != DIE_IS_BEING_PARSED) { type_sp = type_ptr->shared_from_this(); } } return type_sp; } // DWARF parsing functions class DWARFASTParserClang::DelayedAddObjCClassProperty { public: DelayedAddObjCClassProperty( const CompilerType &class_opaque_type, const char *property_name, const CompilerType &property_opaque_type, // The property type is only // required if you don't have an // ivar decl clang::ObjCIvarDecl *ivar_decl, const char *property_setter_name, const char *property_getter_name, uint32_t property_attributes, const ClangASTMetadata *metadata) : m_class_opaque_type(class_opaque_type), m_property_name(property_name), m_property_opaque_type(property_opaque_type), m_ivar_decl(ivar_decl), m_property_setter_name(property_setter_name), m_property_getter_name(property_getter_name), m_property_attributes(property_attributes) { if (metadata != NULL) { m_metadata_ap.reset(new ClangASTMetadata()); *m_metadata_ap = *metadata; } } DelayedAddObjCClassProperty(const DelayedAddObjCClassProperty &rhs) { *this = rhs; } DelayedAddObjCClassProperty & operator=(const DelayedAddObjCClassProperty &rhs) { m_class_opaque_type = rhs.m_class_opaque_type; m_property_name = rhs.m_property_name; m_property_opaque_type = rhs.m_property_opaque_type; m_ivar_decl = rhs.m_ivar_decl; m_property_setter_name = rhs.m_property_setter_name; m_property_getter_name = rhs.m_property_getter_name; m_property_attributes = rhs.m_property_attributes; if (rhs.m_metadata_ap.get()) { m_metadata_ap.reset(new ClangASTMetadata()); *m_metadata_ap = *rhs.m_metadata_ap; } return *this; } bool Finalize() { return ClangASTContext::AddObjCClassProperty( m_class_opaque_type, m_property_name, m_property_opaque_type, m_ivar_decl, m_property_setter_name, m_property_getter_name, m_property_attributes, m_metadata_ap.get()); } private: CompilerType m_class_opaque_type; const char *m_property_name; CompilerType m_property_opaque_type; clang::ObjCIvarDecl *m_ivar_decl; const char *m_property_setter_name; const char *m_property_getter_name; uint32_t m_property_attributes; std::unique_ptr m_metadata_ap; }; bool DWARFASTParserClang::ParseTemplateDIE( const DWARFDIE &die, ClangASTContext::TemplateParameterInfos &template_param_infos) { const dw_tag_t tag = die.Tag(); switch (tag) { case DW_TAG_template_type_parameter: case DW_TAG_template_value_parameter: { DWARFAttributes attributes; const size_t num_attributes = die.GetAttributes(attributes); const char *name = nullptr; CompilerType clang_type; uint64_t uval64 = 0; bool uval64_valid = false; if (num_attributes > 0) { DWARFFormValue form_value; for (size_t i = 0; i < num_attributes; ++i) { const dw_attr_t attr = attributes.AttributeAtIndex(i); switch (attr) { case DW_AT_name: if (attributes.ExtractFormValueAtIndex(i, form_value)) name = form_value.AsCString(); break; case DW_AT_type: if (attributes.ExtractFormValueAtIndex(i, form_value)) { Type *lldb_type = die.ResolveTypeUID(DIERef(form_value)); if (lldb_type) clang_type = lldb_type->GetForwardCompilerType(); } break; case DW_AT_const_value: if (attributes.ExtractFormValueAtIndex(i, form_value)) { uval64_valid = true; uval64 = form_value.Unsigned(); } break; default: break; } } clang::ASTContext *ast = m_ast.getASTContext(); if (!clang_type) clang_type = m_ast.GetBasicType(eBasicTypeVoid); if (clang_type) { bool is_signed = false; if (name && name[0]) template_param_infos.names.push_back(name); else template_param_infos.names.push_back(NULL); // Get the signed value for any integer or enumeration if available clang_type.IsIntegerOrEnumerationType(is_signed); if (tag == DW_TAG_template_value_parameter && uval64_valid) { llvm::APInt apint(clang_type.GetBitSize(nullptr), uval64, is_signed); template_param_infos.args.push_back( clang::TemplateArgument(*ast, llvm::APSInt(apint, !is_signed), ClangUtil::GetQualType(clang_type))); } else { template_param_infos.args.push_back( clang::TemplateArgument(ClangUtil::GetQualType(clang_type))); } } else { return false; } } } return true; default: break; } return false; } bool DWARFASTParserClang::ParseTemplateParameterInfos( const DWARFDIE &parent_die, ClangASTContext::TemplateParameterInfos &template_param_infos) { if (!parent_die) return false; Args template_parameter_names; for (DWARFDIE die = parent_die.GetFirstChild(); die.IsValid(); die = die.GetSibling()) { const dw_tag_t tag = die.Tag(); switch (tag) { case DW_TAG_template_type_parameter: case DW_TAG_template_value_parameter: ParseTemplateDIE(die, template_param_infos); break; default: break; } } if (template_param_infos.args.empty()) return false; return template_param_infos.args.size() == template_param_infos.names.size(); } bool DWARFASTParserClang::CompleteTypeFromDWARF(const DWARFDIE &die, lldb_private::Type *type, CompilerType &clang_type) { SymbolFileDWARF *dwarf = die.GetDWARF(); std::lock_guard guard( dwarf->GetObjectFile()->GetModule()->GetMutex()); // Disable external storage for this type so we don't get anymore // clang::ExternalASTSource queries for this type. m_ast.SetHasExternalStorage(clang_type.GetOpaqueQualType(), false); 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 = nullptr; // (LogChannelDWARF::GetLogIfAny(DWARF_LOG_DEBUG_INFO|DWARF_LOG_TYPE_COMPLETION)); if (log) dwarf->GetObjectFile()->GetModule()->LogMessageVerboseBacktrace( log, "0x%8.8" PRIx64 ": %s '%s' resolving forward declaration...", die.GetID(), die.GetTagAsCString(), type->GetName().AsCString()); assert(clang_type); DWARFAttributes attributes; 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; } SymbolContext sc(die.GetLLDBCompileUnit()); std::vector base_classes; std::vector member_accessibilities; bool is_a_class = false; // Parse members and base classes first DWARFDIECollection member_function_dies; DelayedPropertyList delayed_properties; ParseChildMembers(sc, die, clang_type, class_language, base_classes, member_accessibilities, member_function_dies, delayed_properties, default_accessibility, is_a_class, layout_info); // Now parse any methods if there were any... size_t num_functions = member_function_dies.Size(); if (num_functions > 0) { for (size_t i = 0; i < num_functions; ++i) { dwarf->ResolveType(member_function_dies.GetDIEAtIndex(i)); } } 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 (!base_classes.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.SetBaseClassesForClassType() for (auto &base_class : base_classes) { 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() == false) { 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() == DWARFCompileUnit::eProducerClang) module->ReportError(":: Try compiling the source file with " "-fno-limit-debug-info."); // 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.SetBaseClassesForClassType()" // 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.SetBaseClassesForClassType(clang_type.GetOpaqueQualType(), &base_classes.front(), base_classes.size()); // Clang will copy each CXXBaseSpecifier in "base_classes" // so we have to free them all. ClangASTContext::DeleteBaseClassSpecifiers(&base_classes.front(), base_classes.size()); } } } 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() * 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(clang_type.GetOpaqueQualType()), static_cast(record_decl), layout_info.bit_size, layout_info.alignment, static_cast(layout_info.field_offsets.size()), static_cast(layout_info.base_offsets.size()), static_cast(layout_info.vbase_offsets.size())); uint32_t idx; { llvm::DenseMap::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(clang_type.GetOpaqueQualType()), idx, static_cast(pos->second), pos->first->getNameAsString().c_str()); } } { llvm::DenseMap::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_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(clang_type.GetOpaqueQualType()), idx, static_cast(vbase_pos->second.getQuantity()), vbase_pos->first->getNameAsString().c_str()); } } } } GetClangASTImporter().InsertRecordDecl(record_decl, layout_info); } } } return (bool)clang_type; case DW_TAG_enumeration_type: if (ClangASTContext::StartTagDeclarationDefinition(clang_type)) { if (die.HasChildren()) { SymbolContext sc(die.GetLLDBCompileUnit()); bool is_signed = false; clang_type.IsIntegerType(is_signed); ParseChildEnumerators(sc, clang_type, is_signed, type->GetByteSize(), die); } ClangASTContext::CompleteTagDeclarationDefinition(clang_type); } return (bool)clang_type; default: assert(false && "not a forward clang type decl!"); break; } return false; } std::vector DWARFASTParserClang::GetDIEForDeclContext( lldb_private::CompilerDeclContext decl_context) { std::vector 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; } CompilerDecl DWARFASTParserClang::GetDeclForUIDFromDWARF(const DWARFDIE &die) { clang::Decl *clang_decl = GetClangDeclForDIE(die); if (clang_decl != nullptr) return CompilerDecl(&m_ast, clang_decl); return CompilerDecl(); } CompilerDeclContext DWARFASTParserClang::GetDeclContextForUIDFromDWARF(const DWARFDIE &die) { clang::DeclContext *clang_decl_ctx = GetClangDeclContextForDIE(die); if (clang_decl_ctx) return CompilerDeclContext(&m_ast, clang_decl_ctx); return CompilerDeclContext(); } CompilerDeclContext DWARFASTParserClang::GetDeclContextContainingUIDFromDWARF(const DWARFDIE &die) { clang::DeclContext *clang_decl_ctx = GetClangDeclContextContainingDIE(die, nullptr); if (clang_decl_ctx) return CompilerDeclContext(&m_ast, clang_decl_ctx); return CompilerDeclContext(); } size_t DWARFASTParserClang::ParseChildEnumerators( const SymbolContext &sc, lldb_private::CompilerType &clang_type, bool is_signed, uint32_t enumerator_byte_size, const DWARFDIE &parent_die) { if (!parent_die) return 0; size_t enumerators_added = 0; for (DWARFDIE die = parent_die.GetFirstChild(); die.IsValid(); die = die.GetSibling()) { const dw_tag_t tag = die.Tag(); if (tag == DW_TAG_enumerator) { DWARFAttributes attributes; const size_t num_child_attributes = die.GetAttributes(attributes); if (num_child_attributes > 0) { const char *name = NULL; bool got_value = false; int64_t enum_value = 0; Declaration decl; uint32_t i; for (i = 0; i < num_child_attributes; ++i) { const dw_attr_t attr = attributes.AttributeAtIndex(i); DWARFFormValue form_value; if (attributes.ExtractFormValueAtIndex(i, form_value)) { switch (attr) { case DW_AT_const_value: got_value = true; if (is_signed) enum_value = form_value.Signed(); else enum_value = form_value.Unsigned(); break; case DW_AT_name: name = form_value.AsCString(); break; case DW_AT_description: default: case DW_AT_decl_file: decl.SetFile(sc.comp_unit->GetSupportFiles().GetFileSpecAtIndex( form_value.Unsigned())); break; case DW_AT_decl_line: decl.SetLine(form_value.Unsigned()); break; case DW_AT_decl_column: decl.SetColumn(form_value.Unsigned()); break; case DW_AT_sibling: break; } } } if (name && name[0] && got_value) { m_ast.AddEnumerationValueToEnumerationType( clang_type.GetOpaqueQualType(), m_ast.GetEnumerationIntegerType(clang_type.GetOpaqueQualType()), decl, name, enum_value, enumerator_byte_size * 8); ++enumerators_added; } } } } 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 Stack; Stack m_dies; }; #endif Function *DWARFASTParserClang::ParseFunctionFromDWARF(const SymbolContext &sc, const DWARFDIE &die) { DWARFRangeList func_ranges; const char *name = NULL; const char *mangled = NULL; int decl_file = 0; int decl_line = 0; int decl_column = 0; int call_file = 0; int call_line = 0; int call_column = 0; DWARFExpression frame_base(die.GetCU()); const dw_tag_t tag = die.Tag(); if (tag != DW_TAG_subprogram) return NULL; if (die.GetDIENamesAndRanges(name, mangled, func_ranges, decl_file, decl_line, decl_column, call_file, call_line, call_column, &frame_base)) { // Union of all ranges in the function DIE (if the function is // discontiguous) AddressRange func_range; lldb::addr_t lowest_func_addr = func_ranges.GetMinRangeBase(0); lldb::addr_t highest_func_addr = func_ranges.GetMaxRangeEnd(0); if (lowest_func_addr != LLDB_INVALID_ADDRESS && lowest_func_addr <= highest_func_addr) { ModuleSP module_sp(die.GetModule()); func_range.GetBaseAddress().ResolveAddressUsingFileSections( lowest_func_addr, module_sp->GetSectionList()); if (func_range.GetBaseAddress().IsValid()) func_range.SetByteSize(highest_func_addr - lowest_func_addr); } if (func_range.GetBaseAddress().IsValid()) { Mangled func_name; if (mangled) func_name.SetValue(ConstString(mangled), true); else if (die.GetParent().Tag() == DW_TAG_compile_unit && Language::LanguageIsCPlusPlus(die.GetLanguage()) && name && strcmp(name, "main") != 0) { // If the mangled name is not present in the DWARF, generate the // demangled name // using the decl context. We skip if the function is "main" as its name // is // never mangled. bool is_static = false; bool is_variadic = false; bool has_template_params = false; unsigned type_quals = 0; std::vector param_types; std::vector param_decls; DWARFDeclContext decl_ctx; StreamString sstr; die.GetDWARFDeclContext(decl_ctx); sstr << decl_ctx.GetQualifiedName(); clang::DeclContext *containing_decl_ctx = GetClangDeclContextContainingDIE(die, nullptr); ParseChildParameters(sc, containing_decl_ctx, die, true, is_static, is_variadic, has_template_params, param_types, param_decls, type_quals); sstr << "("; for (size_t i = 0; i < param_types.size(); i++) { if (i > 0) sstr << ", "; sstr << param_types[i].GetTypeName(); } if (is_variadic) sstr << ", ..."; sstr << ")"; if (type_quals & clang::Qualifiers::Const) sstr << " const"; func_name.SetValue(ConstString(sstr.GetString()), false); } else func_name.SetValue(ConstString(name), false); FunctionSP func_sp; std::unique_ptr decl_ap; if (decl_file != 0 || decl_line != 0 || decl_column != 0) decl_ap.reset(new Declaration( sc.comp_unit->GetSupportFiles().GetFileSpecAtIndex(decl_file), decl_line, decl_column)); SymbolFileDWARF *dwarf = die.GetDWARF(); // Supply the type _only_ if it has already been parsed Type *func_type = dwarf->GetDIEToType().lookup(die.GetDIE()); assert(func_type == NULL || func_type != DIE_IS_BEING_PARSED); if (dwarf->FixupAddress(func_range.GetBaseAddress())) { const user_id_t func_user_id = die.GetID(); func_sp.reset(new Function(sc.comp_unit, func_user_id, // UserID is the DIE offset func_user_id, func_name, func_type, func_range)); // first address range if (func_sp.get() != NULL) { if (frame_base.IsValid()) func_sp->GetFrameBaseExpression() = frame_base; sc.comp_unit->AddFunction(func_sp); return func_sp.get(); } } } } return NULL; } bool DWARFASTParserClang::ParseChildMembers( const SymbolContext &sc, const DWARFDIE &parent_die, CompilerType &class_clang_type, const LanguageType class_language, std::vector &base_classes, std::vector &member_accessibilities, DWARFDIECollection &member_function_dies, DelayedPropertyList &delayed_properties, AccessType &default_accessibility, bool &is_a_class, ClangASTImporter::LayoutInfo &layout_info) { if (!parent_die) return 0; // 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; ModuleSP module_sp = parent_die.GetDWARF()->GetObjectFile()->GetModule(); ClangASTContext *ast = llvm::dyn_cast_or_null(class_clang_type.GetTypeSystem()); if (ast == nullptr) return 0; for (DWARFDIE die = parent_die.GetFirstChild(); die.IsValid(); die = die.GetSibling()) { dw_tag_t tag = die.Tag(); 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) { Declaration decl; // DWARFExpression location; const char *name = NULL; const char *prop_name = NULL; const char *prop_getter_name = NULL; const char *prop_setter_name = NULL; 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; size_t byte_size = 0; 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_decl_file: decl.SetFile(sc.comp_unit->GetSupportFiles().GetFileSpecAtIndex( form_value.Unsigned())); break; case DW_AT_decl_line: decl.SetLine(form_value.Unsigned()); break; case DW_AT_decl_column: decl.SetColumn(form_value.Unsigned()); break; 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.GetDWARF()->get_debug_info_data(); uint32_t block_length = form_value.Unsigned(); uint32_t block_offset = form_value.BlockData() - debug_info_data.GetDataStart(); if (DWARFExpression::Evaluate( nullptr, // ExecutionContext * nullptr, // ClangExpressionVariableList * nullptr, // ClangExpressionDeclMap * nullptr, // RegisterContext * module_sp, debug_info_data, die.GetCU(), block_offset, block_length, eRegisterKindDWARF, &initialValue, nullptr, memberOffset, nullptr)) { member_byte_offset = memberOffset.ResolveValue(NULL).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 == 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; if (member_idx == 0 && !is_artificial && name && (strstr(name, "_vptr$") == name)) { // Not all compilers will mark the vtable pointer // member as artificial (llvm-gcc). We can't have // the virtual members in our classes otherwise it // throws off all child offsets since we end up // having and extra pointer sized member in our // class layouts. is_artificial = true; } // Handle static members if (is_external && member_byte_offset == UINT32_MAX) { Type *var_type = die.ResolveTypeUID(DIERef(encoding_form)); if (var_type) { if (accessibility == eAccessNone) accessibility = eAccessPublic; ClangASTContext::AddVariableToRecordType( class_clang_type, name, var_type->GetLayoutCompilerType(), accessibility); } break; } if (is_artificial == false) { Type *member_type = die.ResolveTypeUID(DIERef(encoding_form)); clang::FieldDecl *field_decl = NULL; 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 == 0) byte_size = member_type->GetByteSize(); ObjectFile *objfile = die.GetDWARF()->GetObjectFile(); if (objfile->GetByteOrder() == eByteOrderLittle) { this_field_info.bit_offset += byte_size * 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, sc.comp_unit ? sc.comp_unit->GetPath().c_str() : "the source file"); 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, NULL, 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 (). // 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.8" PRIx64 " which extends beyond the bounds of 0x%8.8" PRIx64, die.GetID(), name, encoding_form.Reference(), 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() == false) { if (die.GetCU()->GetProducer() == DWARFCompileUnit::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 -fno-limit-debug-info", 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, sc.comp_unit ? sc.comp_unit->GetPath().c_str() : "the source file"); // 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.8" PRIx64 " which was unable to be parsed", die.GetID(), name, encoding_form.Reference()); else module_sp->ReportError( "0x%8.8" PRIx64 ": DW_TAG_member refers to type 0x%8.8" PRIx64 " which was unable to be parsed", die.GetID(), encoding_form.Reference()); } } if (prop_name != NULL && member_type) { clang::ObjCIvarDecl *ivar_decl = NULL; if (field_decl) { ivar_decl = clang::dyn_cast(field_decl); assert(ivar_decl != NULL); } 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_subprogram: // Let the type parsing code handle this one for us. member_function_dies.Append(die); break; case DW_TAG_inheritance: { is_a_class = true; if (default_accessibility == eAccessNone) default_accessibility = eAccessPrivate; // TODO: implement DW_TAG_inheritance type parsing DWARFAttributes attributes; const size_t num_attributes = die.GetAttributes(attributes); if (num_attributes > 0) { Declaration decl; DWARFExpression location(die.GetCU()); DWARFFormValue encoding_form; AccessType accessibility = default_accessibility; bool is_virtual = false; bool is_base_of_class = true; off_t member_byte_offset = 0; uint32_t i; for (i = 0; i < num_attributes; ++i) { const dw_attr_t attr = attributes.AttributeAtIndex(i); DWARFFormValue form_value; if (attributes.ExtractFormValueAtIndex(i, form_value)) { switch (attr) { case DW_AT_decl_file: decl.SetFile(sc.comp_unit->GetSupportFiles().GetFileSpecAtIndex( form_value.Unsigned())); break; case DW_AT_decl_line: decl.SetLine(form_value.Unsigned()); break; case DW_AT_decl_column: decl.SetColumn(form_value.Unsigned()); break; case DW_AT_type: encoding_form = form_value; break; case DW_AT_data_member_location: if (form_value.BlockData()) { Value initialValue(0); Value memberOffset(0); const DWARFDataExtractor &debug_info_data = die.GetDWARF()->get_debug_info_data(); uint32_t block_length = form_value.Unsigned(); uint32_t block_offset = form_value.BlockData() - debug_info_data.GetDataStart(); if (DWARFExpression::Evaluate( nullptr, nullptr, nullptr, nullptr, module_sp, debug_info_data, die.GetCU(), block_offset, block_length, eRegisterKindDWARF, &initialValue, nullptr, memberOffset, nullptr)) { member_byte_offset = memberOffset.ResolveValue(NULL).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_virtuality: is_virtual = form_value.Boolean(); break; case DW_AT_sibling: break; default: break; } } } Type *base_class_type = die.ResolveTypeUID(DIERef(encoding_form)); if (base_class_type == NULL) { module_sp->ReportError("0x%8.8x: DW_TAG_inheritance failed to " "resolve the base class at 0x%8.8" PRIx64 " from enclosing type 0x%8.8x. \nPlease file " "a bug and attach the file at the start of " "this error message", die.GetOffset(), encoding_form.Reference(), parent_die.GetOffset()); break; } CompilerType base_class_clang_type = base_class_type->GetFullCompilerType(); assert(base_class_clang_type); if (class_language == eLanguageTypeObjC) { ast->SetObjCSuperClass(class_clang_type, base_class_clang_type); } else { base_classes.push_back(ast->CreateBaseClassSpecifier( base_class_clang_type.GetOpaqueQualType(), accessibility, is_virtual, is_base_of_class)); if (is_virtual) { // Do not specify any offset for virtual inheritance. The DWARF // produced by clang doesn't // give us a constant offset, but gives us a DWARF expressions that // requires an actual object // in memory. the DW_AT_data_member_location for a virtual base // class looks like: // DW_AT_data_member_location( DW_OP_dup, DW_OP_deref, // DW_OP_constu(0x00000018), DW_OP_minus, DW_OP_deref, // DW_OP_plus ) // Given this, there is really no valid response we can give to // clang for virtual base // class offsets, and this should eventually be removed from // LayoutRecordType() in the external // AST source in clang. } else { layout_info.base_offsets.insert(std::make_pair( ast->GetAsCXXRecordDecl( base_class_clang_type.GetOpaqueQualType()), clang::CharUnits::fromQuantity(member_byte_offset))); } } } } break; default: break; } } return true; } size_t DWARFASTParserClang::ParseChildParameters( const SymbolContext &sc, clang::DeclContext *containing_decl_ctx, const DWARFDIE &parent_die, bool skip_artificial, bool &is_static, bool &is_variadic, bool &has_template_params, std::vector &function_param_types, std::vector &function_param_decls, unsigned &type_quals) { if (!parent_die) return 0; size_t arg_idx = 0; for (DWARFDIE die = parent_die.GetFirstChild(); die.IsValid(); die = die.GetSibling()) { const dw_tag_t tag = die.Tag(); switch (tag) { case DW_TAG_formal_parameter: { DWARFAttributes attributes; const size_t num_attributes = die.GetAttributes(attributes); if (num_attributes > 0) { const char *name = NULL; Declaration decl; DWARFFormValue param_type_die_form; bool is_artificial = false; // one of None, Auto, Register, Extern, Static, PrivateExtern clang::StorageClass storage = clang::SC_None; uint32_t i; for (i = 0; i < num_attributes; ++i) { const dw_attr_t attr = attributes.AttributeAtIndex(i); DWARFFormValue form_value; if (attributes.ExtractFormValueAtIndex(i, form_value)) { switch (attr) { case DW_AT_decl_file: decl.SetFile(sc.comp_unit->GetSupportFiles().GetFileSpecAtIndex( form_value.Unsigned())); break; case DW_AT_decl_line: decl.SetLine(form_value.Unsigned()); break; case DW_AT_decl_column: decl.SetColumn(form_value.Unsigned()); break; case DW_AT_name: name = form_value.AsCString(); break; case DW_AT_type: param_type_die_form = form_value; break; case DW_AT_artificial: is_artificial = form_value.Boolean(); break; case DW_AT_location: // if (form_value.BlockData()) // { // const DWARFDataExtractor& // debug_info_data = debug_info(); // uint32_t block_length = // form_value.Unsigned(); // DWARFDataExtractor // location(debug_info_data, // form_value.BlockData() - // debug_info_data.GetDataStart(), // block_length); // } // else // { // } // break; case DW_AT_const_value: case DW_AT_default_value: case DW_AT_description: case DW_AT_endianity: case DW_AT_is_optional: case DW_AT_segment: case DW_AT_variable_parameter: default: case DW_AT_abstract_origin: case DW_AT_sibling: break; } } } bool skip = false; if (skip_artificial) { if (is_artificial) { // In order to determine if a C++ member function is // "const" we have to look at the const-ness of "this"... // Ugly, but that if (arg_idx == 0) { if (DeclKindIsCXXClass(containing_decl_ctx->getDeclKind())) { // Often times compilers omit the "this" name for the // specification DIEs, so we can't rely upon the name // being in the formal parameter DIE... if (name == NULL || ::strcmp(name, "this") == 0) { Type *this_type = die.ResolveTypeUID(DIERef(param_type_die_form)); if (this_type) { uint32_t encoding_mask = this_type->GetEncodingMask(); if (encoding_mask & Type::eEncodingIsPointerUID) { is_static = false; if (encoding_mask & (1u << Type::eEncodingIsConstUID)) type_quals |= clang::Qualifiers::Const; if (encoding_mask & (1u << Type::eEncodingIsVolatileUID)) type_quals |= clang::Qualifiers::Volatile; } } } } } skip = true; } else { // HACK: Objective C formal parameters "self" and "_cmd" // are not marked as artificial in the DWARF... CompileUnit *comp_unit = die.GetLLDBCompileUnit(); if (comp_unit) { switch (comp_unit->GetLanguage()) { case eLanguageTypeObjC: case eLanguageTypeObjC_plus_plus: if (name && name[0] && (strcmp(name, "self") == 0 || strcmp(name, "_cmd") == 0)) skip = true; break; default: break; } } } } if (!skip) { Type *type = die.ResolveTypeUID(DIERef(param_type_die_form)); if (type) { function_param_types.push_back(type->GetForwardCompilerType()); clang::ParmVarDecl *param_var_decl = m_ast.CreateParameterDeclaration( name, type->GetForwardCompilerType(), storage); assert(param_var_decl); function_param_decls.push_back(param_var_decl); m_ast.SetMetadataAsUserID(param_var_decl, die.GetID()); } } } arg_idx++; } break; case DW_TAG_unspecified_parameters: is_variadic = true; break; case DW_TAG_template_type_parameter: case DW_TAG_template_value_parameter: // The one caller of this was never using the template_param_infos, // and the local variable was taking up a large amount of stack space // in SymbolFileDWARF::ParseType() so this was removed. If we ever need // the template params back, we can add them back. // ParseTemplateDIE (dwarf_cu, die, template_param_infos); has_template_params = true; break; default: break; } } return arg_idx; } void DWARFASTParserClang::ParseChildArrayInfo( const SymbolContext &sc, const DWARFDIE &parent_die, int64_t &first_index, std::vector &element_orders, uint32_t &byte_stride, uint32_t &bit_stride) { if (!parent_die) return; for (DWARFDIE die = parent_die.GetFirstChild(); die.IsValid(); die = die.GetSibling()) { const dw_tag_t tag = die.Tag(); switch (tag) { case DW_TAG_subrange_type: { DWARFAttributes attributes; const size_t num_child_attributes = die.GetAttributes(attributes); if (num_child_attributes > 0) { uint64_t num_elements = 0; uint64_t lower_bound = 0; uint64_t upper_bound = 0; bool upper_bound_valid = false; uint32_t i; for (i = 0; i < num_child_attributes; ++i) { const dw_attr_t attr = attributes.AttributeAtIndex(i); DWARFFormValue form_value; if (attributes.ExtractFormValueAtIndex(i, form_value)) { switch (attr) { case DW_AT_name: break; case DW_AT_count: num_elements = form_value.Unsigned(); break; case DW_AT_bit_stride: bit_stride = form_value.Unsigned(); break; case DW_AT_byte_stride: byte_stride = form_value.Unsigned(); break; case DW_AT_lower_bound: lower_bound = form_value.Unsigned(); break; case DW_AT_upper_bound: upper_bound_valid = true; upper_bound = form_value.Unsigned(); break; default: case DW_AT_abstract_origin: case DW_AT_accessibility: case DW_AT_allocated: case DW_AT_associated: case DW_AT_data_location: case DW_AT_declaration: case DW_AT_description: case DW_AT_sibling: case DW_AT_threads_scaled: case DW_AT_type: case DW_AT_visibility: break; } } } if (num_elements == 0) { if (upper_bound_valid && upper_bound >= lower_bound) num_elements = upper_bound - lower_bound + 1; } element_orders.push_back(num_elements); } } break; } } } Type *DWARFASTParserClang::GetTypeForDIE(const DWARFDIE &die) { if (die) { SymbolFileDWARF *dwarf = die.GetDWARF(); DWARFAttributes attributes; const size_t num_attributes = die.GetAttributes(attributes); if (num_attributes > 0) { DWARFFormValue type_die_form; for (size_t i = 0; i < num_attributes; ++i) { dw_attr_t attr = attributes.AttributeAtIndex(i); DWARFFormValue form_value; if (attr == DW_AT_type && attributes.ExtractFormValueAtIndex(i, form_value)) return dwarf->ResolveTypeUID(dwarf->GetDIE(DIERef(form_value)), true); } } } return nullptr; } clang::Decl *DWARFASTParserClang::GetClangDeclForDIE(const DWARFDIE &die) { if (!die) return nullptr; switch (die.Tag()) { case DW_TAG_variable: case DW_TAG_constant: case DW_TAG_formal_parameter: case DW_TAG_imported_declaration: case DW_TAG_imported_module: break; default: return nullptr; } DIEToDeclMap::iterator cache_pos = m_die_to_decl.find(die.GetDIE()); if (cache_pos != m_die_to_decl.end()) return cache_pos->second; if (DWARFDIE spec_die = die.GetReferencedDIE(DW_AT_specification)) { clang::Decl *decl = GetClangDeclForDIE(spec_die); m_die_to_decl[die.GetDIE()] = decl; m_decl_to_die[decl].insert(die.GetDIE()); return decl; } if (DWARFDIE abstract_origin_die = die.GetReferencedDIE(DW_AT_abstract_origin)) { clang::Decl *decl = GetClangDeclForDIE(abstract_origin_die); m_die_to_decl[die.GetDIE()] = decl; m_decl_to_die[decl].insert(die.GetDIE()); return decl; } clang::Decl *decl = nullptr; switch (die.Tag()) { case DW_TAG_variable: case DW_TAG_constant: case DW_TAG_formal_parameter: { SymbolFileDWARF *dwarf = die.GetDWARF(); Type *type = GetTypeForDIE(die); if (dwarf && type) { const char *name = die.GetName(); clang::DeclContext *decl_context = ClangASTContext::DeclContextGetAsDeclContext( dwarf->GetDeclContextContainingUID(die.GetID())); decl = m_ast.CreateVariableDeclaration( decl_context, name, ClangUtil::GetQualType(type->GetForwardCompilerType())); } break; } case DW_TAG_imported_declaration: { SymbolFileDWARF *dwarf = die.GetDWARF(); DWARFDIE imported_uid = die.GetAttributeValueAsReferenceDIE(DW_AT_import); if (imported_uid) { CompilerDecl imported_decl = imported_uid.GetDecl(); if (imported_decl) { clang::DeclContext *decl_context = ClangASTContext::DeclContextGetAsDeclContext( dwarf->GetDeclContextContainingUID(die.GetID())); if (clang::NamedDecl *clang_imported_decl = llvm::dyn_cast( (clang::Decl *)imported_decl.GetOpaqueDecl())) decl = m_ast.CreateUsingDeclaration(decl_context, clang_imported_decl); } } break; } case DW_TAG_imported_module: { SymbolFileDWARF *dwarf = die.GetDWARF(); DWARFDIE imported_uid = die.GetAttributeValueAsReferenceDIE(DW_AT_import); if (imported_uid) { CompilerDeclContext imported_decl_ctx = imported_uid.GetDeclContext(); if (imported_decl_ctx) { clang::DeclContext *decl_context = ClangASTContext::DeclContextGetAsDeclContext( dwarf->GetDeclContextContainingUID(die.GetID())); if (clang::NamespaceDecl *ns_decl = ClangASTContext::DeclContextGetAsNamespaceDecl( imported_decl_ctx)) decl = m_ast.CreateUsingDirectiveDeclaration(decl_context, ns_decl); } } break; } default: break; } m_die_to_decl[die.GetDIE()] = decl; m_decl_to_die[decl].insert(die.GetDIE()); return decl; } clang::DeclContext * DWARFASTParserClang::GetClangDeclContextForDIE(const DWARFDIE &die) { if (die) { clang::DeclContext *decl_ctx = GetCachedClangDeclContextForDIE(die); if (decl_ctx) return decl_ctx; bool try_parsing_type = true; switch (die.Tag()) { case DW_TAG_compile_unit: decl_ctx = m_ast.GetTranslationUnitDecl(); try_parsing_type = false; break; case DW_TAG_namespace: decl_ctx = ResolveNamespaceDIE(die); try_parsing_type = false; break; case DW_TAG_lexical_block: decl_ctx = GetDeclContextForBlock(die); try_parsing_type = false; break; default: break; } if (decl_ctx == nullptr && try_parsing_type) { Type *type = die.GetDWARF()->ResolveType(die); if (type) decl_ctx = GetCachedClangDeclContextForDIE(die); } if (decl_ctx) { LinkDeclContextToDIE(decl_ctx, die); return decl_ctx; } } return nullptr; } static bool IsSubroutine(const DWARFDIE &die) { switch (die.Tag()) { case DW_TAG_subprogram: case DW_TAG_inlined_subroutine: return true; default: return false; } } static DWARFDIE GetContainingFunctionWithAbstractOrigin(const DWARFDIE &die) { for (DWARFDIE candidate = die; candidate; candidate = candidate.GetParent()) { if (IsSubroutine(candidate)) { if (candidate.GetReferencedDIE(DW_AT_abstract_origin)) { return candidate; } else { return DWARFDIE(); } } } assert(!"Shouldn't call GetContainingFunctionWithAbstractOrigin on something " "not in a function"); return DWARFDIE(); } static DWARFDIE FindAnyChildWithAbstractOrigin(const DWARFDIE &context) { for (DWARFDIE candidate = context.GetFirstChild(); candidate.IsValid(); candidate = candidate.GetSibling()) { if (candidate.GetReferencedDIE(DW_AT_abstract_origin)) { return candidate; } } return DWARFDIE(); } static DWARFDIE FindFirstChildWithAbstractOrigin(const DWARFDIE &block, const DWARFDIE &function) { assert(IsSubroutine(function)); for (DWARFDIE context = block; context != function.GetParent(); context = context.GetParent()) { assert(!IsSubroutine(context) || context == function); if (DWARFDIE child = FindAnyChildWithAbstractOrigin(context)) { return child; } } return DWARFDIE(); } clang::DeclContext * DWARFASTParserClang::GetDeclContextForBlock(const DWARFDIE &die) { assert(die.Tag() == DW_TAG_lexical_block); DWARFDIE containing_function_with_abstract_origin = GetContainingFunctionWithAbstractOrigin(die); if (!containing_function_with_abstract_origin) { return (clang::DeclContext *)ResolveBlockDIE(die); } DWARFDIE child = FindFirstChildWithAbstractOrigin( die, containing_function_with_abstract_origin); CompilerDeclContext decl_context = GetDeclContextContainingUIDFromDWARF(child); return (clang::DeclContext *)decl_context.GetOpaqueDeclContext(); } clang::BlockDecl *DWARFASTParserClang::ResolveBlockDIE(const DWARFDIE &die) { if (die && die.Tag() == DW_TAG_lexical_block) { clang::BlockDecl *decl = llvm::cast_or_null(m_die_to_decl_ctx[die.GetDIE()]); if (!decl) { DWARFDIE decl_context_die; clang::DeclContext *decl_context = GetClangDeclContextContainingDIE(die, &decl_context_die); decl = m_ast.CreateBlockDeclaration(decl_context); if (decl) LinkDeclContextToDIE((clang::DeclContext *)decl, die); } return decl; } return nullptr; } clang::NamespaceDecl * DWARFASTParserClang::ResolveNamespaceDIE(const DWARFDIE &die) { if (die && die.Tag() == DW_TAG_namespace) { // See if we already parsed this namespace DIE and associated it with a // uniqued namespace declaration clang::NamespaceDecl *namespace_decl = static_cast(m_die_to_decl_ctx[die.GetDIE()]); if (namespace_decl) return namespace_decl; else { const char *namespace_name = die.GetName(); clang::DeclContext *containing_decl_ctx = GetClangDeclContextContainingDIE(die, nullptr); namespace_decl = m_ast.GetUniqueNamespaceDeclaration(namespace_name, containing_decl_ctx); Log *log = nullptr; // (LogChannelDWARF::GetLogIfAll(DWARF_LOG_DEBUG_INFO)); if (log) { 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(m_ast.getASTContext()), die.GetID(), namespace_name, static_cast(namespace_decl), static_cast(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(m_ast.getASTContext()), die.GetID(), static_cast(namespace_decl), static_cast(namespace_decl->getOriginalNamespace())); } } if (namespace_decl) LinkDeclContextToDIE((clang::DeclContext *)namespace_decl, die); return namespace_decl; } } return nullptr; } clang::DeclContext *DWARFASTParserClang::GetClangDeclContextContainingDIE( const DWARFDIE &die, DWARFDIE *decl_ctx_die_copy) { SymbolFileDWARF *dwarf = die.GetDWARF(); DWARFDIE decl_ctx_die = dwarf->GetDeclContextDIEContainingDIE(die); if (decl_ctx_die_copy) *decl_ctx_die_copy = decl_ctx_die; if (decl_ctx_die) { clang::DeclContext *clang_decl_ctx = GetClangDeclContextForDIE(decl_ctx_die); if (clang_decl_ctx) return clang_decl_ctx; } return m_ast.GetTranslationUnitDecl(); } clang::DeclContext * DWARFASTParserClang::GetCachedClangDeclContextForDIE(const DWARFDIE &die) { if (die) { DIEToDeclContextMap::iterator pos = m_die_to_decl_ctx.find(die.GetDIE()); if (pos != m_die_to_decl_ctx.end()) return pos->second; } return nullptr; } void DWARFASTParserClang::LinkDeclContextToDIE(clang::DeclContext *decl_ctx, const DWARFDIE &die) { m_die_to_decl_ctx[die.GetDIE()] = decl_ctx; // There can be many DIEs for a single decl context // m_decl_ctx_to_die[decl_ctx].insert(die.GetDIE()); m_decl_ctx_to_die.insert(std::make_pair(decl_ctx, die)); } bool DWARFASTParserClang::CopyUniqueClassMethodTypes( const DWARFDIE &src_class_die, const DWARFDIE &dst_class_die, lldb_private::Type *class_type, DWARFDIECollection &failures) { if (!class_type || !src_class_die || !dst_class_die) return false; if (src_class_die.Tag() != dst_class_die.Tag()) return false; // We need to complete the class type so we can get all of the method types // parsed so we can then unique those types to their equivalent counterparts // in "dst_cu" and "dst_class_die" class_type->GetFullCompilerType(); DWARFDIE src_die; DWARFDIE dst_die; UniqueCStringMap src_name_to_die; UniqueCStringMap dst_name_to_die; UniqueCStringMap src_name_to_die_artificial; UniqueCStringMap dst_name_to_die_artificial; for (src_die = src_class_die.GetFirstChild(); src_die.IsValid(); src_die = src_die.GetSibling()) { if (src_die.Tag() == DW_TAG_subprogram) { // Make sure this is a declaration and not a concrete instance by looking // for DW_AT_declaration set to 1. Sometimes concrete function instances // are placed inside the class definitions and shouldn't be included in // the list of things are are tracking here. if (src_die.GetAttributeValueAsUnsigned(DW_AT_declaration, 0) == 1) { const char *src_name = src_die.GetMangledName(); if (src_name) { ConstString src_const_name(src_name); if (src_die.GetAttributeValueAsUnsigned(DW_AT_artificial, 0)) - src_name_to_die_artificial.Append(src_const_name.GetStringRef(), - src_die); + src_name_to_die_artificial.Append(src_const_name, src_die); else - src_name_to_die.Append(src_const_name.GetStringRef(), src_die); + src_name_to_die.Append(src_const_name, src_die); } } } } for (dst_die = dst_class_die.GetFirstChild(); dst_die.IsValid(); dst_die = dst_die.GetSibling()) { if (dst_die.Tag() == DW_TAG_subprogram) { // Make sure this is a declaration and not a concrete instance by looking // for DW_AT_declaration set to 1. Sometimes concrete function instances // are placed inside the class definitions and shouldn't be included in // the list of things are are tracking here. if (dst_die.GetAttributeValueAsUnsigned(DW_AT_declaration, 0) == 1) { const char *dst_name = dst_die.GetMangledName(); if (dst_name) { ConstString dst_const_name(dst_name); if (dst_die.GetAttributeValueAsUnsigned(DW_AT_artificial, 0)) - dst_name_to_die_artificial.Append(dst_const_name.GetStringRef(), - dst_die); + dst_name_to_die_artificial.Append(dst_const_name, dst_die); else - dst_name_to_die.Append(dst_const_name.GetStringRef(), dst_die); + dst_name_to_die.Append(dst_const_name, dst_die); } } } } const uint32_t src_size = src_name_to_die.GetSize(); const uint32_t dst_size = dst_name_to_die.GetSize(); Log *log = nullptr; // (LogChannelDWARF::GetLogIfAny(DWARF_LOG_DEBUG_INFO | // DWARF_LOG_TYPE_COMPLETION)); // Is everything kosher so we can go through the members at top speed? bool fast_path = true; 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); } fast_path = false; } uint32_t idx; if (fast_path) { for (idx = 0; idx < src_size; ++idx) { src_die = src_name_to_die.GetValueAtIndexUnchecked(idx); 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()); fast_path = false; } const char *src_name = src_die.GetMangledName(); const char *dst_name = dst_die.GetMangledName(); // Make sure the names match 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); fast_path = false; } } DWARFASTParserClang *src_dwarf_ast_parser = (DWARFASTParserClang *)src_die.GetDWARFParser(); DWARFASTParserClang *dst_dwarf_ast_parser = (DWARFASTParserClang *)dst_die.GetDWARFParser(); // Now do the work of linking the DeclContexts and Types. if (fast_path) { // We can do this quickly. Just run across the tables index-for-index since // we know each node has matching names and tags. for (idx = 0; idx < src_size; ++idx) { src_die = src_name_to_die.GetValueAtIndexUnchecked(idx); dst_die = dst_name_to_die.GetValueAtIndexUnchecked(idx); 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(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()); } 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(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()); } } } else { // We must do this slowly. For each member of the destination, look // up a member in the source with the same name, check its tag, and // unique them if everything matches up. Report failures. if (!src_name_to_die.IsEmpty() && !dst_name_to_die.IsEmpty()) { src_name_to_die.Sort(); for (idx = 0; idx < dst_size; ++idx) { - llvm::StringRef dst_name = dst_name_to_die.GetCStringAtIndex(idx); + ConstString dst_name = dst_name_to_die.GetCStringAtIndex(idx); dst_die = dst_name_to_die.GetValueAtIndexUnchecked(idx); src_die = src_name_to_die.Find(dst_name, DWARFDIE()); if (src_die && (src_die.Tag() == dst_die.Tag())) { 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(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()); } 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(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()); } } else { if (log) log->Printf("warning: couldn't find a match for 0x%8.8x", dst_die.GetOffset()); failures.Append(dst_die); } } } } const uint32_t src_size_artificial = src_name_to_die_artificial.GetSize(); const uint32_t dst_size_artificial = dst_name_to_die_artificial.GetSize(); if (src_size_artificial && dst_size_artificial) { dst_name_to_die_artificial.Sort(); for (idx = 0; idx < src_size_artificial; ++idx) { - llvm::StringRef src_name_artificial = + ConstString src_name_artificial = src_name_to_die_artificial.GetCStringAtIndex(idx); src_die = src_name_to_die_artificial.GetValueAtIndexUnchecked(idx); dst_die = dst_name_to_die_artificial.Find(src_name_artificial, DWARFDIE()); if (dst_die) { // Both classes have the artificial types, link them 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(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()); } 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(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()); } } } } if (dst_size_artificial) { for (idx = 0; idx < dst_size_artificial; ++idx) { - llvm::StringRef dst_name_artificial = + 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.str().c_str()); + dst_die.GetOffset(), dst_name_artificial.GetCString()); failures.Append(dst_die); } } return (failures.Size() != 0); } Index: vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/NameToDIE.cpp =================================================================== --- vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/NameToDIE.cpp (revision 317691) +++ vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/NameToDIE.cpp (revision 317692) @@ -1,82 +1,82 @@ //===-- NameToDIE.cpp -------------------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #include "NameToDIE.h" #include "lldb/Symbol/ObjectFile.h" #include "lldb/Utility/ConstString.h" #include "lldb/Utility/RegularExpression.h" #include "lldb/Utility/Stream.h" #include "lldb/Utility/StreamString.h" #include "DWARFCompileUnit.h" #include "DWARFDebugInfo.h" #include "DWARFDebugInfoEntry.h" #include "SymbolFileDWARF.h" using namespace lldb; using namespace lldb_private; void NameToDIE::Finalize() { m_map.Sort(); m_map.SizeToFit(); } void NameToDIE::Insert(const ConstString &name, const DIERef &die_ref) { - m_map.Append(name.GetStringRef(), die_ref); + m_map.Append(name, die_ref); } size_t NameToDIE::Find(const ConstString &name, DIEArray &info_array) const { - return m_map.GetValues(name.GetStringRef(), info_array); + return m_map.GetValues(name, info_array); } size_t NameToDIE::Find(const RegularExpression ®ex, DIEArray &info_array) const { return m_map.GetValues(regex, info_array); } size_t NameToDIE::FindAllEntriesForCompileUnit(dw_offset_t cu_offset, DIEArray &info_array) const { const size_t initial_size = info_array.size(); const uint32_t size = m_map.GetSize(); for (uint32_t i = 0; i < size; ++i) { const DIERef &die_ref = m_map.GetValueAtIndexUnchecked(i); if (cu_offset == die_ref.cu_offset) info_array.push_back(die_ref); } return info_array.size() - initial_size; } void NameToDIE::Dump(Stream *s) { const uint32_t size = m_map.GetSize(); for (uint32_t i = 0; i < size; ++i) { - llvm::StringRef cstr = m_map.GetCStringAtIndex(i); + ConstString cstr = m_map.GetCStringAtIndex(i); const DIERef &die_ref = m_map.GetValueAtIndexUnchecked(i); - s->Printf("%p: {0x%8.8x/0x%8.8x} \"%s\"\n", (const void *)cstr.data(), - die_ref.cu_offset, die_ref.die_offset, cstr.str().c_str()); + s->Printf("%p: {0x%8.8x/0x%8.8x} \"%s\"\n", (const void *)cstr.GetCString(), + die_ref.cu_offset, die_ref.die_offset, cstr.GetCString()); } } void NameToDIE::ForEach( - std::function const + std::function const &callback) const { const uint32_t size = m_map.GetSize(); for (uint32_t i = 0; i < size; ++i) { if (!callback(m_map.GetCStringAtIndexUnchecked(i), m_map.GetValueAtIndexUnchecked(i))) break; } } void NameToDIE::Append(const NameToDIE &other) { const uint32_t size = other.m_map.GetSize(); for (uint32_t i = 0; i < size; ++i) { m_map.Append(other.m_map.GetCStringAtIndexUnchecked(i), other.m_map.GetValueAtIndexUnchecked(i)); } } Index: vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/NameToDIE.h =================================================================== --- vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/NameToDIE.h (revision 317691) +++ vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/NameToDIE.h (revision 317692) @@ -1,53 +1,54 @@ //===-- NameToDIE.h ---------------------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #ifndef SymbolFileDWARF_NameToDIE_h_ #define SymbolFileDWARF_NameToDIE_h_ #include #include "DIERef.h" #include "lldb/Core/UniqueCStringMap.h" #include "lldb/Core/dwarf.h" #include "lldb/lldb-defines.h" class SymbolFileDWARF; class NameToDIE { public: NameToDIE() : m_map() {} ~NameToDIE() {} void Dump(lldb_private::Stream *s); void Insert(const lldb_private::ConstString &name, const DIERef &die_ref); void Append(const NameToDIE &other); void Finalize(); size_t Find(const lldb_private::ConstString &name, DIEArray &info_array) const; size_t Find(const lldb_private::RegularExpression ®ex, DIEArray &info_array) const; size_t FindAllEntriesForCompileUnit(dw_offset_t cu_offset, DIEArray &info_array) const; void - ForEach(std::function const + ForEach(std::function const &callback) const; protected: lldb_private::UniqueCStringMap m_map; }; #endif // SymbolFileDWARF_NameToDIE_h_ Index: vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp =================================================================== --- vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp (revision 317691) +++ vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp (revision 317692) @@ -1,4293 +1,4299 @@ //===-- SymbolFileDWARF.cpp ------------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #include "SymbolFileDWARF.h" // Other libraries and framework includes #include "llvm/Support/Casting.h" #include "llvm/Support/Threading.h" #include "lldb/Core/ArchSpec.h" #include "lldb/Core/Module.h" #include "lldb/Core/ModuleList.h" #include "lldb/Core/ModuleSpec.h" #include "lldb/Core/PluginManager.h" #include "lldb/Core/Scalar.h" #include "lldb/Core/Section.h" #include "lldb/Core/StreamFile.h" #include "lldb/Core/Timer.h" #include "lldb/Core/Value.h" #include "lldb/Utility/RegularExpression.h" #include "lldb/Utility/StreamString.h" #include "Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.h" #include "lldb/Host/FileSystem.h" #include "lldb/Host/Host.h" #include "lldb/Interpreter/OptionValueFileSpecList.h" #include "lldb/Interpreter/OptionValueProperties.h" #include "lldb/Symbol/Block.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" #include "lldb/Symbol/DebugMacros.h" #include "lldb/Symbol/LineTable.h" #include "lldb/Symbol/ObjectFile.h" #include "lldb/Symbol/SymbolVendor.h" #include "lldb/Symbol/TypeMap.h" #include "lldb/Symbol/TypeSystem.h" #include "lldb/Symbol/VariableList.h" #include "Plugins/Language/CPlusPlus/CPlusPlusLanguage.h" #include "Plugins/Language/ObjC/ObjCLanguage.h" #include "lldb/Target/Language.h" #include "lldb/Utility/TaskPool.h" #include "DWARFASTParser.h" #include "DWARFASTParserClang.h" #include "DWARFCompileUnit.h" #include "DWARFDIECollection.h" #include "DWARFDebugAbbrev.h" #include "DWARFDebugAranges.h" #include "DWARFDebugInfo.h" #include "DWARFDebugLine.h" #include "DWARFDebugMacro.h" #include "DWARFDebugPubnames.h" #include "DWARFDebugRanges.h" #include "DWARFDeclContext.h" #include "DWARFFormValue.h" #include "LogChannelDWARF.h" #include "SymbolFileDWARFDebugMap.h" #include "SymbolFileDWARFDwo.h" #include "llvm/Support/FileSystem.h" #include #include #include //#define ENABLE_DEBUG_PRINTF // COMMENT OUT THIS LINE PRIOR TO CHECKIN #ifdef ENABLE_DEBUG_PRINTF #include #define DEBUG_PRINTF(fmt, ...) printf(fmt, __VA_ARGS__) #else #define DEBUG_PRINTF(fmt, ...) #endif using namespace lldb; using namespace lldb_private; // static inline bool // child_requires_parent_class_union_or_struct_to_be_completed (dw_tag_t tag) //{ // switch (tag) // { // default: // break; // case DW_TAG_subprogram: // case DW_TAG_inlined_subroutine: // case DW_TAG_class_type: // case DW_TAG_structure_type: // case DW_TAG_union_type: // return true; // } // return false; //} // namespace { PropertyDefinition g_properties[] = { {"comp-dir-symlink-paths", OptionValue::eTypeFileSpecList, true, 0, nullptr, nullptr, "If the DW_AT_comp_dir matches any of these paths the symbolic " "links will be resolved at DWARF parse time."}, {nullptr, OptionValue::eTypeInvalid, false, 0, nullptr, nullptr, nullptr}}; enum { ePropertySymLinkPaths }; class PluginProperties : public Properties { public: static ConstString GetSettingName() { return SymbolFileDWARF::GetPluginNameStatic(); } PluginProperties() { m_collection_sp.reset(new OptionValueProperties(GetSettingName())); m_collection_sp->Initialize(g_properties); } FileSpecList &GetSymLinkPaths() { OptionValueFileSpecList *option_value = m_collection_sp->GetPropertyAtIndexAsOptionValueFileSpecList( nullptr, true, ePropertySymLinkPaths); assert(option_value); return option_value->GetCurrentValue(); } }; typedef std::shared_ptr SymbolFileDWARFPropertiesSP; static const SymbolFileDWARFPropertiesSP &GetGlobalPluginProperties() { static const auto g_settings_sp(std::make_shared()); return g_settings_sp; } } // anonymous namespace end static const char *removeHostnameFromPathname(const char *path_from_dwarf) { if (!path_from_dwarf || !path_from_dwarf[0]) { return path_from_dwarf; } const char *colon_pos = strchr(path_from_dwarf, ':'); if (nullptr == colon_pos) { return path_from_dwarf; } const char *slash_pos = strchr(path_from_dwarf, '/'); if (slash_pos && (slash_pos < colon_pos)) { return path_from_dwarf; } // check whether we have a windows path, and so the first character // is a drive-letter not a hostname. if (colon_pos == path_from_dwarf + 1 && isalpha(*path_from_dwarf) && strlen(path_from_dwarf) > 2 && '\\' == path_from_dwarf[2]) { return path_from_dwarf; } return colon_pos + 1; } static const char *resolveCompDir(const char *path_from_dwarf) { if (!path_from_dwarf) return nullptr; // DWARF2/3 suggests the form hostname:pathname for compilation directory. // Remove the host part if present. const char *local_path = removeHostnameFromPathname(path_from_dwarf); if (!local_path) return nullptr; bool is_symlink = false; FileSpec local_path_spec(local_path, false); const auto &file_specs = GetGlobalPluginProperties()->GetSymLinkPaths(); for (size_t i = 0; i < file_specs.GetSize() && !is_symlink; ++i) is_symlink = FileSpec::Equal(file_specs.GetFileSpecAtIndex(i), local_path_spec, true); if (!is_symlink) return local_path; namespace fs = llvm::sys::fs; if (fs::get_file_type(local_path_spec.GetPath(), false) != fs::file_type::symlink_file) return local_path; FileSpec resolved_local_path_spec; const auto error = FileSystem::Readlink(local_path_spec, resolved_local_path_spec); if (error.Success()) return resolved_local_path_spec.GetCString(); return nullptr; } void SymbolFileDWARF::Initialize() { LogChannelDWARF::Initialize(); PluginManager::RegisterPlugin(GetPluginNameStatic(), GetPluginDescriptionStatic(), CreateInstance, DebuggerInitialize); } void SymbolFileDWARF::DebuggerInitialize(Debugger &debugger) { if (!PluginManager::GetSettingForSymbolFilePlugin( debugger, PluginProperties::GetSettingName())) { const bool is_global_setting = true; PluginManager::CreateSettingForSymbolFilePlugin( debugger, GetGlobalPluginProperties()->GetValueProperties(), ConstString("Properties for the dwarf symbol-file plug-in."), is_global_setting); } } void SymbolFileDWARF::Terminate() { PluginManager::UnregisterPlugin(CreateInstance); LogChannelDWARF::Terminate(); } lldb_private::ConstString SymbolFileDWARF::GetPluginNameStatic() { static ConstString g_name("dwarf"); return g_name; } const char *SymbolFileDWARF::GetPluginDescriptionStatic() { return "DWARF and DWARF3 debug symbol file reader."; } SymbolFile *SymbolFileDWARF::CreateInstance(ObjectFile *obj_file) { return new SymbolFileDWARF(obj_file); } TypeList *SymbolFileDWARF::GetTypeList() { SymbolFileDWARFDebugMap *debug_map_symfile = GetDebugMapSymfile(); if (debug_map_symfile) return debug_map_symfile->GetTypeList(); else return m_obj_file->GetModule()->GetTypeList(); } void SymbolFileDWARF::GetTypes(const DWARFDIE &die, dw_offset_t min_die_offset, dw_offset_t max_die_offset, uint32_t type_mask, TypeSet &type_set) { if (die) { const dw_offset_t die_offset = die.GetOffset(); if (die_offset >= max_die_offset) return; if (die_offset >= min_die_offset) { const dw_tag_t tag = die.Tag(); bool add_type = false; switch (tag) { case DW_TAG_array_type: add_type = (type_mask & eTypeClassArray) != 0; break; case DW_TAG_unspecified_type: case DW_TAG_base_type: add_type = (type_mask & eTypeClassBuiltin) != 0; break; case DW_TAG_class_type: add_type = (type_mask & eTypeClassClass) != 0; break; case DW_TAG_structure_type: add_type = (type_mask & eTypeClassStruct) != 0; break; case DW_TAG_union_type: add_type = (type_mask & eTypeClassUnion) != 0; break; case DW_TAG_enumeration_type: add_type = (type_mask & eTypeClassEnumeration) != 0; break; case DW_TAG_subroutine_type: case DW_TAG_subprogram: case DW_TAG_inlined_subroutine: add_type = (type_mask & eTypeClassFunction) != 0; break; case DW_TAG_pointer_type: add_type = (type_mask & eTypeClassPointer) != 0; break; case DW_TAG_rvalue_reference_type: case DW_TAG_reference_type: add_type = (type_mask & eTypeClassReference) != 0; break; case DW_TAG_typedef: add_type = (type_mask & eTypeClassTypedef) != 0; break; case DW_TAG_ptr_to_member_type: add_type = (type_mask & eTypeClassMemberPointer) != 0; break; } if (add_type) { const bool assert_not_being_parsed = true; Type *type = ResolveTypeUID(die, assert_not_being_parsed); if (type) { if (type_set.find(type) == type_set.end()) type_set.insert(type); } } } for (DWARFDIE child_die = die.GetFirstChild(); child_die.IsValid(); child_die = child_die.GetSibling()) { GetTypes(child_die, min_die_offset, max_die_offset, type_mask, type_set); } } } size_t SymbolFileDWARF::GetTypes(SymbolContextScope *sc_scope, uint32_t type_mask, TypeList &type_list) { TypeSet type_set; CompileUnit *comp_unit = NULL; DWARFCompileUnit *dwarf_cu = NULL; if (sc_scope) comp_unit = sc_scope->CalculateSymbolContextCompileUnit(); if (comp_unit) { dwarf_cu = GetDWARFCompileUnit(comp_unit); if (dwarf_cu == 0) return 0; GetTypes(dwarf_cu->DIE(), dwarf_cu->GetOffset(), dwarf_cu->GetNextCompileUnitOffset(), type_mask, type_set); } else { DWARFDebugInfo *info = DebugInfo(); if (info) { const size_t num_cus = info->GetNumCompileUnits(); for (size_t cu_idx = 0; cu_idx < num_cus; ++cu_idx) { dwarf_cu = info->GetCompileUnitAtIndex(cu_idx); if (dwarf_cu) { GetTypes(dwarf_cu->DIE(), 0, UINT32_MAX, type_mask, type_set); } } } } std::set 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 // subroutine, or compile unit. //---------------------------------------------------------------------- DWARFDIE SymbolFileDWARF::GetParentSymbolContextDIE(const DWARFDIE &child_die) { DWARFDIE die; for (die = child_die.GetParent(); die; die = die.GetParent()) { dw_tag_t tag = die.Tag(); switch (tag) { case DW_TAG_compile_unit: case DW_TAG_subprogram: case DW_TAG_inlined_subroutine: case DW_TAG_lexical_block: return die; } } return DWARFDIE(); } SymbolFileDWARF::SymbolFileDWARF(ObjectFile *objfile) : SymbolFile(objfile), UserID(0), // 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(NULL), m_data_debug_abbrev(), m_data_debug_aranges(), m_data_debug_frame(), m_data_debug_info(), m_data_debug_line(), m_data_debug_macro(), m_data_debug_loc(), m_data_debug_ranges(), m_data_debug_str(), m_data_apple_names(), m_data_apple_types(), m_data_apple_namespaces(), m_abbr(), m_info(), m_line(), m_apple_names_ap(), m_apple_types_ap(), m_apple_namespaces_ap(), m_apple_objc_ap(), m_function_basename_index(), m_function_fullname_index(), m_function_method_index(), m_function_selector_index(), m_objc_class_selectors_index(), m_global_index(), m_type_index(), m_namespace_index(), m_indexed(false), m_using_apple_tables(false), m_fetched_external_modules(false), m_supports_DW_AT_APPLE_objc_complete_type(eLazyBoolCalculate), m_ranges(), m_unique_ast_type_map() {} SymbolFileDWARF::~SymbolFileDWARF() {} static const ConstString &GetDWARFMachOSegmentName() { static ConstString g_dwarf_section_name("__DWARF"); return g_dwarf_section_name; } UniqueDWARFASTTypeMap &SymbolFileDWARF::GetUniqueDWARFASTTypeMap() { SymbolFileDWARFDebugMap *debug_map_symfile = GetDebugMapSymfile(); if (debug_map_symfile) return debug_map_symfile->GetUniqueDWARFASTTypeMap(); else 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); } return type_system; } void SymbolFileDWARF::InitializeObject() { ModuleSP module_sp(m_obj_file->GetModule()); if (module_sp) { const SectionList *section_list = module_sp->GetSectionList(); const Section *section = section_list->FindSectionByName(GetDWARFMachOSegmentName()).get(); // Memory map the DWARF mach-o segment so we have everything mmap'ed // to keep our heap memory usage down. if (section) m_obj_file->MemoryMapSectionData(section, m_dwarf_data); } get_apple_names_data(); if (m_data_apple_names.m_data.GetByteSize() > 0) { m_apple_names_ap.reset(new DWARFMappedHash::MemoryTable( m_data_apple_names.m_data, get_debug_str_data(), ".apple_names")); if (m_apple_names_ap->IsValid()) m_using_apple_tables = true; else m_apple_names_ap.reset(); } get_apple_types_data(); if (m_data_apple_types.m_data.GetByteSize() > 0) { m_apple_types_ap.reset(new DWARFMappedHash::MemoryTable( m_data_apple_types.m_data, get_debug_str_data(), ".apple_types")); if (m_apple_types_ap->IsValid()) m_using_apple_tables = true; else m_apple_types_ap.reset(); } get_apple_namespaces_data(); if (m_data_apple_namespaces.m_data.GetByteSize() > 0) { m_apple_namespaces_ap.reset(new DWARFMappedHash::MemoryTable( m_data_apple_namespaces.m_data, get_debug_str_data(), ".apple_namespaces")); if (m_apple_namespaces_ap->IsValid()) m_using_apple_tables = true; else m_apple_namespaces_ap.reset(); } get_apple_objc_data(); if (m_data_apple_objc.m_data.GetByteSize() > 0) { m_apple_objc_ap.reset(new DWARFMappedHash::MemoryTable( m_data_apple_objc.m_data, get_debug_str_data(), ".apple_objc")); if (m_apple_objc_ap->IsValid()) m_using_apple_tables = true; else m_apple_objc_ap.reset(); } } bool SymbolFileDWARF::SupportedVersion(uint16_t version) { return version == 2 || version == 3 || version == 4; } uint32_t SymbolFileDWARF::CalculateAbilities() { uint32_t abilities = 0; if (m_obj_file != NULL) { const Section *section = NULL; const SectionList *section_list = m_obj_file->GetSectionList(); if (section_list == NULL) return 0; uint64_t debug_abbrev_file_size = 0; uint64_t debug_info_file_size = 0; uint64_t debug_line_file_size = 0; section = section_list->FindSectionByName(GetDWARFMachOSegmentName()).get(); if (section) section_list = §ion->GetChildren(); section = section_list->FindSectionByType(eSectionTypeDWARFDebugInfo, true).get(); if (section != NULL) { debug_info_file_size = section->GetFileSize(); section = section_list->FindSectionByType(eSectionTypeDWARFDebugAbbrev, true) .get(); if (section) debug_abbrev_file_size = section->GetFileSize(); section = section_list->FindSectionByType(eSectionTypeDWARFDebugLine, true) .get(); if (section) debug_line_file_size = section->GetFileSize(); } else { const char *symfile_dir_cstr = m_obj_file->GetFileSpec().GetDirectory().GetCString(); if (symfile_dir_cstr) { if (strcasestr(symfile_dir_cstr, ".dsym")) { if (m_obj_file->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 stripped. section = section_list->FindSectionByType(eSectionTypeDWARFDebugStr, true) .get(); if (section && section->GetFileSize() == 1) { m_obj_file->GetModule()->ReportWarning( "empty dSYM file detected, dSYM was created with an " "executable with no debug info."); } } } } } if (debug_abbrev_file_size > 0 && debug_info_file_size > 0) abilities |= CompileUnits | Functions | Blocks | GlobalVariables | LocalVariables | VariableTypes; if (debug_line_file_size > 0) abilities |= LineTables; } return abilities; } const DWARFDataExtractor & SymbolFileDWARF::GetCachedSectionData(lldb::SectionType sect_type, DWARFDataSegment &data_segment) { llvm::call_once(data_segment.m_flag, [this, sect_type, &data_segment] { this->LoadSectionData(sect_type, std::ref(data_segment.m_data)); }); return data_segment.m_data; } void SymbolFileDWARF::LoadSectionData(lldb::SectionType sect_type, DWARFDataExtractor &data) { ModuleSP module_sp(m_obj_file->GetModule()); const SectionList *section_list = module_sp->GetSectionList(); if (section_list) { SectionSP section_sp(section_list->FindSectionByType(sect_type, true)); if (section_sp) { // See if we memory mapped the DWARF segment? if (m_dwarf_data.GetByteSize()) { data.SetData(m_dwarf_data, section_sp->GetOffset(), section_sp->GetFileSize()); } else { if (m_obj_file->ReadSectionData(section_sp.get(), data) == 0) data.Clear(); } } } } const DWARFDataExtractor &SymbolFileDWARF::get_debug_abbrev_data() { return GetCachedSectionData(eSectionTypeDWARFDebugAbbrev, m_data_debug_abbrev); } const DWARFDataExtractor &SymbolFileDWARF::get_debug_addr_data() { return GetCachedSectionData(eSectionTypeDWARFDebugAddr, m_data_debug_addr); } const DWARFDataExtractor &SymbolFileDWARF::get_debug_aranges_data() { return GetCachedSectionData(eSectionTypeDWARFDebugAranges, m_data_debug_aranges); } const DWARFDataExtractor &SymbolFileDWARF::get_debug_frame_data() { return GetCachedSectionData(eSectionTypeDWARFDebugFrame, m_data_debug_frame); } const DWARFDataExtractor &SymbolFileDWARF::get_debug_info_data() { return GetCachedSectionData(eSectionTypeDWARFDebugInfo, m_data_debug_info); } const DWARFDataExtractor &SymbolFileDWARF::get_debug_line_data() { return GetCachedSectionData(eSectionTypeDWARFDebugLine, m_data_debug_line); } const DWARFDataExtractor &SymbolFileDWARF::get_debug_macro_data() { return GetCachedSectionData(eSectionTypeDWARFDebugMacro, m_data_debug_macro); } const DWARFDataExtractor &SymbolFileDWARF::get_debug_loc_data() { return GetCachedSectionData(eSectionTypeDWARFDebugLoc, m_data_debug_loc); } const DWARFDataExtractor &SymbolFileDWARF::get_debug_ranges_data() { return GetCachedSectionData(eSectionTypeDWARFDebugRanges, m_data_debug_ranges); } const DWARFDataExtractor &SymbolFileDWARF::get_debug_str_data() { return GetCachedSectionData(eSectionTypeDWARFDebugStr, m_data_debug_str); } const DWARFDataExtractor &SymbolFileDWARF::get_debug_str_offsets_data() { return GetCachedSectionData(eSectionTypeDWARFDebugStrOffsets, m_data_debug_str_offsets); } const DWARFDataExtractor &SymbolFileDWARF::get_apple_names_data() { return GetCachedSectionData(eSectionTypeDWARFAppleNames, m_data_apple_names); } const DWARFDataExtractor &SymbolFileDWARF::get_apple_types_data() { return GetCachedSectionData(eSectionTypeDWARFAppleTypes, m_data_apple_types); } const DWARFDataExtractor &SymbolFileDWARF::get_apple_namespaces_data() { return GetCachedSectionData(eSectionTypeDWARFAppleNamespaces, m_data_apple_namespaces); } const DWARFDataExtractor &SymbolFileDWARF::get_apple_objc_data() { return GetCachedSectionData(eSectionTypeDWARFAppleObjC, m_data_apple_objc); } DWARFDebugAbbrev *SymbolFileDWARF::DebugAbbrev() { if (m_abbr.get() == NULL) { const DWARFDataExtractor &debug_abbrev_data = get_debug_abbrev_data(); if (debug_abbrev_data.GetByteSize() > 0) { m_abbr.reset(new DWARFDebugAbbrev()); if (m_abbr.get()) m_abbr->Parse(debug_abbrev_data); } } return m_abbr.get(); } const DWARFDebugAbbrev *SymbolFileDWARF::DebugAbbrev() const { return m_abbr.get(); } DWARFDebugInfo *SymbolFileDWARF::DebugInfo() { if (m_info.get() == NULL) { Timer scoped_timer(LLVM_PRETTY_FUNCTION, "%s this = %p", LLVM_PRETTY_FUNCTION, static_cast(this)); if (get_debug_info_data().GetByteSize() > 0) { m_info.reset(new DWARFDebugInfo()); if (m_info.get()) { m_info->SetDwarfData(this); } } } return m_info.get(); } const DWARFDebugInfo *SymbolFileDWARF::DebugInfo() const { return m_info.get(); } DWARFCompileUnit * SymbolFileDWARF::GetDWARFCompileUnit(lldb_private::CompileUnit *comp_unit) { if (!comp_unit) return nullptr; DWARFDebugInfo *info = DebugInfo(); if (info) { // Just a normal DWARF file whose user ID for the compile unit is // the DWARF offset itself DWARFCompileUnit *dwarf_cu = info->GetCompileUnit((dw_offset_t)comp_unit->GetID()); if (dwarf_cu && dwarf_cu->GetUserData() == NULL) dwarf_cu->SetUserData(comp_unit); return dwarf_cu; } return NULL; } DWARFDebugRanges *SymbolFileDWARF::DebugRanges() { if (m_ranges.get() == NULL) { Timer scoped_timer(LLVM_PRETTY_FUNCTION, "%s this = %p", LLVM_PRETTY_FUNCTION, static_cast(this)); if (get_debug_ranges_data().GetByteSize() > 0) { m_ranges.reset(new DWARFDebugRanges()); if (m_ranges.get()) m_ranges->Extract(this); } } return m_ranges.get(); } const DWARFDebugRanges *SymbolFileDWARF::DebugRanges() const { return m_ranges.get(); } lldb::CompUnitSP SymbolFileDWARF::ParseCompileUnit(DWARFCompileUnit *dwarf_cu, uint32_t cu_idx) { CompUnitSP cu_sp; if (dwarf_cu) { CompileUnit *comp_unit = (CompileUnit *)dwarf_cu->GetUserData(); if (comp_unit) { // We already parsed this compile unit, had out a shared pointer to it cu_sp = comp_unit->shared_from_this(); } else { if (dwarf_cu->GetSymbolFileDWARF() != this) { return dwarf_cu->GetSymbolFileDWARF()->ParseCompileUnit(dwarf_cu, cu_idx); } else if (dwarf_cu->GetOffset() == 0 && GetDebugMapSymfile()) { // Let the debug map create the compile unit cu_sp = m_debug_map_symfile->GetCompileUnit(this); dwarf_cu->SetUserData(cu_sp.get()); } else { ModuleSP module_sp(m_obj_file->GetModule()); if (module_sp) { const DWARFDIE cu_die = dwarf_cu->GetCompileUnitDIEOnly(); if (cu_die) { FileSpec cu_file_spec{cu_die.GetName(), false}; if (cu_file_spec) { // If we have a full path to the compile unit, we don't need to // resolve // the file. This can be expensive e.g. when the source files are // NFS mounted. if (cu_file_spec.IsRelative()) { const char *cu_comp_dir{ cu_die.GetAttributeValueAsString(DW_AT_comp_dir, nullptr)}; cu_file_spec.PrependPathComponent(resolveCompDir(cu_comp_dir)); } std::string remapped_file; if (module_sp->RemapSourceFile(cu_file_spec.GetPath(), remapped_file)) cu_file_spec.SetFile(remapped_file, false); } LanguageType cu_language = DWARFCompileUnit::LanguageTypeFromDWARF( cu_die.GetAttributeValueAsUnsigned(DW_AT_language, 0)); bool is_optimized = dwarf_cu->GetIsOptimized(); cu_sp.reset(new CompileUnit( module_sp, dwarf_cu, cu_file_spec, dwarf_cu->GetID(), cu_language, is_optimized ? eLazyBoolYes : eLazyBoolNo)); if (cu_sp) { // If we just created a compile unit with an invalid file spec, // try and get the // first entry in the supports files from the line table as that // should be the // compile unit. if (!cu_file_spec) { cu_file_spec = cu_sp->GetSupportFiles().GetFileSpecAtIndex(1); if (cu_file_spec) { (FileSpec &)(*cu_sp) = cu_file_spec; // Also fix the invalid file spec which was copied from the // compile unit. cu_sp->GetSupportFiles().Replace(0, cu_file_spec); } } dwarf_cu->SetUserData(cu_sp.get()); // Figure out the compile unit index if we weren't given one if (cu_idx == UINT32_MAX) DebugInfo()->GetCompileUnit(dwarf_cu->GetOffset(), &cu_idx); m_obj_file->GetModule()->GetSymbolVendor()->SetCompileUnitAtIndex( cu_idx, cu_sp); } } } } } } return cu_sp; } uint32_t SymbolFileDWARF::GetNumCompileUnits() { DWARFDebugInfo *info = DebugInfo(); if (info) return info->GetNumCompileUnits(); return 0; } CompUnitSP SymbolFileDWARF::ParseCompileUnitAtIndex(uint32_t cu_idx) { CompUnitSP cu_sp; DWARFDebugInfo *info = DebugInfo(); if (info) { DWARFCompileUnit *dwarf_cu = info->GetCompileUnitAtIndex(cu_idx); if (dwarf_cu) cu_sp = ParseCompileUnit(dwarf_cu, cu_idx); } return cu_sp; } Function *SymbolFileDWARF::ParseCompileUnitFunction(const SymbolContext &sc, const DWARFDIE &die) { if (die.IsValid()) { TypeSystem *type_system = GetTypeSystemForLanguage(die.GetCU()->GetLanguageType()); if (type_system) { DWARFASTParser *dwarf_ast = type_system->GetDWARFParser(); if (dwarf_ast) return dwarf_ast->ParseFunctionFromDWARF(sc, die); } } return nullptr; } bool SymbolFileDWARF::FixupAddress(Address &addr) { SymbolFileDWARFDebugMap *debug_map_symfile = GetDebugMapSymfile(); if (debug_map_symfile) { return debug_map_symfile->LinkOSOAddress(addr); } // This is a normal DWARF file, no address fixups need to happen return true; } lldb::LanguageType SymbolFileDWARF::ParseCompileUnitLanguage(const SymbolContext &sc) { assert(sc.comp_unit); DWARFCompileUnit *dwarf_cu = GetDWARFCompileUnit(sc.comp_unit); if (dwarf_cu) return dwarf_cu->GetLanguageType(); else return eLanguageTypeUnknown; } size_t SymbolFileDWARF::ParseCompileUnitFunctions(const SymbolContext &sc) { assert(sc.comp_unit); size_t functions_added = 0; DWARFCompileUnit *dwarf_cu = GetDWARFCompileUnit(sc.comp_unit); if (dwarf_cu) { DWARFDIECollection function_dies; const size_t num_functions = dwarf_cu->AppendDIEsWithTag(DW_TAG_subprogram, function_dies); size_t func_idx; for (func_idx = 0; func_idx < num_functions; ++func_idx) { DWARFDIE die = function_dies.GetDIEAtIndex(func_idx); if (sc.comp_unit->FindFunctionByUID(die.GetID()).get() == NULL) { if (ParseCompileUnitFunction(sc, die)) ++functions_added; } } // FixupTypes(); } return functions_added; } bool SymbolFileDWARF::ParseCompileUnitSupportFiles( const SymbolContext &sc, FileSpecList &support_files) { assert(sc.comp_unit); DWARFCompileUnit *dwarf_cu = GetDWARFCompileUnit(sc.comp_unit); if (dwarf_cu) { const DWARFDIE cu_die = dwarf_cu->GetCompileUnitDIEOnly(); if (cu_die) { const char *cu_comp_dir = resolveCompDir( cu_die.GetAttributeValueAsString(DW_AT_comp_dir, nullptr)); const dw_offset_t stmt_list = cu_die.GetAttributeValueAsUnsigned( DW_AT_stmt_list, DW_INVALID_OFFSET); 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(*sc.comp_unit); return DWARFDebugLine::ParseSupportFiles( sc.comp_unit->GetModule(), get_debug_line_data(), cu_comp_dir, stmt_list, support_files); } } } return false; } bool SymbolFileDWARF::ParseCompileUnitIsOptimized( const lldb_private::SymbolContext &sc) { DWARFCompileUnit *dwarf_cu = GetDWARFCompileUnit(sc.comp_unit); if (dwarf_cu) return dwarf_cu->GetIsOptimized(); return false; } bool SymbolFileDWARF::ParseImportedModules( const lldb_private::SymbolContext &sc, std::vector &imported_modules) { assert(sc.comp_unit); DWARFCompileUnit *dwarf_cu = GetDWARFCompileUnit(sc.comp_unit); if (dwarf_cu) { if (ClangModulesDeclVendor::LanguageSupportsClangModules( sc.comp_unit->GetLanguage())) { UpdateExternalModuleListIfNeeded(); if (sc.comp_unit) { const DWARFDIE die = dwarf_cu->GetCompileUnitDIEOnly(); if (die) { for (DWARFDIE child_die = die.GetFirstChild(); child_die; child_die = child_die.GetSibling()) { if (child_die.Tag() == DW_TAG_imported_declaration) { if (DWARFDIE module_die = child_die.GetReferencedDIE(DW_AT_import)) { if (module_die.Tag() == DW_TAG_module) { if (const char *name = module_die.GetAttributeValueAsString( DW_AT_name, nullptr)) { ConstString const_name(name); imported_modules.push_back(const_name); } } } } } } } else { for (const auto &pair : m_external_type_modules) { imported_modules.push_back(pair.first); } } } } return false; } struct ParseDWARFLineTableCallbackInfo { LineTable *line_table; std::unique_ptr sequence_ap; 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_ap.get()) { info->sequence_ap.reset(line_table->CreateLineSequenceContainer()); assert(info->sequence_ap.get()); } line_table->AppendLineEntryToSequence( info->sequence_ap.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_ap.get()); // Then, empty it to prepare for the next sequence. info->sequence_ap->Clear(); } } } bool SymbolFileDWARF::ParseCompileUnitLineTable(const SymbolContext &sc) { assert(sc.comp_unit); if (sc.comp_unit->GetLineTable() != NULL) return true; DWARFCompileUnit *dwarf_cu = GetDWARFCompileUnit(sc.comp_unit); if (dwarf_cu) { const DWARFDIE dwarf_cu_die = dwarf_cu->GetCompileUnitDIEOnly(); 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 line_table_ap(new LineTable(sc.comp_unit)); if (line_table_ap.get()) { ParseDWARFLineTableCallbackInfo info; info.line_table = line_table_ap.get(); /* * 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. */ ArchSpec arch; GetObjectFile()->GetArchitecture(arch); switch (arch.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; } lldb::offset_t offset = cu_line_offset; DWARFDebugLine::ParseStatementTable(get_debug_line_data(), &offset, ParseDWARFLineTableCallback, &info); 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. sc.comp_unit->SetLineTable( debug_map_symfile->LinkOSOLineTable(this, line_table_ap.get())); } else { sc.comp_unit->SetLineTable(line_table_ap.release()); return true; } } } } } return false; } lldb_private::DebugMacrosSP SymbolFileDWARF::ParseDebugMacros(lldb::offset_t *offset) { auto iter = m_debug_macros_map.find(*offset); if (iter != m_debug_macros_map.end()) return iter->second; const DWARFDataExtractor &debug_macro_data = get_debug_macro_data(); if (debug_macro_data.GetByteSize() == 0) return DebugMacrosSP(); lldb_private::DebugMacrosSP debug_macros_sp(new lldb_private::DebugMacros()); m_debug_macros_map[*offset] = debug_macros_sp; const DWARFDebugMacroHeader &header = DWARFDebugMacroHeader::ParseHeader(debug_macro_data, offset); DWARFDebugMacroEntry::ReadMacroEntries(debug_macro_data, get_debug_str_data(), header.OffsetIs64Bit(), offset, this, debug_macros_sp); return debug_macros_sp; } bool SymbolFileDWARF::ParseCompileUnitDebugMacros(const SymbolContext &sc) { assert(sc.comp_unit); DWARFCompileUnit *dwarf_cu = GetDWARFCompileUnit(sc.comp_unit); if (dwarf_cu == nullptr) return false; const DWARFDIE dwarf_cu_die = dwarf_cu->GetCompileUnitDIEOnly(); if (!dwarf_cu_die) return false; lldb::offset_t sect_offset = dwarf_cu_die.GetAttributeValueAsUnsigned(DW_AT_macros, DW_INVALID_OFFSET); if (sect_offset == DW_INVALID_OFFSET) sect_offset = dwarf_cu_die.GetAttributeValueAsUnsigned(DW_AT_GNU_macros, DW_INVALID_OFFSET); if (sect_offset == DW_INVALID_OFFSET) return false; sc.comp_unit->SetDebugMacros(ParseDebugMacros(§_offset)); return true; } size_t SymbolFileDWARF::ParseFunctionBlocks(const SymbolContext &sc, Block *parent_block, const DWARFDIE &orig_die, addr_t subprogram_low_pc, uint32_t depth) { size_t blocks_added = 0; DWARFDIE die = orig_die; while (die) { dw_tag_t tag = die.Tag(); switch (tag) { case DW_TAG_inlined_subroutine: case DW_TAG_subprogram: case DW_TAG_lexical_block: { Block *block = NULL; if (tag == DW_TAG_subprogram) { // Skip any DW_TAG_subprogram DIEs that are inside // of a normal or inlined functions. These will be // parsed on their own as separate entities. if (depth > 0) break; block = parent_block; } else { BlockSP block_sp(new Block(die.GetID())); parent_block->AddChild(block_sp); block = block_sp.get(); } DWARFRangeList ranges; const char *name = NULL; const char *mangled_name = NULL; int decl_file = 0; int decl_line = 0; int decl_column = 0; int call_file = 0; int call_line = 0; int call_column = 0; if (die.GetDIENamesAndRanges(name, mangled_name, ranges, decl_file, decl_line, decl_column, call_file, call_line, call_column, nullptr)) { if (tag == DW_TAG_subprogram) { assert(subprogram_low_pc == LLDB_INVALID_ADDRESS); subprogram_low_pc = ranges.GetMinRangeBase(0); } else if (tag == DW_TAG_inlined_subroutine) { // We get called here for inlined subroutines in two ways. // The first time is when we are making the Function object // for this inlined concrete instance. Since we're creating a top // level block at // here, the subprogram_low_pc will be LLDB_INVALID_ADDRESS. So we // need to // adjust the containing address. // The second time is when we are parsing the blocks inside the // function that contains // the inlined concrete instance. Since these will be blocks inside // the containing "real" // function the offset will be for that function. if (subprogram_low_pc == LLDB_INVALID_ADDRESS) { subprogram_low_pc = ranges.GetMinRangeBase(0); } } const size_t num_ranges = ranges.GetSize(); for (size_t i = 0; i < num_ranges; ++i) { const DWARFRangeList::Entry &range = ranges.GetEntryRef(i); const addr_t range_base = range.GetRangeBase(); if (range_base >= subprogram_low_pc) block->AddRange(Block::Range(range_base - subprogram_low_pc, range.GetByteSize())); else { GetObjectFile()->GetModule()->ReportError( "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", block->GetID(), range_base, range.GetRangeEnd(), subprogram_low_pc); } } block->FinalizeRanges(); if (tag != DW_TAG_subprogram && (name != NULL || mangled_name != NULL)) { std::unique_ptr decl_ap; if (decl_file != 0 || decl_line != 0 || decl_column != 0) decl_ap.reset(new Declaration( sc.comp_unit->GetSupportFiles().GetFileSpecAtIndex(decl_file), decl_line, decl_column)); std::unique_ptr call_ap; if (call_file != 0 || call_line != 0 || call_column != 0) call_ap.reset(new Declaration( sc.comp_unit->GetSupportFiles().GetFileSpecAtIndex(call_file), call_line, call_column)); block->SetInlinedFunctionInfo(name, mangled_name, decl_ap.get(), call_ap.get()); } ++blocks_added; if (die.HasChildren()) { blocks_added += ParseFunctionBlocks(sc, block, die.GetFirstChild(), subprogram_low_pc, depth + 1); } } } break; default: break; } // Only parse siblings of the block if we are not at depth zero. A depth // of zero indicates we are currently parsing the top level // DW_TAG_subprogram DIE if (depth == 0) die.Clear(); else die = die.GetSibling(); } return blocks_added; } bool SymbolFileDWARF::ClassOrStructIsVirtual(const DWARFDIE &parent_die) { if (parent_die) { for (DWARFDIE die = parent_die.GetFirstChild(); die; die = die.GetSibling()) { dw_tag_t tag = die.Tag(); bool check_virtuality = false; switch (tag) { case DW_TAG_inheritance: case DW_TAG_subprogram: check_virtuality = true; break; default: break; } if (check_virtuality) { if (die.GetAttributeValueAsUnsigned(DW_AT_virtuality, 0) != 0) return true; } } } return false; } void SymbolFileDWARF::ParseDeclsForContext(CompilerDeclContext decl_ctx) { TypeSystem *type_system = decl_ctx.GetTypeSystem(); DWARFASTParser *ast_parser = type_system->GetDWARFParser(); std::vector 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); } SymbolFileDWARF *SymbolFileDWARF::GetDWARFForUID(lldb::user_id_t uid) { // Anytime we get a "lldb::user_id_t" from an lldb_private::SymbolFile API // we must make sure we use the correct DWARF file when resolving things. // On MacOSX, when using SymbolFileDWARFDebugMap, we will use multiple // SymbolFileDWARF classes, one for each .o file. We can often end up // with references to other DWARF objects and we must be ready to receive // a "lldb::user_id_t" that specifies a DIE from another SymbolFileDWARF // instance. SymbolFileDWARFDebugMap *debug_map = GetDebugMapSymfile(); if (debug_map) return debug_map->GetSymbolFileByOSOIndex( debug_map->GetOSOIndexFromUserID(uid)); return this; } DWARFDIE SymbolFileDWARF::GetDIEFromUID(lldb::user_id_t uid) { // Anytime we get a "lldb::user_id_t" from an lldb_private::SymbolFile API // we must make sure we use the correct DWARF file when resolving things. // On MacOSX, when using SymbolFileDWARFDebugMap, we will use multiple // SymbolFileDWARF classes, one for each .o file. We can often end up // with references to other DWARF objects and we must be ready to receive // a "lldb::user_id_t" that specifies a DIE from another SymbolFileDWARF // instance. SymbolFileDWARF *dwarf = GetDWARFForUID(uid); if (dwarf) return dwarf->GetDIE(DIERef(uid, dwarf)); return DWARFDIE(); } CompilerDecl SymbolFileDWARF::GetDeclForUID(lldb::user_id_t type_uid) { // Anytime we have a lldb::user_id_t, we must get the DIE by // calling SymbolFileDWARF::GetDIEFromUID(). See comments inside // the SymbolFileDWARF::GetDIEFromUID() for details. DWARFDIE die = GetDIEFromUID(type_uid); if (die) return die.GetDecl(); return CompilerDecl(); } CompilerDeclContext SymbolFileDWARF::GetDeclContextForUID(lldb::user_id_t type_uid) { // Anytime we have a lldb::user_id_t, we must get the DIE by // calling SymbolFileDWARF::GetDIEFromUID(). See comments inside // the SymbolFileDWARF::GetDIEFromUID() for details. DWARFDIE die = GetDIEFromUID(type_uid); if (die) return die.GetDeclContext(); return CompilerDeclContext(); } CompilerDeclContext SymbolFileDWARF::GetDeclContextContainingUID(lldb::user_id_t type_uid) { // Anytime we have a lldb::user_id_t, we must get the DIE by // calling SymbolFileDWARF::GetDIEFromUID(). See comments inside // the SymbolFileDWARF::GetDIEFromUID() for details. DWARFDIE die = GetDIEFromUID(type_uid); if (die) return die.GetContainingDeclContext(); return CompilerDeclContext(); } Type *SymbolFileDWARF::ResolveTypeUID(lldb::user_id_t type_uid) { // Anytime we have a lldb::user_id_t, we must get the DIE by // calling SymbolFileDWARF::GetDIEFromUID(). See comments inside // the SymbolFileDWARF::GetDIEFromUID() for details. DWARFDIE type_die = GetDIEFromUID(type_uid); if (type_die) return type_die.ResolveType(); else return nullptr; } Type *SymbolFileDWARF::ResolveTypeUID(const DIERef &die_ref) { return ResolveType(GetDIE(die_ref), true); } Type *SymbolFileDWARF::ResolveTypeUID(const DWARFDIE &die, bool assert_not_being_parsed) { if (die) { Log *log(LogChannelDWARF::GetLogIfAll(DWARF_LOG_DEBUG_INFO)); if (log) GetObjectFile()->GetModule()->LogMessage( log, "SymbolFileDWARF::ResolveTypeUID (die = 0x%8.8x) %s '%s'", die.GetOffset(), die.GetTagAsCString(), die.GetName()); // We might be coming in in the middle of a type tree (a class // within a class, an enum within a class), so parse any needed // parent DIEs before we get to this one... DWARFDIE decl_ctx_die = GetDeclContextDIEContainingDIE(die); if (decl_ctx_die) { if (log) { switch (decl_ctx_die.Tag()) { case DW_TAG_structure_type: case DW_TAG_union_type: case DW_TAG_class_type: { // 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", die.GetOffset(), die.GetTagAsCString(), die.GetName(), decl_ctx_die.GetOffset()); } break; default: break; } } } return ResolveType(die); } return NULL; } // This function is used when SymbolFileDWARFDebugMap owns a bunch of // SymbolFileDWARF objects to detect if this DWARF file is the one that // can resolve a compiler_type. bool SymbolFileDWARF::HasForwardDeclForClangType( const CompilerType &compiler_type) { CompilerType compiler_type_no_qualifiers = ClangUtil::RemoveFastQualifiers(compiler_type); if (GetForwardDeclClangTypeToDie().count( compiler_type_no_qualifiers.GetOpaqueQualType())) { return true; } TypeSystem *type_system = compiler_type.GetTypeSystem(); ClangASTContext *clang_type_system = llvm::dyn_cast_or_null(type_system); if (!clang_type_system) return false; DWARFASTParserClang *ast_parser = static_cast(clang_type_system->GetDWARFParser()); return ast_parser->GetClangASTImporter().CanImport(compiler_type); } bool SymbolFileDWARF::CompleteType(CompilerType &compiler_type) { std::lock_guard guard( GetObjectFile()->GetModule()->GetMutex()); ClangASTContext *clang_type_system = llvm::dyn_cast_or_null(compiler_type.GetTypeSystem()); if (clang_type_system) { DWARFASTParserClang *ast_parser = static_cast(clang_type_system->GetDWARFParser()); if (ast_parser && ast_parser->GetClangASTImporter().CanImport(compiler_type)) return ast_parser->GetClangASTImporter().CompleteType(compiler_type); } // We have a struct/union/class/enum that needs to be fully resolved. CompilerType compiler_type_no_qualifiers = ClangUtil::RemoveFastQualifiers(compiler_type); auto die_it = GetForwardDeclClangTypeToDie().find( compiler_type_no_qualifiers.GetOpaqueQualType()); if (die_it == GetForwardDeclClangTypeToDie().end()) { // We have already resolved this type... return true; } DWARFDIE dwarf_die = GetDIE(die_it->getSecond()); if (dwarf_die) { // Once we start resolving this type, remove it from the forward declaration // map in case anyone child members or other types require this type to get // resolved. // The type will get resolved when all of the calls to // SymbolFileDWARF::ResolveClangOpaqueTypeDefinition // are done. GetForwardDeclClangTypeToDie().erase(die_it); Type *type = GetDIEToType().lookup(dwarf_die.GetDIE()); Log *log(LogChannelDWARF::GetLogIfAny(DWARF_LOG_DEBUG_INFO | DWARF_LOG_TYPE_COMPLETION)); if (log) GetObjectFile()->GetModule()->LogMessageVerboseBacktrace( log, "0x%8.8" PRIx64 ": %s '%s' resolving forward declaration...", dwarf_die.GetID(), dwarf_die.GetTagAsCString(), type->GetName().AsCString()); assert(compiler_type); DWARFASTParser *dwarf_ast = dwarf_die.GetDWARFParser(); if (dwarf_ast) return dwarf_ast->CompleteTypeFromDWARF(dwarf_die, type, compiler_type); } return false; } Type *SymbolFileDWARF::ResolveType(const DWARFDIE &die, bool assert_not_being_parsed, bool resolve_function_context) { if (die) { Type *type = GetTypeForDIE(die, resolve_function_context).get(); if (assert_not_being_parsed) { if (type != DIE_IS_BEING_PARSED) return type; GetObjectFile()->GetModule()->ReportError( "Parsing a die that is being parsed die: 0x%8.8x: %s %s", die.GetOffset(), die.GetTagAsCString(), die.GetName()); } else return type; } return nullptr; } CompileUnit * SymbolFileDWARF::GetCompUnitForDWARFCompUnit(DWARFCompileUnit *dwarf_cu, uint32_t cu_idx) { // Check if the symbol vendor already knows about this compile unit? if (dwarf_cu->GetUserData() == NULL) { // The symbol vendor doesn't know about this compile unit, we // need to parse and add it to the symbol vendor object. return ParseCompileUnit(dwarf_cu, cu_idx).get(); } return (CompileUnit *)dwarf_cu->GetUserData(); } size_t SymbolFileDWARF::GetObjCMethodDIEOffsets(ConstString class_name, DIEArray &method_die_offsets) { method_die_offsets.clear(); if (m_using_apple_tables) { if (m_apple_objc_ap.get()) m_apple_objc_ap->FindByName(class_name.GetCString(), method_die_offsets); } else { if (!m_indexed) Index(); m_objc_class_selectors_index.Find(class_name, method_die_offsets); } return method_die_offsets.size(); } bool SymbolFileDWARF::GetFunction(const DWARFDIE &die, SymbolContext &sc) { sc.Clear(false); if (die) { // Check if the symbol vendor already knows about this compile unit? sc.comp_unit = GetCompUnitForDWARFCompUnit(die.GetCU(), UINT32_MAX); sc.function = sc.comp_unit->FindFunctionByUID(die.GetID()).get(); if (sc.function == NULL) sc.function = ParseCompileUnitFunction(sc, die); if (sc.function) { sc.module_sp = sc.function->CalculateSymbolContextModule(); return true; } } return false; } lldb::ModuleSP SymbolFileDWARF::GetDWOModule(ConstString name) { UpdateExternalModuleListIfNeeded(); const auto &pos = m_external_type_modules.find(name); if (pos != m_external_type_modules.end()) return pos->second; else return lldb::ModuleSP(); } DWARFDIE SymbolFileDWARF::GetDIE(const DIERef &die_ref) { DWARFDebugInfo *debug_info = DebugInfo(); if (debug_info) return debug_info->GetDIE(die_ref); else return DWARFDIE(); } std::unique_ptr SymbolFileDWARF::GetDwoSymbolFileForCompileUnit( DWARFCompileUnit &dwarf_cu, const DWARFDebugInfoEntry &cu_die) { // If we are using a dSYM file, we never want the standard DWO files since // the -gmodule support uses the same DWO machanism to specify full debug // info files for modules. if (GetDebugMapSymfile()) return nullptr; const char *dwo_name = cu_die.GetAttributeValueAsString( this, &dwarf_cu, DW_AT_GNU_dwo_name, nullptr); if (!dwo_name) return nullptr; FileSpec dwo_file(dwo_name, true); if (dwo_file.IsRelative()) { const char *comp_dir = cu_die.GetAttributeValueAsString( this, &dwarf_cu, DW_AT_comp_dir, nullptr); if (!comp_dir) return nullptr; dwo_file.SetFile(comp_dir, true); dwo_file.AppendPathComponent(dwo_name); } if (!dwo_file.Exists()) return nullptr; const lldb::offset_t file_offset = 0; DataBufferSP dwo_file_data_sp; lldb::offset_t dwo_file_data_offset = 0; ObjectFileSP dwo_obj_file = ObjectFile::FindPlugin( GetObjectFile()->GetModule(), &dwo_file, file_offset, dwo_file.GetByteSize(), dwo_file_data_sp, dwo_file_data_offset); if (dwo_obj_file == nullptr) return nullptr; return llvm::make_unique(dwo_obj_file, &dwarf_cu); } void SymbolFileDWARF::UpdateExternalModuleListIfNeeded() { if (m_fetched_external_modules) return; m_fetched_external_modules = true; DWARFDebugInfo *debug_info = DebugInfo(); const uint32_t num_compile_units = GetNumCompileUnits(); for (uint32_t cu_idx = 0; cu_idx < num_compile_units; ++cu_idx) { DWARFCompileUnit *dwarf_cu = debug_info->GetCompileUnitAtIndex(cu_idx); const DWARFDIE die = dwarf_cu->GetCompileUnitDIEOnly(); if (die && die.HasChildren() == false) { const char *name = die.GetAttributeValueAsString(DW_AT_name, nullptr); 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, false); 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, true); dwo_module_spec.GetFileSpec().AppendPathComponent(dwo_path); } } dwo_module_spec.GetArchitecture() = m_obj_file->GetModule()->GetArchitecture(); // printf ("Loading dwo = '%s'\n", dwo_path); Error error = ModuleList::GetSharedModule( dwo_module_spec, module_sp, NULL, NULL, NULL); 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; } } } } } SymbolFileDWARF::GlobalVariableMap &SymbolFileDWARF::GetGlobalAranges() { if (!m_global_aranges_ap) { m_global_aranges_ap.reset(new GlobalVariableMap()); ModuleSP module_sp = GetObjectFile()->GetModule(); if (module_sp) { const size_t num_cus = module_sp->GetNumCompileUnits(); for (size_t i = 0; i < num_cus; ++i) { CompUnitSP cu_sp = module_sp->GetCompileUnitAtIndex(i); if (cu_sp) { VariableListSP globals_sp = cu_sp->GetVariableList(true); if (globals_sp) { const size_t num_globals = globals_sp->GetSize(); for (size_t g = 0; g < num_globals; ++g) { VariableSP var_sp = globals_sp->GetVariableAtIndex(g); if (var_sp && !var_sp->GetLocationIsConstantValueData()) { const DWARFExpression &location = var_sp->LocationExpression(); Value location_result; Error error; if (location.Evaluate(nullptr, nullptr, nullptr, LLDB_INVALID_ADDRESS, nullptr, nullptr, location_result, &error)) { if (location_result.GetValueType() == Value::eValueTypeFileAddress) { lldb::addr_t file_addr = location_result.GetScalar().ULongLong(); lldb::addr_t byte_size = 1; if (var_sp->GetType()) byte_size = var_sp->GetType()->GetByteSize(); m_global_aranges_ap->Append(GlobalVariableMap::Entry( file_addr, byte_size, var_sp.get())); } } } } } } } } m_global_aranges_ap->Sort(); } return *m_global_aranges_ap; } uint32_t SymbolFileDWARF::ResolveSymbolContext(const Address &so_addr, uint32_t resolve_scope, SymbolContext &sc) { Timer scoped_timer(LLVM_PRETTY_FUNCTION, "SymbolFileDWARF::" "ResolveSymbolContext (so_addr = { " "section = %p, offset = 0x%" PRIx64 " }, resolve_scope = 0x%8.8x)", static_cast(so_addr.GetSection().get()), so_addr.GetOffset(), resolve_scope); uint32_t resolved = 0; if (resolve_scope & (eSymbolContextCompUnit | eSymbolContextFunction | eSymbolContextBlock | eSymbolContextLineEntry | eSymbolContextVariable)) { lldb::addr_t file_vm_addr = so_addr.GetFileAddress(); DWARFDebugInfo *debug_info = DebugInfo(); if (debug_info) { const dw_offset_t cu_offset = debug_info->GetCompileUnitAranges().FindAddress(file_vm_addr); if (cu_offset == DW_INVALID_OFFSET) { // Global variables are not in the compile unit address ranges. The only // way to // currently find global variables is to iterate over the // .debug_pubnames or the // __apple_names table and find all items in there that point to // DW_TAG_variable // DIEs and then find the address that matches. if (resolve_scope & eSymbolContextVariable) { GlobalVariableMap &map = GetGlobalAranges(); const GlobalVariableMap::Entry *entry = map.FindEntryThatContains(file_vm_addr); if (entry && entry->data) { Variable *variable = entry->data; SymbolContextScope *scc = variable->GetSymbolContextScope(); if (scc) { scc->CalculateSymbolContext(&sc); sc.variable = variable; } return sc.GetResolvedMask(); } } } else { uint32_t cu_idx = DW_INVALID_INDEX; DWARFCompileUnit *dwarf_cu = debug_info->GetCompileUnit(cu_offset, &cu_idx); if (dwarf_cu) { sc.comp_unit = GetCompUnitForDWARFCompUnit(dwarf_cu, cu_idx); if (sc.comp_unit) { resolved |= eSymbolContextCompUnit; bool force_check_line_table = false; if (resolve_scope & (eSymbolContextFunction | eSymbolContextBlock)) { DWARFDIE function_die = dwarf_cu->LookupAddress(file_vm_addr); DWARFDIE block_die; if (function_die) { sc.function = sc.comp_unit->FindFunctionByUID(function_die.GetID()).get(); if (sc.function == NULL) sc.function = ParseCompileUnitFunction(sc, function_die); if (sc.function && (resolve_scope & eSymbolContextBlock)) block_die = function_die.LookupDeepestBlock(file_vm_addr); } else { // We might have had a compile unit that had discontiguous // address ranges where the gaps are symbols that don't have // any debug info. Discontiguous compile unit address ranges // should only happen when there aren't other functions from // other compile units in these gaps. This helps keep the size // of the aranges down. force_check_line_table = true; } if (sc.function != NULL) { resolved |= eSymbolContextFunction; if (resolve_scope & eSymbolContextBlock) { Block &block = sc.function->GetBlock(true); if (block_die) sc.block = block.FindBlockByID(block_die.GetID()); else sc.block = block.FindBlockByID(function_die.GetID()); if (sc.block) resolved |= eSymbolContextBlock; } } } if ((resolve_scope & eSymbolContextLineEntry) || force_check_line_table) { LineTable *line_table = sc.comp_unit->GetLineTable(); if (line_table != NULL) { // And address that makes it into this function should be in // terms // of this debug file if there is no debug map, or it will be an // address in the .o file which needs to be fixed up to be in // terms // of the debug map executable. Either way, calling // FixupAddress() // will work for us. Address exe_so_addr(so_addr); if (FixupAddress(exe_so_addr)) { if (line_table->FindLineEntryByAddress(exe_so_addr, sc.line_entry)) { resolved |= eSymbolContextLineEntry; } } } } if (force_check_line_table && !(resolved & eSymbolContextLineEntry)) { // We might have had a compile unit that had discontiguous // address ranges where the gaps are symbols that don't have // any debug info. Discontiguous compile unit address ranges // should only happen when there aren't other functions from // other compile units in these gaps. This helps keep the size // of the aranges down. sc.comp_unit = NULL; resolved &= ~eSymbolContextCompUnit; } } else { GetObjectFile()->GetModule()->ReportWarning( "0x%8.8x: compile unit %u failed to create a valid " "lldb_private::CompileUnit class.", cu_offset, cu_idx); } } } } } return resolved; } uint32_t SymbolFileDWARF::ResolveSymbolContext(const FileSpec &file_spec, uint32_t line, bool check_inlines, uint32_t resolve_scope, SymbolContextList &sc_list) { const uint32_t prev_size = sc_list.GetSize(); if (resolve_scope & eSymbolContextCompUnit) { DWARFDebugInfo *debug_info = DebugInfo(); if (debug_info) { uint32_t cu_idx; DWARFCompileUnit *dwarf_cu = NULL; for (cu_idx = 0; (dwarf_cu = debug_info->GetCompileUnitAtIndex(cu_idx)) != NULL; ++cu_idx) { CompileUnit *dc_cu = GetCompUnitForDWARFCompUnit(dwarf_cu, cu_idx); const bool full_match = (bool)file_spec.GetDirectory(); bool file_spec_matches_cu_file_spec = dc_cu != NULL && FileSpec::Equal(file_spec, *dc_cu, full_match); if (check_inlines || file_spec_matches_cu_file_spec) { SymbolContext sc(m_obj_file->GetModule()); sc.comp_unit = GetCompUnitForDWARFCompUnit(dwarf_cu, cu_idx); if (sc.comp_unit) { uint32_t file_idx = UINT32_MAX; // If we are looking for inline functions only and we don't // find it in the support files, we are done. if (check_inlines) { file_idx = sc.comp_unit->GetSupportFiles().FindFileIndex( 1, file_spec, true); if (file_idx == UINT32_MAX) continue; } if (line != 0) { LineTable *line_table = sc.comp_unit->GetLineTable(); if (line_table != NULL && line != 0) { // We will have already looked up the file index if // we are searching for inline entries. if (!check_inlines) file_idx = sc.comp_unit->GetSupportFiles().FindFileIndex( 1, file_spec, true); if (file_idx != UINT32_MAX) { uint32_t found_line; uint32_t line_idx = line_table->FindLineEntryIndexByFileIndex( 0, file_idx, line, false, &sc.line_entry); found_line = sc.line_entry.line; while (line_idx != UINT32_MAX) { sc.function = NULL; sc.block = NULL; if (resolve_scope & (eSymbolContextFunction | eSymbolContextBlock)) { const lldb::addr_t file_vm_addr = sc.line_entry.range.GetBaseAddress().GetFileAddress(); if (file_vm_addr != LLDB_INVALID_ADDRESS) { DWARFDIE function_die = dwarf_cu->LookupAddress(file_vm_addr); DWARFDIE block_die; if (function_die) { sc.function = sc.comp_unit ->FindFunctionByUID(function_die.GetID()) .get(); if (sc.function == NULL) sc.function = ParseCompileUnitFunction(sc, function_die); if (sc.function && (resolve_scope & eSymbolContextBlock)) block_die = function_die.LookupDeepestBlock(file_vm_addr); } if (sc.function != NULL) { Block &block = sc.function->GetBlock(true); if (block_die) sc.block = block.FindBlockByID(block_die.GetID()); else if (function_die) sc.block = block.FindBlockByID(function_die.GetID()); } } } sc_list.Append(sc); line_idx = line_table->FindLineEntryIndexByFileIndex( line_idx + 1, file_idx, found_line, true, &sc.line_entry); } } } 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); } } 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); } if (!check_inlines) break; } } } } } return sc_list.GetSize() - prev_size; } +void SymbolFileDWARF::PreloadSymbols() { + std::lock_guard guard( + GetObjectFile()->GetModule()->GetMutex()); + Index(); +} + void SymbolFileDWARF::Index() { if (m_indexed) return; m_indexed = true; Timer scoped_timer( LLVM_PRETTY_FUNCTION, "SymbolFileDWARF::Index (%s)", GetObjectFile()->GetFileSpec().GetFilename().AsCString("")); DWARFDebugInfo *debug_info = DebugInfo(); if (debug_info) { const uint32_t num_compile_units = GetNumCompileUnits(); if (num_compile_units == 0) return; std::vector function_basename_index(num_compile_units); std::vector function_fullname_index(num_compile_units); std::vector function_method_index(num_compile_units); std::vector function_selector_index(num_compile_units); std::vector objc_class_selectors_index(num_compile_units); std::vector global_index(num_compile_units); std::vector type_index(num_compile_units); std::vector namespace_index(num_compile_units); std::vector clear_cu_dies(num_compile_units, false); auto parser_fn = [debug_info, &function_basename_index, &function_fullname_index, &function_method_index, &function_selector_index, &objc_class_selectors_index, &global_index, &type_index, &namespace_index](uint32_t cu_idx) { DWARFCompileUnit *dwarf_cu = debug_info->GetCompileUnitAtIndex(cu_idx); if (dwarf_cu) { dwarf_cu->Index( function_basename_index[cu_idx], function_fullname_index[cu_idx], function_method_index[cu_idx], function_selector_index[cu_idx], objc_class_selectors_index[cu_idx], global_index[cu_idx], type_index[cu_idx], namespace_index[cu_idx]); } return cu_idx; }; auto extract_fn = [debug_info](uint32_t cu_idx) { DWARFCompileUnit *dwarf_cu = debug_info->GetCompileUnitAtIndex(cu_idx); if (dwarf_cu) { // dwarf_cu->ExtractDIEsIfNeeded(false) will return zero if the // DIEs for a compile unit have already been parsed. return std::make_pair(cu_idx, dwarf_cu->ExtractDIEsIfNeeded(false) > 1); } return std::make_pair(cu_idx, false); }; // Create a task runner that extracts dies for each DWARF compile unit in a // separate thread TaskRunner> task_runner_extract; for (uint32_t cu_idx = 0; cu_idx < num_compile_units; ++cu_idx) task_runner_extract.AddTask(extract_fn, cu_idx); //---------------------------------------------------------------------- // First figure out which compile units didn't have their DIEs already // parsed and remember this. If no DIEs were parsed prior to this index // function call, we are going to want to clear the CU dies after we // are done indexing to make sure we don't pull in all DWARF dies, but // we need to wait until all compile units have been indexed in case // a DIE in one compile unit refers to another and the indexes accesses // those DIEs. //---------------------------------------------------------------------- while (true) { auto f = task_runner_extract.WaitForNextCompletedTask(); if (!f.valid()) break; unsigned cu_idx; bool clear; std::tie(cu_idx, clear) = f.get(); clear_cu_dies[cu_idx] = clear; } // Now create a task runner that can index each DWARF compile unit in a // separate // thread so we can index quickly. TaskRunner task_runner; for (uint32_t cu_idx = 0; cu_idx < num_compile_units; ++cu_idx) task_runner.AddTask(parser_fn, cu_idx); while (true) { std::future f = task_runner.WaitForNextCompletedTask(); if (!f.valid()) break; uint32_t cu_idx = f.get(); m_function_basename_index.Append(function_basename_index[cu_idx]); m_function_fullname_index.Append(function_fullname_index[cu_idx]); m_function_method_index.Append(function_method_index[cu_idx]); m_function_selector_index.Append(function_selector_index[cu_idx]); m_objc_class_selectors_index.Append(objc_class_selectors_index[cu_idx]); m_global_index.Append(global_index[cu_idx]); m_type_index.Append(type_index[cu_idx]); m_namespace_index.Append(namespace_index[cu_idx]); } TaskPool::RunTasks([&]() { m_function_basename_index.Finalize(); }, [&]() { m_function_fullname_index.Finalize(); }, [&]() { m_function_method_index.Finalize(); }, [&]() { m_function_selector_index.Finalize(); }, [&]() { m_objc_class_selectors_index.Finalize(); }, [&]() { m_global_index.Finalize(); }, [&]() { m_type_index.Finalize(); }, [&]() { m_namespace_index.Finalize(); }); //---------------------------------------------------------------------- // Keep memory down by clearing DIEs for any compile units if indexing // caused us to load the compile unit's DIEs. //---------------------------------------------------------------------- for (uint32_t cu_idx = 0; cu_idx < num_compile_units; ++cu_idx) { if (clear_cu_dies[cu_idx]) debug_info->GetCompileUnitAtIndex(cu_idx)->ClearDIEs(true); } #if defined(ENABLE_DEBUG_PRINTF) StreamFile s(stdout, false); s.Printf("DWARF index for '%s':", GetObjectFile()->GetFileSpec().GetPath().c_str()); s.Printf("\nFunction basenames:\n"); m_function_basename_index.Dump(&s); s.Printf("\nFunction fullnames:\n"); m_function_fullname_index.Dump(&s); s.Printf("\nFunction methods:\n"); m_function_method_index.Dump(&s); s.Printf("\nFunction selectors:\n"); m_function_selector_index.Dump(&s); s.Printf("\nObjective C class selectors:\n"); m_objc_class_selectors_index.Dump(&s); s.Printf("\nGlobals and statics:\n"); m_global_index.Dump(&s); s.Printf("\nTypes:\n"); m_type_index.Dump(&s); s.Printf("\nNamespaces:\n"); m_namespace_index.Dump(&s); #endif } } bool SymbolFileDWARF::DeclContextMatchesThisSymbolFile( const lldb_private::CompilerDeclContext *decl_ctx) { if (decl_ctx == nullptr || !decl_ctx->IsValid()) { // Invalid namespace decl which means we aren't matching only things // in this symbol file, so return true to indicate it matches this // symbol file. return true; } TypeSystem *decl_ctx_type_system = decl_ctx->GetTypeSystem(); TypeSystem *type_system = GetTypeSystemForLanguage( decl_ctx_type_system->GetMinimumLanguage(nullptr)); if (decl_ctx_type_system == type_system) return true; // The type systems match, return true // The namespace AST was valid, and it does not match... Log *log(LogChannelDWARF::GetLogIfAll(DWARF_LOG_LOOKUPS)); if (log) GetObjectFile()->GetModule()->LogMessage( log, "Valid namespace does not match symbol file"); return false; } uint32_t SymbolFileDWARF::FindGlobalVariables( const ConstString &name, const CompilerDeclContext *parent_decl_ctx, bool append, uint32_t max_matches, VariableList &variables) { Log *log(LogChannelDWARF::GetLogIfAll(DWARF_LOG_LOOKUPS)); if (log) GetObjectFile()->GetModule()->LogMessage( log, "SymbolFileDWARF::FindGlobalVariables (name=\"%s\", " "parent_decl_ctx=%p, append=%u, max_matches=%u, variables)", name.GetCString(), static_cast(parent_decl_ctx), append, max_matches); if (!DeclContextMatchesThisSymbolFile(parent_decl_ctx)) return 0; DWARFDebugInfo *info = DebugInfo(); if (info == NULL) return 0; // If we aren't appending the results to this list, then clear the list if (!append) variables.Clear(); // Remember how many variables are in the list before we search in case // we are appending the results to a variable list. const uint32_t original_size = variables.GetSize(); DIEArray die_offsets; if (m_using_apple_tables) { if (m_apple_names_ap.get()) { const char *name_cstr = name.GetCString(); llvm::StringRef basename; llvm::StringRef context; if (!CPlusPlusLanguage::ExtractContextAndIdentifier(name_cstr, context, basename)) basename = name_cstr; m_apple_names_ap->FindByName(basename.data(), die_offsets); } } else { // Index the DWARF if we haven't already if (!m_indexed) Index(); m_global_index.Find(name, die_offsets); } const size_t num_die_matches = die_offsets.size(); if (num_die_matches) { SymbolContext sc; sc.module_sp = m_obj_file->GetModule(); assert(sc.module_sp); bool done = false; for (size_t i = 0; i < num_die_matches && !done; ++i) { const DIERef &die_ref = die_offsets[i]; DWARFDIE die = GetDIE(die_ref); if (die) { switch (die.Tag()) { default: case DW_TAG_subprogram: case DW_TAG_inlined_subroutine: case DW_TAG_try_block: case DW_TAG_catch_block: break; case DW_TAG_variable: { sc.comp_unit = GetCompUnitForDWARFCompUnit(die.GetCU(), UINT32_MAX); if (parent_decl_ctx) { DWARFASTParser *dwarf_ast = die.GetDWARFParser(); if (dwarf_ast) { CompilerDeclContext actual_parent_decl_ctx = dwarf_ast->GetDeclContextContainingUIDFromDWARF(die); if (!actual_parent_decl_ctx || actual_parent_decl_ctx != *parent_decl_ctx) continue; } } ParseVariables(sc, die, LLDB_INVALID_ADDRESS, false, false, &variables); if (variables.GetSize() - original_size >= max_matches) done = true; } break; } } else { if (m_using_apple_tables) { GetObjectFile()->GetModule()->ReportErrorIfModifyDetected( "the DWARF debug information has been modified (.apple_names " "accelerator table had bad die 0x%8.8x for '%s')\n", die_ref.die_offset, name.GetCString()); } } } } // Return the number of variable that were appended to the list const uint32_t num_matches = variables.GetSize() - original_size; if (log && num_matches > 0) { GetObjectFile()->GetModule()->LogMessage( log, "SymbolFileDWARF::FindGlobalVariables (name=\"%s\", " "parent_decl_ctx=%p, append=%u, max_matches=%u, variables) => %u", name.GetCString(), static_cast(parent_decl_ctx), append, max_matches, num_matches); } return num_matches; } uint32_t SymbolFileDWARF::FindGlobalVariables(const RegularExpression ®ex, bool append, uint32_t max_matches, VariableList &variables) { Log *log(LogChannelDWARF::GetLogIfAll(DWARF_LOG_LOOKUPS)); if (log) { GetObjectFile()->GetModule()->LogMessage( log, "SymbolFileDWARF::FindGlobalVariables (regex=\"%s\", append=%u, " "max_matches=%u, variables)", regex.GetText().str().c_str(), append, max_matches); } DWARFDebugInfo *info = DebugInfo(); if (info == NULL) return 0; // If we aren't appending the results to this list, then clear the list if (!append) variables.Clear(); // Remember how many variables are in the list before we search in case // we are appending the results to a variable list. const uint32_t original_size = variables.GetSize(); DIEArray die_offsets; if (m_using_apple_tables) { if (m_apple_names_ap.get()) { DWARFMappedHash::DIEInfoArray hash_data_array; if (m_apple_names_ap->AppendAllDIEsThatMatchingRegex(regex, hash_data_array)) DWARFMappedHash::ExtractDIEArray(hash_data_array, die_offsets); } } else { // Index the DWARF if we haven't already if (!m_indexed) Index(); m_global_index.Find(regex, die_offsets); } SymbolContext sc; sc.module_sp = m_obj_file->GetModule(); assert(sc.module_sp); const size_t num_matches = die_offsets.size(); if (num_matches) { for (size_t i = 0; i < num_matches; ++i) { const DIERef &die_ref = die_offsets[i]; DWARFDIE die = GetDIE(die_ref); if (die) { sc.comp_unit = GetCompUnitForDWARFCompUnit(die.GetCU(), UINT32_MAX); ParseVariables(sc, die, LLDB_INVALID_ADDRESS, false, false, &variables); if (variables.GetSize() - original_size >= max_matches) break; } else { if (m_using_apple_tables) { GetObjectFile()->GetModule()->ReportErrorIfModifyDetected( "the DWARF debug information has been modified (.apple_names " "accelerator table had bad die 0x%8.8x for regex '%s')\n", die_ref.die_offset, regex.GetText().str().c_str()); } } } } // Return the number of variable that were appended to the list return variables.GetSize() - original_size; } bool SymbolFileDWARF::ResolveFunction(const DIERef &die_ref, bool include_inlines, SymbolContextList &sc_list) { DWARFDIE die = DebugInfo()->GetDIE(die_ref); return ResolveFunction(die, include_inlines, sc_list); } bool SymbolFileDWARF::ResolveFunction(const DWARFDIE &orig_die, bool include_inlines, SymbolContextList &sc_list) { SymbolContext sc; if (!orig_die) return false; // If we were passed a die that is not a function, just return false... if (!(orig_die.Tag() == DW_TAG_subprogram || (include_inlines && orig_die.Tag() == DW_TAG_inlined_subroutine))) return false; DWARFDIE die = orig_die; DWARFDIE inlined_die; if (die.Tag() == DW_TAG_inlined_subroutine) { inlined_die = die; while (1) { die = die.GetParent(); if (die) { if (die.Tag() == DW_TAG_subprogram) break; } else break; } } assert(die && die.Tag() == DW_TAG_subprogram); if (GetFunction(die, sc)) { Address addr; // Parse all blocks if needed if (inlined_die) { Block &function_block = sc.function->GetBlock(true); sc.block = function_block.FindBlockByID(inlined_die.GetID()); if (sc.block == NULL) sc.block = function_block.FindBlockByID(inlined_die.GetOffset()); if (sc.block == NULL || sc.block->GetStartAddress(addr) == false) addr.Clear(); } else { sc.block = NULL; addr = sc.function->GetAddressRange().GetBaseAddress(); } if (addr.IsValid()) { sc_list.Append(sc); return true; } } return false; } void SymbolFileDWARF::FindFunctions(const ConstString &name, const NameToDIE &name_to_die, bool include_inlines, SymbolContextList &sc_list) { DIEArray die_offsets; if (name_to_die.Find(name, die_offsets)) { ParseFunctions(die_offsets, include_inlines, sc_list); } } void SymbolFileDWARF::FindFunctions(const RegularExpression ®ex, const NameToDIE &name_to_die, bool include_inlines, SymbolContextList &sc_list) { DIEArray die_offsets; if (name_to_die.Find(regex, die_offsets)) { ParseFunctions(die_offsets, include_inlines, sc_list); } } void SymbolFileDWARF::FindFunctions( const RegularExpression ®ex, const DWARFMappedHash::MemoryTable &memory_table, bool include_inlines, SymbolContextList &sc_list) { DIEArray die_offsets; DWARFMappedHash::DIEInfoArray hash_data_array; if (memory_table.AppendAllDIEsThatMatchingRegex(regex, hash_data_array)) { DWARFMappedHash::ExtractDIEArray(hash_data_array, die_offsets); ParseFunctions(die_offsets, include_inlines, sc_list); } } void SymbolFileDWARF::ParseFunctions(const DIEArray &die_offsets, bool include_inlines, SymbolContextList &sc_list) { const size_t num_matches = die_offsets.size(); if (num_matches) { for (size_t i = 0; i < num_matches; ++i) ResolveFunction(die_offsets[i], include_inlines, sc_list); } } bool SymbolFileDWARF::DIEInDeclContext(const CompilerDeclContext *decl_ctx, const DWARFDIE &die) { // If we have no parent decl context to match this DIE matches, and if the // parent // decl context isn't valid, we aren't trying to look for any particular decl // context so any die matches. if (decl_ctx == nullptr || !decl_ctx->IsValid()) return true; if (die) { DWARFASTParser *dwarf_ast = die.GetDWARFParser(); if (dwarf_ast) { CompilerDeclContext actual_decl_ctx = dwarf_ast->GetDeclContextContainingUIDFromDWARF(die); if (actual_decl_ctx) return actual_decl_ctx == *decl_ctx; } } return false; } uint32_t SymbolFileDWARF::FindFunctions(const ConstString &name, const CompilerDeclContext *parent_decl_ctx, uint32_t name_type_mask, bool include_inlines, bool append, SymbolContextList &sc_list) { Timer scoped_timer(LLVM_PRETTY_FUNCTION, "SymbolFileDWARF::FindFunctions (name = '%s')", name.AsCString()); // eFunctionNameTypeAuto should be pre-resolved by a call to // Module::LookupInfo::LookupInfo() assert((name_type_mask & eFunctionNameTypeAuto) == 0); Log *log(LogChannelDWARF::GetLogIfAll(DWARF_LOG_LOOKUPS)); 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); } // 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; // If name is empty then we won't find anything. if (name.IsEmpty()) 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. const char *name_cstr = name.GetCString(); const uint32_t original_size = sc_list.GetSize(); DWARFDebugInfo *info = DebugInfo(); if (info == NULL) return 0; std::set resolved_dies; if (m_using_apple_tables) { if (m_apple_names_ap.get()) { DIEArray die_offsets; uint32_t num_matches = 0; if (name_type_mask & eFunctionNameTypeFull) { // If they asked for the full name, match what they typed. At some // point we may // want to canonicalize this (strip double spaces, etc. For now, we // just add all the // dies that we find by exact match. num_matches = m_apple_names_ap->FindByName(name_cstr, die_offsets); for (uint32_t i = 0; i < num_matches; i++) { const DIERef &die_ref = die_offsets[i]; DWARFDIE die = info->GetDIE(die_ref); if (die) { if (!DIEInDeclContext(parent_decl_ctx, die)) continue; // The containing decl contexts don't match if (resolved_dies.find(die.GetDIE()) == resolved_dies.end()) { if (ResolveFunction(die, include_inlines, sc_list)) resolved_dies.insert(die.GetDIE()); } } else { GetObjectFile()->GetModule()->ReportErrorIfModifyDetected( "the DWARF debug information has been modified (.apple_names " "accelerator table had bad die 0x%8.8x for '%s')", die_ref.die_offset, name_cstr); } } } if (name_type_mask & eFunctionNameTypeSelector) { if (parent_decl_ctx && parent_decl_ctx->IsValid()) return 0; // no selectors in namespaces num_matches = m_apple_names_ap->FindByName(name_cstr, die_offsets); // Now make sure these are actually ObjC methods. In this case we can // simply look up the name, // and if it is an ObjC method name, we're good. for (uint32_t i = 0; i < num_matches; i++) { const DIERef &die_ref = die_offsets[i]; DWARFDIE die = info->GetDIE(die_ref); if (die) { const char *die_name = die.GetName(); if (ObjCLanguage::IsPossibleObjCMethodName(die_name)) { if (resolved_dies.find(die.GetDIE()) == resolved_dies.end()) { if (ResolveFunction(die, include_inlines, sc_list)) resolved_dies.insert(die.GetDIE()); } } } else { GetObjectFile()->GetModule()->ReportError( "the DWARF debug information has been modified (.apple_names " "accelerator table had bad die 0x%8.8x for '%s')", die_ref.die_offset, name_cstr); } } die_offsets.clear(); } if (((name_type_mask & eFunctionNameTypeMethod) && !parent_decl_ctx) || name_type_mask & eFunctionNameTypeBase) { // The apple_names table stores just the "base name" of C++ methods in // the table. So we have to // extract the base name, look that up, and if there is any other // information in the name we were // passed in we have to post-filter based on that. // FIXME: Arrange the logic above so that we don't calculate the base // name twice: num_matches = m_apple_names_ap->FindByName(name_cstr, die_offsets); for (uint32_t i = 0; i < num_matches; i++) { const DIERef &die_ref = die_offsets[i]; DWARFDIE die = info->GetDIE(die_ref); if (die) { if (!DIEInDeclContext(parent_decl_ctx, die)) continue; // The containing decl contexts don't match // If we get to here, the die is good, and we should add it: if (resolved_dies.find(die.GetDIE()) == resolved_dies.end() && ResolveFunction(die, include_inlines, sc_list)) { bool keep_die = true; if ((name_type_mask & (eFunctionNameTypeBase | eFunctionNameTypeMethod)) != (eFunctionNameTypeBase | eFunctionNameTypeMethod)) { // We are looking for either basenames or methods, so we need to // trim out the ones we won't want by looking at the type SymbolContext sc; if (sc_list.GetLastContext(sc)) { if (sc.block) { // We have an inlined function } else if (sc.function) { Type *type = sc.function->GetType(); if (type) { CompilerDeclContext decl_ctx = GetDeclContextContainingUID(type->GetID()); if (decl_ctx.IsStructUnionOrClass()) { if (name_type_mask & eFunctionNameTypeBase) { sc_list.RemoveContextAtIndex(sc_list.GetSize() - 1); keep_die = false; } } else { if (name_type_mask & eFunctionNameTypeMethod) { sc_list.RemoveContextAtIndex(sc_list.GetSize() - 1); keep_die = false; } } } else { GetObjectFile()->GetModule()->ReportWarning( "function at die offset 0x%8.8x had no function type", die_ref.die_offset); } } } } if (keep_die) resolved_dies.insert(die.GetDIE()); } } else { GetObjectFile()->GetModule()->ReportErrorIfModifyDetected( "the DWARF debug information has been modified (.apple_names " "accelerator table had bad die 0x%8.8x for '%s')", die_ref.die_offset, name_cstr); } } die_offsets.clear(); } } } else { // Index the DWARF if we haven't already if (!m_indexed) Index(); if (name_type_mask & eFunctionNameTypeFull) { FindFunctions(name, m_function_fullname_index, include_inlines, sc_list); // FIXME Temporary workaround for global/anonymous namespace // functions debugging FreeBSD and Linux binaries. // If we didn't find any functions in the global namespace try // looking in the basename index but ignore any returned // functions that have a namespace but keep functions which // have an anonymous namespace // TODO: The arch in the object file isn't correct for MSVC // binaries on windows, we should find a way to make it // correct and handle those symbols as well. if (sc_list.GetSize() == original_size) { ArchSpec arch; if (!parent_decl_ctx && GetObjectFile()->GetArchitecture(arch) && arch.GetTriple().isOSBinFormatELF()) { SymbolContextList temp_sc_list; FindFunctions(name, m_function_basename_index, include_inlines, temp_sc_list); SymbolContext sc; for (uint32_t i = 0; i < temp_sc_list.GetSize(); i++) { if (temp_sc_list.GetContextAtIndex(i, sc)) { ConstString mangled_name = sc.GetFunctionName(Mangled::ePreferMangled); ConstString demangled_name = sc.GetFunctionName(Mangled::ePreferDemangled); // Mangled names on Linux and FreeBSD are of the form: // _ZN18function_namespace13function_nameEv. if (strncmp(mangled_name.GetCString(), "_ZN", 3) || !strncmp(demangled_name.GetCString(), "(anonymous namespace)", 21)) { sc_list.Append(sc); } } } } } } DIEArray die_offsets; if (name_type_mask & eFunctionNameTypeBase) { uint32_t num_base = m_function_basename_index.Find(name, die_offsets); for (uint32_t i = 0; i < num_base; i++) { DWARFDIE die = info->GetDIE(die_offsets[i]); if (die) { if (!DIEInDeclContext(parent_decl_ctx, die)) continue; // The containing decl contexts don't match // If we get to here, the die is good, and we should add it: if (resolved_dies.find(die.GetDIE()) == resolved_dies.end()) { if (ResolveFunction(die, include_inlines, sc_list)) resolved_dies.insert(die.GetDIE()); } } } die_offsets.clear(); } if (name_type_mask & eFunctionNameTypeMethod) { if (parent_decl_ctx && parent_decl_ctx->IsValid()) return 0; // no methods in namespaces uint32_t num_base = m_function_method_index.Find(name, die_offsets); { for (uint32_t i = 0; i < num_base; i++) { DWARFDIE die = info->GetDIE(die_offsets[i]); if (die) { // If we get to here, the die is good, and we should add it: if (resolved_dies.find(die.GetDIE()) == resolved_dies.end()) { if (ResolveFunction(die, include_inlines, sc_list)) resolved_dies.insert(die.GetDIE()); } } } } die_offsets.clear(); } if ((name_type_mask & eFunctionNameTypeSelector) && (!parent_decl_ctx || !parent_decl_ctx->IsValid())) { FindFunctions(name, m_function_selector_index, include_inlines, sc_list); } } // Return the number of variable that were appended to the list const uint32_t num_matches = sc_list.GetSize() - original_size; 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, num_matches); } return num_matches; } uint32_t SymbolFileDWARF::FindFunctions(const RegularExpression ®ex, bool include_inlines, bool append, SymbolContextList &sc_list) { Timer scoped_timer(LLVM_PRETTY_FUNCTION, "SymbolFileDWARF::FindFunctions (regex = '%s')", regex.GetText().str().c_str()); Log *log(LogChannelDWARF::GetLogIfAll(DWARF_LOG_LOOKUPS)); if (log) { GetObjectFile()->GetModule()->LogMessage( log, "SymbolFileDWARF::FindFunctions (regex=\"%s\", append=%u, sc_list)", regex.GetText().str().c_str(), append); } // If we aren't appending the results to this list, then clear the list if (!append) sc_list.Clear(); // 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(); if (m_using_apple_tables) { if (m_apple_names_ap.get()) FindFunctions(regex, *m_apple_names_ap, include_inlines, sc_list); } else { // Index the DWARF if we haven't already if (!m_indexed) Index(); FindFunctions(regex, m_function_basename_index, include_inlines, sc_list); FindFunctions(regex, m_function_fullname_index, include_inlines, sc_list); } // Return the number of variable that were appended to the list return sc_list.GetSize() - original_size; } void SymbolFileDWARF::GetMangledNamesForFunction( const std::string &scope_qualified_name, std::vector &mangled_names) { DWARFDebugInfo *info = DebugInfo(); uint32_t num_comp_units = 0; if (info) num_comp_units = info->GetNumCompileUnits(); for (uint32_t i = 0; i < num_comp_units; i++) { DWARFCompileUnit *cu = info->GetCompileUnitAtIndex(i); if (cu == nullptr) continue; SymbolFileDWARFDwo *dwo = cu->GetDwoSymbolFile(); if (dwo) dwo->GetMangledNamesForFunction(scope_qualified_name, mangled_names); } NameToOffsetMap::iterator iter = m_function_scope_qualified_name_map.find(scope_qualified_name); if (iter == m_function_scope_qualified_name_map.end()) return; DIERefSetSP set_sp = (*iter).second; std::set::iterator set_iter; for (set_iter = set_sp->begin(); set_iter != set_sp->end(); set_iter++) { DWARFDIE die = DebugInfo()->GetDIE(*set_iter); mangled_names.push_back(ConstString(die.GetMangledName())); } } uint32_t SymbolFileDWARF::FindTypes( const SymbolContext &sc, const ConstString &name, const CompilerDeclContext *parent_decl_ctx, bool append, uint32_t max_matches, llvm::DenseSet &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); DWARFDebugInfo *info = DebugInfo(); if (info == NULL) return 0; 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)", name.GetCString(), static_cast(parent_decl_ctx), parent_decl_ctx->GetName().AsCString(""), append, 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); } if (!DeclContextMatchesThisSymbolFile(parent_decl_ctx)) return 0; DIEArray die_offsets; if (m_using_apple_tables) { if (m_apple_types_ap.get()) { const char *name_cstr = name.GetCString(); m_apple_types_ap->FindByName(name_cstr, die_offsets); } } else { if (!m_indexed) Index(); m_type_index.Find(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); 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 { if (m_using_apple_tables) { GetObjectFile()->GetModule()->ReportErrorIfModifyDetected( "the DWARF debug information has been modified (.apple_types " "accelerator table had bad die 0x%8.8x for '%s')\n", die_ref.die_offset, name.GetCString()); } } } 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(parent_decl_ctx), parent_decl_ctx->GetName().AsCString(""), 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 { 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(sc, name, parent_decl_ctx, append, max_matches, searched_symbol_files, types); if (num_external_matches) return num_external_matches; } } } } return 0; } size_t SymbolFileDWARF::FindTypes(const std::vector &context, bool append, TypeMap &types) { if (!append) types.Clear(); if (context.empty()) return 0; DIEArray die_offsets; ConstString name = context.back().name; if (!name) return 0; if (m_using_apple_tables) { if (m_apple_types_ap.get()) { const char *name_cstr = name.GetCString(); m_apple_types_ap->FindByName(name_cstr, die_offsets); } } else { if (!m_indexed) Index(); m_type_index.Find(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); if (die) { std::vector die_context; die.GetDWOContext(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 { if (m_using_apple_tables) { GetObjectFile()->GetModule()->ReportErrorIfModifyDetected( "the DWARF debug information has been modified (.apple_types " "accelerator table had bad die 0x%8.8x for '%s')\n", die_ref.die_offset, name.GetCString()); } } } return num_matches; } return 0; } CompilerDeclContext SymbolFileDWARF::FindNamespace(const SymbolContext &sc, const ConstString &name, const CompilerDeclContext *parent_decl_ctx) { Log *log(LogChannelDWARF::GetLogIfAll(DWARF_LOG_LOOKUPS)); if (log) { GetObjectFile()->GetModule()->LogMessage( log, "SymbolFileDWARF::FindNamespace (sc, name=\"%s\")", name.GetCString()); } CompilerDeclContext namespace_decl_ctx; if (!DeclContextMatchesThisSymbolFile(parent_decl_ctx)) return namespace_decl_ctx; DWARFDebugInfo *info = DebugInfo(); if (info) { DIEArray die_offsets; // Index if we already haven't to make sure the compile units // get indexed and make their global DIE index list if (m_using_apple_tables) { if (m_apple_namespaces_ap.get()) { const char *name_cstr = name.GetCString(); m_apple_namespaces_ap->FindByName(name_cstr, die_offsets); } } else { if (!m_indexed) Index(); m_namespace_index.Find(name, die_offsets); } const size_t num_matches = die_offsets.size(); if (num_matches) { for (size_t i = 0; i < num_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 DWARFASTParser *dwarf_ast = die.GetDWARFParser(); if (dwarf_ast) { namespace_decl_ctx = dwarf_ast->GetDeclContextForUIDFromDWARF(die); if (namespace_decl_ctx) break; } } else { if (m_using_apple_tables) { GetObjectFile()->GetModule()->ReportErrorIfModifyDetected( "the DWARF debug information has been modified " "(.apple_namespaces accelerator table had bad die 0x%8.8x for " "'%s')\n", die_ref.die_offset, name.GetCString()); } } } } } if (log && namespace_decl_ctx) { GetObjectFile()->GetModule()->LogMessage( log, "SymbolFileDWARF::FindNamespace (sc, name=\"%s\") => " "CompilerDeclContext(%p/%p) \"%s\"", name.GetCString(), static_cast(namespace_decl_ctx.GetTypeSystem()), static_cast(namespace_decl_ctx.GetOpaqueDeclContext()), namespace_decl_ctx.GetName().AsCString("")); } return namespace_decl_ctx; } TypeSP SymbolFileDWARF::GetTypeForDIE(const DWARFDIE &die, bool resolve_function_context) { TypeSP type_sp; if (die) { Type *type_ptr = GetDIEToType().lookup(die.GetDIE()); if (type_ptr == NULL) { CompileUnit *lldb_cu = GetCompUnitForDWARFCompUnit(die.GetCU()); assert(lldb_cu); SymbolContext sc(lldb_cu); const DWARFDebugInfoEntry *parent_die = die.GetParent().GetDIE(); while (parent_die != nullptr) { if (parent_die->Tag() == DW_TAG_subprogram) break; parent_die = parent_die->GetParent(); } SymbolContext sc_backup = sc; if (resolve_function_context && parent_die != nullptr && !GetFunction(DWARFDIE(die.GetCU(), parent_die), sc)) sc = sc_backup; type_sp = ParseType(sc, die, NULL); } else if (type_ptr != DIE_IS_BEING_PARSED) { // Grab the existing type from the master types lists type_sp = type_ptr->shared_from_this(); } } return type_sp; } DWARFDIE SymbolFileDWARF::GetDeclContextDIEContainingDIE(const DWARFDIE &orig_die) { if (orig_die) { DWARFDIE die = orig_die; while (die) { // If this is the original DIE that we are searching for a declaration // for, then don't look in the cache as we don't want our own decl // context to be our decl context... if (orig_die != die) { switch (die.Tag()) { case DW_TAG_compile_unit: case DW_TAG_namespace: case DW_TAG_structure_type: case DW_TAG_union_type: case DW_TAG_class_type: case DW_TAG_lexical_block: case DW_TAG_subprogram: return die; case DW_TAG_inlined_subroutine: { DWARFDIE abs_die = die.GetReferencedDIE(DW_AT_abstract_origin); if (abs_die) { return abs_die; } break; } default: break; } } DWARFDIE spec_die = die.GetReferencedDIE(DW_AT_specification); if (spec_die) { DWARFDIE decl_ctx_die = GetDeclContextDIEContainingDIE(spec_die); if (decl_ctx_die) return decl_ctx_die; } DWARFDIE abs_die = die.GetReferencedDIE(DW_AT_abstract_origin); if (abs_die) { DWARFDIE decl_ctx_die = GetDeclContextDIEContainingDIE(abs_die); if (decl_ctx_die) return decl_ctx_die; } die = die.GetParent(); } } return DWARFDIE(); } Symbol * SymbolFileDWARF::GetObjCClassSymbol(const ConstString &objc_class_name) { Symbol *objc_class_symbol = NULL; if (m_obj_file) { Symtab *symtab = m_obj_file->GetSymtab(); if (symtab) { objc_class_symbol = symtab->FindFirstSymbolWithNameAndType( objc_class_name, eSymbolTypeObjCClass, Symtab::eDebugNo, Symtab::eVisibilityAny); } } return objc_class_symbol; } // Some compilers don't emit the DW_AT_APPLE_objc_complete_type attribute. If // they don't // then we can end up looking through all class types for a complete type and // never find // the full definition. We need to know if this attribute is supported, so we // determine // this here and cache th result. We also need to 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( DWARFCompileUnit *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()) m_supports_DW_AT_APPLE_objc_complete_type = eLazyBoolYes; else { DWARFDebugInfo *debug_info = DebugInfo(); const uint32_t num_compile_units = GetNumCompileUnits(); for (uint32_t cu_idx = 0; cu_idx < num_compile_units; ++cu_idx) { DWARFCompileUnit *dwarf_cu = debug_info->GetCompileUnitAtIndex(cu_idx); if (dwarf_cu != cu && dwarf_cu->Supports_DW_AT_APPLE_objc_complete_type()) { m_supports_DW_AT_APPLE_objc_complete_type = eLazyBoolYes; break; } } } if (m_supports_DW_AT_APPLE_objc_complete_type == eLazyBoolNo && GetDebugMapSymfile()) return m_debug_map_symfile->Supports_DW_AT_APPLE_objc_complete_type(this); } return m_supports_DW_AT_APPLE_objc_complete_type == eLazyBoolYes; } // 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, const ConstString &type_name, bool must_be_implementation) { TypeSP type_sp; if (!type_name || (must_be_implementation && !GetObjCClassSymbol(type_name))) return type_sp; DIEArray die_offsets; if (m_using_apple_tables) { if (m_apple_types_ap.get()) { const char *name_cstr = type_name.GetCString(); m_apple_types_ap->FindCompleteObjCClassByName(name_cstr, die_offsets, must_be_implementation); } } else { if (!m_indexed) Index(); m_type_index.Find(type_name, die_offsets); } const size_t num_matches = die_offsets.size(); if (num_matches) { for (size_t i = 0; i < num_matches; ++i) { const DIERef &die_ref = die_offsets[i]; DWARFDIE type_die = GetDIE(die_ref); if (type_die) { bool try_resolving_type = false; // Don't try and resolve the DIE we are looking for with the DIE itself! if (type_die != die) { switch (type_die.Tag()) { case DW_TAG_class_type: case DW_TAG_structure_type: try_resolving_type = true; break; default: break; } } if (try_resolving_type) { if (must_be_implementation && type_die.Supports_DW_AT_APPLE_objc_complete_type()) try_resolving_type = type_die.GetAttributeValueAsUnsigned( DW_AT_APPLE_objc_complete_type, 0); if (try_resolving_type) { Type *resolved_type = ResolveType(type_die, false, true); if (resolved_type && resolved_type != DIE_IS_BEING_PARSED) { 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( ""), type_die.GetID(), type_cu->GetID()); if (die) GetDIEToType()[die.GetDIE()] = resolved_type; type_sp = resolved_type->shared_from_this(); break; } } } } else { if (m_using_apple_tables) { GetObjectFile()->GetModule()->ReportErrorIfModifyDetected( "the DWARF debug information has been modified (.apple_types " "accelerator table had bad die 0x%8.8x for '%s')\n", die_ref.die_offset, type_name.GetCString()); } } } } return type_sp; } //---------------------------------------------------------------------- // This function helps to ensure that the declaration contexts match for // two different DIEs. Often times debug information will refer to a // forward declaration of a type (the equivalent of "struct my_struct;". // There will often be a declaration of that type elsewhere that has the // full definition. When we go looking for the full type "my_struct", we // will find one or more matches in the accelerator tables and we will // then need to make sure the type was in the same declaration context // as the original DIE. This function can efficiently compare two DIEs // and will return true when the declaration context matches, and false // when they don't. //---------------------------------------------------------------------- bool SymbolFileDWARF::DIEDeclContextsMatch(const DWARFDIE &die1, const DWARFDIE &die2) { if (die1 == die2) return true; DWARFDIECollection decl_ctx_1; DWARFDIECollection decl_ctx_2; // The declaration DIE stack is a stack of the declaration context // DIEs all the way back to the compile unit. If a type "T" is // declared inside a class "B", and class "B" is declared inside // a class "A" and class "A" is in a namespace "lldb", and the // namespace is in a compile unit, there will be a stack of DIEs: // // [0] DW_TAG_class_type for "B" // [1] DW_TAG_class_type for "A" // [2] DW_TAG_namespace for "lldb" // [3] DW_TAG_compile_unit for the source file. // // We grab both contexts and make sure that everything matches // all the way back to the compiler unit. // First lets grab the decl contexts for both DIEs die1.GetDeclContextDIEs(decl_ctx_1); die2.GetDeclContextDIEs(decl_ctx_2); // Make sure the context arrays have the same size, otherwise // we are done const size_t count1 = decl_ctx_1.Size(); const size_t count2 = decl_ctx_2.Size(); if (count1 != count2) return false; // Make sure the DW_TAG values match all the way back up the // compile unit. If they don't, then we are done. DWARFDIE decl_ctx_die1; DWARFDIE decl_ctx_die2; size_t i; for (i = 0; i < count1; i++) { decl_ctx_die1 = decl_ctx_1.GetDIEAtIndex(i); decl_ctx_die2 = decl_ctx_2.GetDIEAtIndex(i); if (decl_ctx_die1.Tag() != decl_ctx_die2.Tag()) return false; } #if defined LLDB_CONFIGURATION_DEBUG // Make sure the top item in the decl context die array is always // DW_TAG_compile_unit. If it isn't then something went wrong in // the DWARFDIE::GetDeclContextDIEs() function... assert(decl_ctx_1.GetDIEAtIndex(count1 - 1).Tag() == DW_TAG_compile_unit); #endif // Always skip the compile unit when comparing by only iterating up to // "count - 1". Here we compare the names as we go. for (i = 0; i < count1 - 1; i++) { decl_ctx_die1 = decl_ctx_1.GetDIEAtIndex(i); decl_ctx_die2 = decl_ctx_2.GetDIEAtIndex(i); const char *name1 = decl_ctx_die1.GetName(); const char *name2 = decl_ctx_die2.GetName(); // If the string was from a DW_FORM_strp, then the pointer will often // be the same! if (name1 == name2) continue; // Name pointers are not equal, so only compare the strings // if both are not NULL. if (name1 && name2) { // If the strings don't compare, we are done... if (strcmp(name1, name2) != 0) return false; } else { // One name was NULL while the other wasn't return false; } } // We made it through all of the checks and the declaration contexts // are equal. return true; } TypeSP SymbolFileDWARF::FindDefinitionTypeForDWARFDeclContext( const DWARFDeclContext &dwarf_decl_ctx) { TypeSP type_sp; const uint32_t dwarf_decl_ctx_count = dwarf_decl_ctx.GetSize(); if (dwarf_decl_ctx_count > 0) { const ConstString type_name(dwarf_decl_ctx[0].name); const dw_tag_t tag = dwarf_decl_ctx[0].tag; if (type_name) { Log *log(LogChannelDWARF::GetLogIfAny(DWARF_LOG_TYPE_COMPLETION | DWARF_LOG_LOOKUPS)); if (log) { GetObjectFile()->GetModule()->LogMessage( log, "SymbolFileDWARF::FindDefinitionTypeForDWARFDeclContext(tag=%" "s, qualified-name='%s')", DW_TAG_value_to_name(dwarf_decl_ctx[0].tag), dwarf_decl_ctx.GetQualifiedName()); } DIEArray die_offsets; if (m_using_apple_tables) { if (m_apple_types_ap.get()) { const bool has_tag = m_apple_types_ap->GetHeader().header_data.ContainsAtom( DWARFMappedHash::eAtomTypeTag); const bool has_qualified_name_hash = m_apple_types_ap->GetHeader().header_data.ContainsAtom( DWARFMappedHash::eAtomTypeQualNameHash); if (has_tag && has_qualified_name_hash) { const char *qualified_name = dwarf_decl_ctx.GetQualifiedName(); const uint32_t qualified_name_hash = MappedHash::HashStringUsingDJB(qualified_name); if (log) GetObjectFile()->GetModule()->LogMessage( log, "FindByNameAndTagAndQualifiedNameHash()"); m_apple_types_ap->FindByNameAndTagAndQualifiedNameHash( type_name.GetCString(), tag, qualified_name_hash, die_offsets); } else if (has_tag) { if (log) GetObjectFile()->GetModule()->LogMessage(log, "FindByNameAndTag()"); m_apple_types_ap->FindByNameAndTag(type_name.GetCString(), tag, die_offsets); } else { m_apple_types_ap->FindByName(type_name.GetCString(), die_offsets); } } } else { if (!m_indexed) Index(); m_type_index.Find(type_name, die_offsets); } const size_t num_matches = die_offsets.size(); // Get the type system that we are looking to find a type for. We will 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); if (num_matches) { for (size_t i = 0; i < num_matches; ++i) { const DIERef &die_ref = die_offsets[i]; DWARFDIE type_die = GetDIE(die_ref); if (type_die) { // Make sure type_die's langauge matches the type system we are // looking for. // We don't want to find a "Foo" type from Java if we are looking // for a "Foo" // type for C, C++, ObjC, or ObjC++. if (type_system && !type_system->SupportsLanguage(type_die.GetLanguage())) continue; bool try_resolving_type = false; // Don't try and resolve the DIE we are looking for with the DIE // itself! const dw_tag_t type_tag = type_die.Tag(); // Make sure the tags match if (type_tag == tag) { // The tags match, lets try resolving this type try_resolving_type = true; } else { // The tags don't match, but we need to watch our for a // forward declaration for a struct and ("struct foo") // ends up being a class ("class foo { ... };") or // vice versa. switch (type_tag) { case DW_TAG_class_type: // We had a "class foo", see if we ended up with a "struct foo { // ... };" try_resolving_type = (tag == DW_TAG_structure_type); break; case DW_TAG_structure_type: // We had a "struct foo", see if we ended up with a "class foo { // ... };" try_resolving_type = (tag == DW_TAG_class_type); break; default: // Tags don't match, don't event try to resolve // using this type whose name matches.... break; } } if (try_resolving_type) { DWARFDeclContext type_dwarf_decl_ctx; type_die.GetDWARFDeclContext(type_dwarf_decl_ctx); if (log) { GetObjectFile()->GetModule()->LogMessage( 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()); } // Make sure the decl contexts match all the way up if (dwarf_decl_ctx == type_dwarf_decl_ctx) { Type *resolved_type = ResolveType(type_die, false); if (resolved_type && resolved_type != DIE_IS_BEING_PARSED) { type_sp = resolved_type->shared_from_this(); break; } } } else { if (log) { 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)", DW_TAG_value_to_name(dwarf_decl_ctx[0].tag), dwarf_decl_ctx.GetQualifiedName(), type_die.GetOffset(), qualified_name.c_str()); } } } else { if (m_using_apple_tables) { GetObjectFile()->GetModule()->ReportErrorIfModifyDetected( "the DWARF debug information has been modified (.apple_types " "accelerator table had bad die 0x%8.8x for '%s')\n", die_ref.die_offset, type_name.GetCString()); } } } } } } return type_sp; } TypeSP SymbolFileDWARF::ParseType(const SymbolContext &sc, const DWARFDIE &die, bool *type_is_new_ptr) { TypeSP type_sp; if (die) { TypeSystem *type_system = GetTypeSystemForLanguage(die.GetCU()->GetLanguageType()); if (type_system) { DWARFASTParser *dwarf_ast = type_system->GetDWARFParser(); if (dwarf_ast) { Log *log = LogChannelDWARF::GetLogIfAll(DWARF_LOG_DEBUG_INFO); type_sp = dwarf_ast->ParseTypeFromDWARF(sc, die, log, type_is_new_ptr); if (type_sp) { TypeList *type_list = GetTypeList(); if (type_list) type_list->Insert(type_sp); if (die.Tag() == DW_TAG_subprogram) { DIERef die_ref = die.GetDIERef(); std::string scope_qualified_name(GetDeclContextForUID(die.GetID()) .GetScopeQualifiedName() .AsCString("")); if (scope_qualified_name.size()) { NameToOffsetMap::iterator iter = m_function_scope_qualified_name_map.find( scope_qualified_name); if (iter != m_function_scope_qualified_name_map.end()) (*iter).second->insert(die_ref); else { DIERefSetSP new_set(new std::set); new_set->insert(die_ref); m_function_scope_qualified_name_map.emplace( std::make_pair(scope_qualified_name, new_set)); } } } } } } } return type_sp; } size_t SymbolFileDWARF::ParseTypes(const SymbolContext &sc, const DWARFDIE &orig_die, bool parse_siblings, bool parse_children) { size_t types_added = 0; DWARFDIE die = orig_die; while (die) { bool type_is_new = false; if (ParseType(sc, die, &type_is_new).get()) { if (type_is_new) ++types_added; } if (parse_children && die.HasChildren()) { if (die.Tag() == DW_TAG_subprogram) { SymbolContext child_sc(sc); child_sc.function = sc.comp_unit->FindFunctionByUID(die.GetID()).get(); types_added += ParseTypes(child_sc, die.GetFirstChild(), true, true); } else types_added += ParseTypes(sc, die.GetFirstChild(), true, true); } if (parse_siblings) die = die.GetSibling(); else die.Clear(); } return types_added; } size_t SymbolFileDWARF::ParseFunctionBlocks(const SymbolContext &sc) { assert(sc.comp_unit && sc.function); size_t functions_added = 0; DWARFCompileUnit *dwarf_cu = GetDWARFCompileUnit(sc.comp_unit); if (dwarf_cu) { const dw_offset_t function_die_offset = sc.function->GetID(); DWARFDIE function_die = dwarf_cu->GetDIE(function_die_offset); if (function_die) { ParseFunctionBlocks(sc, &sc.function->GetBlock(false), function_die, LLDB_INVALID_ADDRESS, 0); } } return functions_added; } size_t SymbolFileDWARF::ParseTypes(const SymbolContext &sc) { // At least a compile unit must be valid assert(sc.comp_unit); size_t types_added = 0; DWARFCompileUnit *dwarf_cu = GetDWARFCompileUnit(sc.comp_unit); if (dwarf_cu) { if (sc.function) { dw_offset_t function_die_offset = sc.function->GetID(); DWARFDIE func_die = dwarf_cu->GetDIE(function_die_offset); if (func_die && func_die.HasChildren()) { types_added = ParseTypes(sc, func_die.GetFirstChild(), true, true); } } else { DWARFDIE dwarf_cu_die = dwarf_cu->DIE(); if (dwarf_cu_die && dwarf_cu_die.HasChildren()) { types_added = ParseTypes(sc, dwarf_cu_die.GetFirstChild(), true, true); } } } return types_added; } size_t SymbolFileDWARF::ParseVariablesForContext(const SymbolContext &sc) { if (sc.comp_unit != NULL) { DWARFDebugInfo *info = DebugInfo(); if (info == NULL) return 0; if (sc.function) { DWARFDIE function_die = info->GetDIE(DIERef(sc.function->GetID(), this)); const dw_addr_t func_lo_pc = function_die.GetAttributeValueAsAddress( DW_AT_low_pc, LLDB_INVALID_ADDRESS); if (func_lo_pc != LLDB_INVALID_ADDRESS) { const size_t num_variables = ParseVariables( sc, function_die.GetFirstChild(), func_lo_pc, true, true); // Let all blocks know they have parse all their variables sc.function->GetBlock(false).SetDidParseVariables(true, true); return num_variables; } } else if (sc.comp_unit) { DWARFCompileUnit *dwarf_cu = info->GetCompileUnit(sc.comp_unit->GetID()); if (dwarf_cu == NULL) return 0; uint32_t vars_added = 0; VariableListSP variables(sc.comp_unit->GetVariableList(false)); if (variables.get() == NULL) { variables.reset(new VariableList()); sc.comp_unit->SetVariableList(variables); DIEArray die_offsets; if (m_using_apple_tables) { if (m_apple_names_ap.get()) { DWARFMappedHash::DIEInfoArray hash_data_array; if (m_apple_names_ap->AppendAllDIEsInRange( dwarf_cu->GetOffset(), dwarf_cu->GetNextCompileUnitOffset(), hash_data_array)) { DWARFMappedHash::ExtractDIEArray(hash_data_array, die_offsets); } } } else { // Index if we already haven't to make sure the compile units // get indexed and make their global DIE index list if (!m_indexed) Index(); m_global_index.FindAllEntriesForCompileUnit(dwarf_cu->GetOffset(), die_offsets); } const size_t num_matches = die_offsets.size(); if (num_matches) { for (size_t i = 0; i < num_matches; ++i) { const DIERef &die_ref = die_offsets[i]; DWARFDIE die = GetDIE(die_ref); if (die) { VariableSP var_sp( ParseVariableDIE(sc, die, LLDB_INVALID_ADDRESS)); if (var_sp) { variables->AddVariableIfUnique(var_sp); ++vars_added; } } else { if (m_using_apple_tables) { GetObjectFile()->GetModule()->ReportErrorIfModifyDetected( "the DWARF debug information has been modified " "(.apple_names accelerator table had bad die 0x%8.8x)\n", die_ref.die_offset); } } } } } return vars_added; } } return 0; } VariableSP SymbolFileDWARF::ParseVariableDIE(const SymbolContext &sc, const DWARFDIE &die, const lldb::addr_t func_low_pc) { if (die.GetDWARF() != this) return die.GetDWARF()->ParseVariableDIE(sc, die, func_low_pc); VariableSP var_sp; if (!die) return var_sp; var_sp = GetDIEToVariable()[die.GetDIE()]; if (var_sp) return var_sp; // Already been parsed! const dw_tag_t tag = die.Tag(); ModuleSP module = GetObjectFile()->GetModule(); if ((tag == DW_TAG_variable) || (tag == DW_TAG_constant) || (tag == DW_TAG_formal_parameter && sc.function)) { DWARFAttributes attributes; const size_t num_attributes = die.GetAttributes(attributes); DWARFDIE spec_die; if (num_attributes > 0) { const char *name = NULL; const char *mangled = NULL; Declaration decl; uint32_t i; DWARFFormValue type_die_form; DWARFExpression location(die.GetCU()); bool is_external = false; bool is_artificial = false; bool location_is_const_value_data = false; bool has_explicit_location = false; DWARFFormValue const_value; Variable::RangeList scope_ranges; // AccessType accessibility = eAccessNone; for (i = 0; i < num_attributes; ++i) { dw_attr_t attr = attributes.AttributeAtIndex(i); DWARFFormValue form_value; if (attributes.ExtractFormValueAtIndex(i, form_value)) { switch (attr) { case DW_AT_decl_file: decl.SetFile(sc.comp_unit->GetSupportFiles().GetFileSpecAtIndex( form_value.Unsigned())); break; case DW_AT_decl_line: decl.SetLine(form_value.Unsigned()); break; case DW_AT_decl_column: decl.SetColumn(form_value.Unsigned()); break; case DW_AT_name: name = form_value.AsCString(); break; case DW_AT_linkage_name: case DW_AT_MIPS_linkage_name: mangled = form_value.AsCString(); break; case DW_AT_type: type_die_form = form_value; break; case DW_AT_external: is_external = form_value.Boolean(); break; case DW_AT_const_value: // If we have already found a DW_AT_location attribute, ignore this // attribute. if (!has_explicit_location) { location_is_const_value_data = true; // The constant value will be either a block, a data value or a // string. const DWARFDataExtractor &debug_info_data = get_debug_info_data(); if (DWARFFormValue::IsBlockForm(form_value.Form())) { // Retrieve the value as a block expression. uint32_t block_offset = form_value.BlockData() - debug_info_data.GetDataStart(); uint32_t block_length = form_value.Unsigned(); location.CopyOpcodeData(module, debug_info_data, block_offset, block_length); } else if (DWARFFormValue::IsDataForm(form_value.Form())) { // Retrieve the value as a data expression. DWARFFormValue::FixedFormSizes fixed_form_sizes = DWARFFormValue::GetFixedFormSizesForAddressSize( attributes.CompileUnitAtIndex(i)->GetAddressByteSize(), attributes.CompileUnitAtIndex(i)->IsDWARF64()); uint32_t data_offset = attributes.DIEOffsetAtIndex(i); uint32_t data_length = fixed_form_sizes.GetSize(form_value.Form()); if (data_length == 0) { const uint8_t *data_pointer = form_value.BlockData(); if (data_pointer) { form_value.Unsigned(); } else if (DWARFFormValue::IsDataForm(form_value.Form())) { // we need to get the byte size of the type later after we // create the variable const_value = form_value; } } else location.CopyOpcodeData(module, debug_info_data, data_offset, data_length); } else { // Retrieve the value as a string expression. if (form_value.Form() == DW_FORM_strp) { DWARFFormValue::FixedFormSizes fixed_form_sizes = DWARFFormValue::GetFixedFormSizesForAddressSize( attributes.CompileUnitAtIndex(i) ->GetAddressByteSize(), attributes.CompileUnitAtIndex(i)->IsDWARF64()); uint32_t data_offset = attributes.DIEOffsetAtIndex(i); uint32_t data_length = fixed_form_sizes.GetSize(form_value.Form()); location.CopyOpcodeData(module, debug_info_data, data_offset, data_length); } 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.CopyOpcodeData(module, debug_info_data, string_offset, string_length); } } } break; case DW_AT_location: { location_is_const_value_data = false; has_explicit_location = true; if (DWARFFormValue::IsBlockForm(form_value.Form())) { const DWARFDataExtractor &debug_info_data = get_debug_info_data(); uint32_t block_offset = form_value.BlockData() - debug_info_data.GetDataStart(); uint32_t block_length = form_value.Unsigned(); location.CopyOpcodeData(module, get_debug_info_data(), block_offset, block_length); } else { const DWARFDataExtractor &debug_loc_data = get_debug_loc_data(); 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.CopyOpcodeData(module, debug_loc_data, debug_loc_offset, loc_list_length); assert(func_low_pc != LLDB_INVALID_ADDRESS); location.SetLocationListSlide( func_low_pc - attributes.CompileUnitAtIndex(i)->GetBaseAddress()); } } } break; case DW_AT_specification: spec_die = GetDIE(DIERef(form_value)); break; case DW_AT_start_scope: { if (form_value.Form() == DW_FORM_sec_offset) { DWARFRangeList dwarf_scope_ranges; const DWARFDebugRanges *debug_ranges = DebugRanges(); debug_ranges->FindRanges(die.GetCU()->GetRangesBase(), form_value.Unsigned(), dwarf_scope_ranges); // All DW_AT_start_scope are relative to the base address of the // compile unit. We add the compile unit base address to make // sure all the addresses are properly fixed up. for (size_t i = 0, count = dwarf_scope_ranges.GetSize(); i < count; ++i) { const DWARFRangeList::Entry &range = dwarf_scope_ranges.GetEntryRef(i); scope_ranges.Append(range.GetRangeBase() + die.GetCU()->GetBaseAddress(), range.GetByteSize()); } } else { // TODO: Handle the case when DW_AT_start_scope have form // constant. The // dwarf spec is a bit ambiguous about what is the expected // behavior in // case the enclosing block have a non coninious address range and // the // DW_AT_start_scope entry have a form constant. GetObjectFile()->GetModule()->ReportWarning( "0x%8.8" PRIx64 ": DW_AT_start_scope has unsupported form type (0x%x)\n", die.GetID(), form_value.Form()); } scope_ranges.Sort(); scope_ranges.CombineConsecutiveRanges(); } break; case DW_AT_artificial: is_artificial = form_value.Boolean(); break; case DW_AT_accessibility: break; // accessibility = // DW_ACCESS_to_AccessType(form_value.Unsigned()); break; case DW_AT_declaration: case DW_AT_description: case DW_AT_endianity: case DW_AT_segment: case DW_AT_visibility: default: case DW_AT_abstract_origin: case DW_AT_sibling: break; } } } const DWARFDIE parent_context_die = GetDeclContextDIEContainingDIE(die); const dw_tag_t parent_tag = die.GetParent().Tag(); bool is_static_member = parent_tag == DW_TAG_compile_unit && (parent_context_die.Tag() == DW_TAG_class_type || parent_context_die.Tag() == DW_TAG_structure_type); ValueType scope = eValueTypeInvalid; const DWARFDIE sc_parent_die = GetParentSymbolContextDIE(die); SymbolContextScope *symbol_context_scope = NULL; bool has_explicit_mangled = mangled != nullptr; if (!mangled) { // LLDB relies on the mangled name (DW_TAG_linkage_name or // DW_AT_MIPS_linkage_name) to // generate fully qualified names of global variables with commands like // "frame var j". // For example, if j were an int variable holding a value 4 and declared // in a namespace // B which in turn is contained in a namespace A, the command "frame var // j" returns // "(int) A::B::j = 4". If the compiler does not emit a linkage name, we // should be able // to generate a fully qualified name from the declaration context. if (parent_tag == DW_TAG_compile_unit && Language::LanguageIsCPlusPlus(die.GetLanguage())) { DWARFDeclContext decl_ctx; die.GetDWARFDeclContext(decl_ctx); mangled = decl_ctx.GetQualifiedNameAsConstString().GetCString(); } } if (tag == DW_TAG_formal_parameter) scope = eValueTypeVariableArgument; else { // DWARF doesn't specify if a DW_TAG_variable is a local, global // or static variable, so we have to do a little digging: // 1) DW_AT_linkage_name implies static lifetime (but may be missing) // 2) An empty DW_AT_location is an (optimized-out) static lifetime var. // 3) DW_AT_location containing a DW_OP_addr implies static lifetime. // Clang likes to combine small global variables into the same symbol // with locations like: DW_OP_addr(0x1000), DW_OP_constu(2), DW_OP_plus // so we need to look through the whole expression. bool is_static_lifetime = has_explicit_mangled || (has_explicit_location && !location.IsValid()); // Check if the location has a DW_OP_addr with any address value... lldb::addr_t location_DW_OP_addr = LLDB_INVALID_ADDRESS; if (!location_is_const_value_data) { bool op_error = false; location_DW_OP_addr = location.GetLocation_DW_OP_addr(0, op_error); if (op_error) { StreamString strm; location.DumpLocationForAddress(&strm, eDescriptionLevelFull, 0, 0, NULL); GetObjectFile()->GetModule()->ReportError( "0x%8.8x: %s has an invalid location: %s", die.GetOffset(), die.GetTagAsCString(), strm.GetData()); } if (location_DW_OP_addr != LLDB_INVALID_ADDRESS) is_static_lifetime = true; } SymbolFileDWARFDebugMap *debug_map_symfile = GetDebugMapSymfile(); if (is_static_lifetime) { if (is_external) scope = eValueTypeVariableGlobal; else scope = eValueTypeVariableStatic; if (debug_map_symfile) { // When leaving the DWARF in the .o files on darwin, // when we have a global variable that wasn't initialized, // the .o file might not have allocated a virtual // address for the global variable. In this case it will // have created a symbol for the global variable // that is undefined/data and external and the value will // be the byte size of the variable. When we do the // address map in SymbolFileDWARFDebugMap we rely on // having an address, we need to do some magic here // so we can get the correct address for our global // variable. The address for all of these entries // will be zero, and there will be an undefined symbol // in this object file, and the executable will have // a matching symbol with a good address. So here we // dig up the correct address and replace it in the // location for the variable, and set the variable's // symbol context scope to be that of the main executable // so the file address will resolve correctly. bool linked_oso_file_addr = false; if (is_external && location_DW_OP_addr == 0) { // we have a possible uninitialized extern global ConstString const_name(mangled ? mangled : name); ObjectFile *debug_map_objfile = debug_map_symfile->GetObjectFile(); if (debug_map_objfile) { Symtab *debug_map_symtab = debug_map_objfile->GetSymtab(); if (debug_map_symtab) { Symbol *exe_symbol = debug_map_symtab->FindFirstSymbolWithNameAndType( const_name, eSymbolTypeData, Symtab::eDebugYes, Symtab::eVisibilityExtern); if (exe_symbol) { if (exe_symbol->ValueIsAddress()) { const addr_t exe_file_addr = exe_symbol->GetAddressRef().GetFileAddress(); if (exe_file_addr != LLDB_INVALID_ADDRESS) { if (location.Update_DW_OP_addr(exe_file_addr)) { linked_oso_file_addr = true; symbol_context_scope = exe_symbol; } } } } } } } if (!linked_oso_file_addr) { // The DW_OP_addr is not zero, but it contains a .o file address // which // needs to be linked up correctly. const lldb::addr_t exe_file_addr = debug_map_symfile->LinkOSOFileAddress(this, location_DW_OP_addr); if (exe_file_addr != LLDB_INVALID_ADDRESS) { // Update the file address for this variable location.Update_DW_OP_addr(exe_file_addr); } else { // Variable didn't make it into the final executable return var_sp; } } } } else { if (location_is_const_value_data) scope = eValueTypeVariableStatic; else { scope = eValueTypeVariableLocal; if (debug_map_symfile) { // We need to check for TLS addresses that we need to fixup if (location.ContainsThreadLocalStorage()) { location.LinkThreadLocalStorage( debug_map_symfile->GetObjectFile()->GetModule(), [this, debug_map_symfile]( lldb::addr_t unlinked_file_addr) -> lldb::addr_t { return debug_map_symfile->LinkOSOFileAddress( this, unlinked_file_addr); }); scope = eValueTypeVariableThreadLocal; } } } } } if (symbol_context_scope == NULL) { switch (parent_tag) { case DW_TAG_subprogram: case DW_TAG_inlined_subroutine: case DW_TAG_lexical_block: if (sc.function) { symbol_context_scope = sc.function->GetBlock(true).FindBlockByID( sc_parent_die.GetID()); if (symbol_context_scope == NULL) symbol_context_scope = sc.function; } break; default: symbol_context_scope = sc.comp_unit; break; } } if (symbol_context_scope) { SymbolFileTypeSP type_sp( new SymbolFileType(*this, DIERef(type_die_form).GetUID(this))); if (const_value.Form() && type_sp && type_sp->GetType()) location.CopyOpcodeData(const_value.Unsigned(), type_sp->GetType()->GetByteSize(), die.GetCU()->GetAddressByteSize()); var_sp.reset(new Variable(die.GetID(), name, mangled, type_sp, scope, symbol_context_scope, scope_ranges, &decl, location, is_external, is_artificial, is_static_member)); var_sp->SetLocationIsConstantValueData(location_is_const_value_data); } else { // Not ready to parse this variable yet. It might be a global // or static variable that is in a function scope and the function // in the symbol context wasn't filled in yet return var_sp; } } // Cache var_sp even if NULL (the variable was just a specification or // was missing vital information to be able to be displayed in the debugger // (missing location due to optimization, etc)) so we don't re-parse // this DIE over and over later... GetDIEToVariable()[die.GetDIE()] = var_sp; if (spec_die) GetDIEToVariable()[spec_die.GetDIE()] = var_sp; } return var_sp; } DWARFDIE SymbolFileDWARF::FindBlockContainingSpecification( const DIERef &func_die_ref, dw_offset_t spec_block_die_offset) { // Give the concrete function die specified by "func_die_offset", find the // concrete block whose DW_AT_specification or DW_AT_abstract_origin points // to "spec_block_die_offset" return FindBlockContainingSpecification(DebugInfo()->GetDIE(func_die_ref), spec_block_die_offset); } DWARFDIE SymbolFileDWARF::FindBlockContainingSpecification( const DWARFDIE &die, dw_offset_t spec_block_die_offset) { if (die) { switch (die.Tag()) { case DW_TAG_subprogram: case DW_TAG_inlined_subroutine: case DW_TAG_lexical_block: { if (die.GetAttributeValueAsReference( DW_AT_specification, DW_INVALID_OFFSET) == spec_block_die_offset) return die; if (die.GetAttributeValueAsReference(DW_AT_abstract_origin, DW_INVALID_OFFSET) == spec_block_die_offset) return die; } break; } // Give the concrete function die specified by "func_die_offset", find the // concrete block whose DW_AT_specification or DW_AT_abstract_origin points // to "spec_block_die_offset" for (DWARFDIE child_die = die.GetFirstChild(); child_die; child_die = child_die.GetSibling()) { DWARFDIE result_die = FindBlockContainingSpecification(child_die, spec_block_die_offset); if (result_die) return result_die; } } return DWARFDIE(); } size_t SymbolFileDWARF::ParseVariables(const SymbolContext &sc, const DWARFDIE &orig_die, const lldb::addr_t func_low_pc, bool parse_siblings, bool parse_children, VariableList *cc_variable_list) { if (!orig_die) return 0; VariableListSP variable_list_sp; size_t vars_added = 0; DWARFDIE die = orig_die; while (die) { dw_tag_t tag = die.Tag(); // Check to see if we have already parsed this variable or constant? VariableSP var_sp = GetDIEToVariable()[die.GetDIE()]; if (var_sp) { if (cc_variable_list) cc_variable_list->AddVariableIfUnique(var_sp); } else { // We haven't already parsed it, lets do that now. if ((tag == DW_TAG_variable) || (tag == DW_TAG_constant) || (tag == DW_TAG_formal_parameter && sc.function)) { if (variable_list_sp.get() == NULL) { DWARFDIE sc_parent_die = GetParentSymbolContextDIE(orig_die); dw_tag_t parent_tag = sc_parent_die.Tag(); switch (parent_tag) { case DW_TAG_compile_unit: if (sc.comp_unit != NULL) { variable_list_sp = sc.comp_unit->GetVariableList(false); if (variable_list_sp.get() == NULL) { variable_list_sp.reset(new VariableList()); sc.comp_unit->SetVariableList(variable_list_sp); } } 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", sc_parent_die.GetID(), sc_parent_die.GetTagAsCString(), orig_die.GetID(), orig_die.GetTagAsCString()); } break; case DW_TAG_subprogram: case DW_TAG_inlined_subroutine: case DW_TAG_lexical_block: if (sc.function != NULL) { // Check to see if we already have parsed the variables for the // given scope Block *block = sc.function->GetBlock(true).FindBlockByID( sc_parent_die.GetID()); if (block == NULL) { // This must be a specification or abstract origin with // a concrete block counterpart in the current function. We need // to find the concrete block so we can correctly add the // variable to it const DWARFDIE concrete_block_die = FindBlockContainingSpecification( DIERef(sc.function->GetID(), this), sc_parent_die.GetOffset()); if (concrete_block_die) block = sc.function->GetBlock(true).FindBlockByID( concrete_block_die.GetID()); } if (block != NULL) { const bool can_create = false; variable_list_sp = block->GetBlockVariableList(can_create); if (variable_list_sp.get() == NULL) { variable_list_sp.reset(new VariableList()); block->SetVariableList(variable_list_sp); } } } break; default: GetObjectFile()->GetModule()->ReportError( "didn't find appropriate parent DIE for variable list for " "0x%8.8" PRIx64 " %s.\n", orig_die.GetID(), orig_die.GetTagAsCString()); break; } } if (variable_list_sp) { VariableSP var_sp(ParseVariableDIE(sc, die, func_low_pc)); if (var_sp) { variable_list_sp->AddVariableIfUnique(var_sp); if (cc_variable_list) cc_variable_list->AddVariableIfUnique(var_sp); ++vars_added; } } } } bool skip_children = (sc.function == NULL && tag == DW_TAG_subprogram); if (!skip_children && parse_children && die.HasChildren()) { vars_added += ParseVariables(sc, die.GetFirstChild(), func_low_pc, true, true, cc_variable_list); } if (parse_siblings) die = die.GetSibling(); else die.Clear(); } return vars_added; } //------------------------------------------------------------------ // PluginInterface protocol //------------------------------------------------------------------ ConstString SymbolFileDWARF::GetPluginName() { return GetPluginNameStatic(); } uint32_t SymbolFileDWARF::GetPluginVersion() { return 1; } void SymbolFileDWARF::DumpIndexes() { StreamFile s(stdout, false); s.Printf( "DWARF index for (%s) '%s':", GetObjectFile()->GetModule()->GetArchitecture().GetArchitectureName(), GetObjectFile()->GetFileSpec().GetPath().c_str()); s.Printf("\nFunction basenames:\n"); m_function_basename_index.Dump(&s); s.Printf("\nFunction fullnames:\n"); m_function_fullname_index.Dump(&s); s.Printf("\nFunction methods:\n"); m_function_method_index.Dump(&s); s.Printf("\nFunction selectors:\n"); m_function_selector_index.Dump(&s); s.Printf("\nObjective C class selectors:\n"); m_objc_class_selectors_index.Dump(&s); s.Printf("\nGlobals and statics:\n"); m_global_index.Dump(&s); s.Printf("\nTypes:\n"); m_type_index.Dump(&s); s.Printf("\nNamespaces:\n"); m_namespace_index.Dump(&s); } SymbolFileDWARFDebugMap *SymbolFileDWARF::GetDebugMapSymfile() { if (m_debug_map_symfile == NULL && !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(); } } return m_debug_map_symfile; } DWARFExpression::LocationListFormat SymbolFileDWARF::GetLocationListFormat() const { return DWARFExpression::RegularLocationList; } Index: vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h =================================================================== --- vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h (revision 317691) +++ vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h (revision 317692) @@ -1,526 +1,528 @@ //===-- SymbolFileDWARF.h --------------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #ifndef SymbolFileDWARF_SymbolFileDWARF_h_ #define SymbolFileDWARF_SymbolFileDWARF_h_ // C Includes // C++ Includes #include #include #include #include #include #include // Other libraries and framework includes #include "llvm/ADT/DenseMap.h" #include "llvm/Support/Threading.h" #include "lldb/Utility/Flags.h" #include "lldb/Core/RangeMap.h" #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" #include "lldb/Utility/ConstString.h" #include "lldb/lldb-private.h" // Project includes #include "DWARFDataExtractor.h" #include "DWARFDefines.h" #include "HashedNameToDIE.h" #include "NameToDIE.h" #include "UniqueDWARFASTType.h" //---------------------------------------------------------------------- // Forward Declarations for this DWARF plugin //---------------------------------------------------------------------- class DebugMapModule; class DWARFAbbreviationDeclaration; class DWARFAbbreviationDeclarationSet; class DWARFileUnit; class DWARFDebugAbbrev; class DWARFDebugAranges; class DWARFDebugInfo; class DWARFDebugInfoEntry; class DWARFDebugLine; class DWARFDebugPubnames; class DWARFDebugRanges; class DWARFDeclContext; class DWARFDIECollection; class DWARFFormValue; class SymbolFileDWARFDebugMap; class SymbolFileDWARFDwo; #define DIE_IS_BEING_PARSED ((lldb_private::Type *)1) class SymbolFileDWARF : public lldb_private::SymbolFile, public lldb_private::UserID { public: friend class SymbolFileDWARFDebugMap; friend class SymbolFileDWARFDwo; friend class DebugMapModule; friend struct DIERef; friend class DWARFCompileUnit; friend class DWARFDIE; friend class DWARFASTParserClang; friend class DWARFASTParserGo; friend class DWARFASTParserJava; friend class DWARFASTParserOCaml; //------------------------------------------------------------------ // Static Functions //------------------------------------------------------------------ static void Initialize(); static void Terminate(); static void DebuggerInitialize(lldb_private::Debugger &debugger); static lldb_private::ConstString GetPluginNameStatic(); static const char *GetPluginDescriptionStatic(); static lldb_private::SymbolFile * CreateInstance(lldb_private::ObjectFile *obj_file); //------------------------------------------------------------------ // Constructors and Destructors //------------------------------------------------------------------ SymbolFileDWARF(lldb_private::ObjectFile *ofile); ~SymbolFileDWARF() 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 ParseCompileUnitLanguage(const lldb_private::SymbolContext &sc) override; size_t ParseCompileUnitFunctions(const lldb_private::SymbolContext &sc) override; bool ParseCompileUnitLineTable(const lldb_private::SymbolContext &sc) override; bool ParseCompileUnitDebugMacros(const lldb_private::SymbolContext &sc) override; bool ParseCompileUnitSupportFiles( const lldb_private::SymbolContext &sc, lldb_private::FileSpecList &support_files) override; bool ParseCompileUnitIsOptimized(const lldb_private::SymbolContext &sc) override; bool ParseImportedModules( const lldb_private::SymbolContext &sc, std::vector &imported_modules) override; size_t ParseFunctionBlocks(const lldb_private::SymbolContext &sc) override; size_t ParseTypes(const lldb_private::SymbolContext &sc) override; size_t ParseVariablesForContext(const lldb_private::SymbolContext &sc) override; lldb_private::Type *ResolveTypeUID(lldb::user_id_t type_uid) override; bool CompleteType(lldb_private::CompilerType &compiler_type) override; lldb_private::Type *ResolveType(const DWARFDIE &die, bool assert_not_being_parsed = true, bool resolve_function_context = false); SymbolFileDWARF *GetDWARFForUID(lldb::user_id_t uid); DWARFDIE GetDIEFromUID(lldb::user_id_t uid); lldb_private::CompilerDecl GetDeclForUID(lldb::user_id_t uid) override; lldb_private::CompilerDeclContext GetDeclContextForUID(lldb::user_id_t uid) override; lldb_private::CompilerDeclContext GetDeclContextContainingUID(lldb::user_id_t uid) override; void ParseDeclsForContext(lldb_private::CompilerDeclContext decl_ctx) override; uint32_t ResolveSymbolContext(const lldb_private::Address &so_addr, uint32_t resolve_scope, lldb_private::SymbolContext &sc) override; uint32_t ResolveSymbolContext(const lldb_private::FileSpec &file_spec, uint32_t line, bool check_inlines, uint32_t resolve_scope, lldb_private::SymbolContextList &sc_list) override; uint32_t FindGlobalVariables(const lldb_private::ConstString &name, const lldb_private::CompilerDeclContext *parent_decl_ctx, bool append, uint32_t max_matches, lldb_private::VariableList &variables) override; uint32_t FindGlobalVariables(const lldb_private::RegularExpression ®ex, bool append, uint32_t max_matches, lldb_private::VariableList &variables) override; uint32_t FindFunctions(const lldb_private::ConstString &name, const lldb_private::CompilerDeclContext *parent_decl_ctx, uint32_t name_type_mask, bool include_inlines, bool append, lldb_private::SymbolContextList &sc_list) override; uint32_t FindFunctions(const lldb_private::RegularExpression ®ex, bool include_inlines, bool append, lldb_private::SymbolContextList &sc_list) override; void GetMangledNamesForFunction( const std::string &scope_qualified_name, std::vector &mangled_names) override; uint32_t FindTypes(const lldb_private::SymbolContext &sc, const lldb_private::ConstString &name, const lldb_private::CompilerDeclContext *parent_decl_ctx, bool append, uint32_t max_matches, llvm::DenseSet &searched_symbol_files, lldb_private::TypeMap &types) override; size_t FindTypes(const std::vector &context, bool append, lldb_private::TypeMap &types) override; lldb_private::TypeList *GetTypeList() override; size_t GetTypes(lldb_private::SymbolContextScope *sc_scope, uint32_t type_mask, lldb_private::TypeList &type_list) override; lldb_private::TypeSystem * GetTypeSystemForLanguage(lldb::LanguageType language) override; lldb_private::CompilerDeclContext FindNamespace( const lldb_private::SymbolContext &sc, const lldb_private::ConstString &name, const lldb_private::CompilerDeclContext *parent_decl_ctx) override; + void PreloadSymbols() override; + //------------------------------------------------------------------ // PluginInterface protocol //------------------------------------------------------------------ lldb_private::ConstString GetPluginName() override; uint32_t GetPluginVersion() override; const lldb_private::DWARFDataExtractor &get_debug_abbrev_data(); const lldb_private::DWARFDataExtractor &get_debug_addr_data(); const lldb_private::DWARFDataExtractor &get_debug_aranges_data(); const lldb_private::DWARFDataExtractor &get_debug_frame_data(); const lldb_private::DWARFDataExtractor &get_debug_info_data(); const lldb_private::DWARFDataExtractor &get_debug_line_data(); const lldb_private::DWARFDataExtractor &get_debug_macro_data(); const lldb_private::DWARFDataExtractor &get_debug_loc_data(); const lldb_private::DWARFDataExtractor &get_debug_ranges_data(); const lldb_private::DWARFDataExtractor &get_debug_str_data(); const lldb_private::DWARFDataExtractor &get_debug_str_offsets_data(); const lldb_private::DWARFDataExtractor &get_apple_names_data(); const lldb_private::DWARFDataExtractor &get_apple_types_data(); const lldb_private::DWARFDataExtractor &get_apple_namespaces_data(); const lldb_private::DWARFDataExtractor &get_apple_objc_data(); DWARFDebugAbbrev *DebugAbbrev(); const DWARFDebugAbbrev *DebugAbbrev() const; DWARFDebugInfo *DebugInfo(); const DWARFDebugInfo *DebugInfo() const; DWARFDebugRanges *DebugRanges(); const DWARFDebugRanges *DebugRanges() const; static bool SupportedVersion(uint16_t version); DWARFDIE GetDeclContextDIEContainingDIE(const DWARFDIE &die); bool HasForwardDeclForClangType(const lldb_private::CompilerType &compiler_type); lldb_private::CompileUnit * GetCompUnitForDWARFCompUnit(DWARFCompileUnit *dwarf_cu, uint32_t cu_idx = UINT32_MAX); size_t GetObjCMethodDIEOffsets(lldb_private::ConstString class_name, DIEArray &method_die_offsets); bool Supports_DW_AT_APPLE_objc_complete_type(DWARFCompileUnit *cu); lldb_private::DebugMacrosSP ParseDebugMacros(lldb::offset_t *offset); static DWARFDIE GetParentSymbolContextDIE(const DWARFDIE &die); virtual lldb::CompUnitSP ParseCompileUnit(DWARFCompileUnit *dwarf_cu, uint32_t cu_idx); virtual lldb_private::DWARFExpression::LocationListFormat GetLocationListFormat() const; lldb::ModuleSP GetDWOModule(lldb_private::ConstString name); virtual DWARFDIE GetDIE(const DIERef &die_ref); virtual std::unique_ptr GetDwoSymbolFileForCompileUnit(DWARFCompileUnit &dwarf_cu, const DWARFDebugInfoEntry &cu_die); protected: typedef llvm::DenseMap DIEToTypePtr; typedef llvm::DenseMap DIEToVariableSP; typedef llvm::DenseMap DIEToClangType; typedef llvm::DenseMap ClangTypeToDIE; struct DWARFDataSegment { llvm::once_flag m_flag; lldb_private::DWARFDataExtractor m_data; }; DISALLOW_COPY_AND_ASSIGN(SymbolFileDWARF); const lldb_private::DWARFDataExtractor & GetCachedSectionData(lldb::SectionType sect_type, DWARFDataSegment &data_segment); virtual void LoadSectionData(lldb::SectionType sect_type, lldb_private::DWARFDataExtractor &data); bool DeclContextMatchesThisSymbolFile( const lldb_private::CompilerDeclContext *decl_ctx); bool DIEInDeclContext(const lldb_private::CompilerDeclContext *parent_decl_ctx, const DWARFDIE &die); virtual DWARFCompileUnit * GetDWARFCompileUnit(lldb_private::CompileUnit *comp_unit); DWARFCompileUnit *GetNextUnparsedDWARFCompileUnit(DWARFCompileUnit *prev_cu); bool GetFunction(const DWARFDIE &die, lldb_private::SymbolContext &sc); lldb_private::Function * ParseCompileUnitFunction(const lldb_private::SymbolContext &sc, const DWARFDIE &die); size_t ParseFunctionBlocks(const lldb_private::SymbolContext &sc, lldb_private::Block *parent_block, const DWARFDIE &die, lldb::addr_t subprogram_low_pc, uint32_t depth); size_t ParseTypes(const lldb_private::SymbolContext &sc, const DWARFDIE &die, bool parse_siblings, bool parse_children); lldb::TypeSP ParseType(const lldb_private::SymbolContext &sc, const DWARFDIE &die, bool *type_is_new); lldb_private::Type *ResolveTypeUID(const DWARFDIE &die, bool assert_not_being_parsed); lldb_private::Type *ResolveTypeUID(const DIERef &die_ref); lldb::VariableSP ParseVariableDIE(const lldb_private::SymbolContext &sc, const DWARFDIE &die, const lldb::addr_t func_low_pc); size_t ParseVariables(const lldb_private::SymbolContext &sc, const DWARFDIE &orig_die, const lldb::addr_t func_low_pc, bool parse_siblings, bool parse_children, lldb_private::VariableList *cc_variable_list = NULL); bool ClassOrStructIsVirtual(const DWARFDIE &die); // Given a die_offset, figure out the symbol context representing that die. bool ResolveFunction(const DIERef &die_ref, bool include_inlines, lldb_private::SymbolContextList &sc_list); bool ResolveFunction(const DWARFDIE &die, bool include_inlines, lldb_private::SymbolContextList &sc_list); void FindFunctions(const lldb_private::ConstString &name, const NameToDIE &name_to_die, bool include_inlines, lldb_private::SymbolContextList &sc_list); void FindFunctions(const lldb_private::RegularExpression ®ex, const NameToDIE &name_to_die, bool include_inlines, lldb_private::SymbolContextList &sc_list); void FindFunctions(const lldb_private::RegularExpression ®ex, const DWARFMappedHash::MemoryTable &memory_table, bool include_inlines, lldb_private::SymbolContextList &sc_list); virtual lldb::TypeSP FindDefinitionTypeForDWARFDeclContext(const DWARFDeclContext &die_decl_ctx); lldb::TypeSP FindCompleteObjCDefinitionTypeForDIE( const DWARFDIE &die, const lldb_private::ConstString &type_name, bool must_be_implementation); lldb::TypeSP FindCompleteObjCDefinitionType(const lldb_private::ConstString &type_name, bool header_definition_ok); lldb_private::Symbol * GetObjCClassSymbol(const lldb_private::ConstString &objc_class_name); void ParseFunctions(const DIEArray &die_offsets, bool include_inlines, lldb_private::SymbolContextList &sc_list); lldb::TypeSP GetTypeForDIE(const DWARFDIE &die, bool resolve_function_context = false); void Index(); void DumpIndexes(); void SetDebugMapModule(const lldb::ModuleSP &module_sp) { m_debug_map_module_wp = module_sp; } SymbolFileDWARFDebugMap *GetDebugMapSymfile(); DWARFDIE FindBlockContainingSpecification(const DIERef &func_die_ref, dw_offset_t spec_block_die_offset); DWARFDIE FindBlockContainingSpecification(const DWARFDIE &die, dw_offset_t spec_block_die_offset); virtual UniqueDWARFASTTypeMap &GetUniqueDWARFASTTypeMap(); bool DIEDeclContextsMatch(const DWARFDIE &die1, const DWARFDIE &die2); bool ClassContainsSelector(const DWARFDIE &class_die, const lldb_private::ConstString &selector); bool FixupAddress(lldb_private::Address &addr); typedef std::set TypeSet; typedef std::map ExternalTypeModuleMap; void GetTypes(const DWARFDIE &die, dw_offset_t min_die_offset, dw_offset_t max_die_offset, uint32_t type_mask, TypeSet &type_set); typedef lldb_private::RangeDataVector GlobalVariableMap; GlobalVariableMap &GetGlobalAranges(); void UpdateExternalModuleListIfNeeded(); virtual DIEToTypePtr &GetDIEToType() { return m_die_to_type; } virtual DIEToVariableSP &GetDIEToVariable() { return m_die_to_variable_sp; } virtual DIEToClangType &GetForwardDeclDieToClangType() { return m_forward_decl_die_to_clang_type; } virtual ClangTypeToDIE &GetForwardDeclClangTypeToDie() { return m_forward_decl_clang_type_to_die; } lldb::ModuleWP m_debug_map_module_wp; SymbolFileDWARFDebugMap *m_debug_map_symfile; lldb_private::DWARFDataExtractor m_dwarf_data; DWARFDataSegment m_data_debug_abbrev; DWARFDataSegment m_data_debug_addr; DWARFDataSegment m_data_debug_aranges; DWARFDataSegment m_data_debug_frame; DWARFDataSegment m_data_debug_info; DWARFDataSegment m_data_debug_line; DWARFDataSegment m_data_debug_macro; DWARFDataSegment m_data_debug_loc; DWARFDataSegment m_data_debug_ranges; DWARFDataSegment m_data_debug_str; DWARFDataSegment m_data_debug_str_offsets; DWARFDataSegment m_data_apple_names; DWARFDataSegment m_data_apple_types; DWARFDataSegment m_data_apple_namespaces; DWARFDataSegment m_data_apple_objc; // The unique pointer items below are generated on demand if and when someone // accesses // them through a non const version of this class. std::unique_ptr m_abbr; std::unique_ptr m_info; std::unique_ptr m_line; std::unique_ptr m_apple_names_ap; std::unique_ptr m_apple_types_ap; std::unique_ptr m_apple_namespaces_ap; std::unique_ptr m_apple_objc_ap; std::unique_ptr m_global_aranges_ap; typedef std::unordered_map DebugMacrosMap; DebugMacrosMap m_debug_macros_map; ExternalTypeModuleMap m_external_type_modules; NameToDIE m_function_basename_index; // All concrete functions NameToDIE m_function_fullname_index; // All concrete functions NameToDIE m_function_method_index; // All inlined functions NameToDIE m_function_selector_index; // All method names for functions of classes NameToDIE m_objc_class_selectors_index; // Given a class name, find all // selectors for the class NameToDIE m_global_index; // Global and static variables NameToDIE m_type_index; // All type DIE offsets NameToDIE m_namespace_index; // All type DIE offsets bool m_indexed : 1, m_using_apple_tables : 1, m_fetched_external_modules : 1; lldb_private::LazyBool m_supports_DW_AT_APPLE_objc_complete_type; typedef std::shared_ptr> DIERefSetSP; typedef std::unordered_map NameToOffsetMap; NameToOffsetMap m_function_scope_qualified_name_map; std::unique_ptr m_ranges; UniqueDWARFASTTypeMap m_unique_ast_type_map; DIEToTypePtr m_die_to_type; DIEToVariableSP m_die_to_variable_sp; DIEToClangType m_forward_decl_die_to_clang_type; ClangTypeToDIE m_forward_decl_clang_type_to_die; }; #endif // SymbolFileDWARF_SymbolFileDWARF_h_ Index: vendor/lldb/dist/source/Symbol/ClangASTContext.cpp =================================================================== --- vendor/lldb/dist/source/Symbol/ClangASTContext.cpp (revision 317691) +++ vendor/lldb/dist/source/Symbol/ClangASTContext.cpp (revision 317692) @@ -1,10105 +1,10083 @@ //===-- ClangASTContext.cpp -------------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #include "lldb/Symbol/ClangASTContext.h" #include "llvm/Support/FormatAdapters.h" #include "llvm/Support/FormatVariadic.h" // C Includes // C++ Includes #include #include #include // Other libraries and framework includes // 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 #endif #include "clang/AST/ASTContext.h" #include "clang/AST/ASTImporter.h" #include "clang/AST/Attr.h" #include "clang/AST/CXXInheritance.h" #include "clang/AST/DeclObjC.h" #include "clang/AST/DeclTemplate.h" #include "clang/AST/Mangle.h" #include "clang/AST/RecordLayout.h" #include "clang/AST/Type.h" #include "clang/AST/VTableBuilder.h" #include "clang/Basic/Builtins.h" #include "clang/Basic/Diagnostic.h" #include "clang/Basic/FileManager.h" #include "clang/Basic/FileSystemOptions.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" #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 #endif #include "llvm/Support/Signals.h" #include "llvm/Support/Threading.h" #include "Plugins/ExpressionParser/Clang/ClangFunctionCaller.h" #include "Plugins/ExpressionParser/Clang/ClangUserExpression.h" #include "Plugins/ExpressionParser/Clang/ClangUtilityFunction.h" #include "lldb/Core/ArchSpec.h" #include "lldb/Utility/Flags.h" #include "lldb/Core/DumpDataExtractor.h" #include "lldb/Core/Module.h" #include "lldb/Core/PluginManager.h" #include "lldb/Core/Scalar.h" #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/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/ObjCLanguageRuntime.h" #include "lldb/Target/Process.h" #include "lldb/Target/Target.h" #include "lldb/Utility/DataExtractor.h" #include "lldb/Utility/LLDBAssert.h" #include "lldb/Utility/Log.h" #include "lldb/Utility/RegularExpression.h" #include "Plugins/SymbolFile/DWARF/DWARFASTParserClang.h" #include "Plugins/SymbolFile/PDB/PDBASTParser.h" #include #include using namespace lldb; using namespace lldb_private; using namespace llvm; using namespace clang; namespace { 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) || // Use Clang for Rust until there is a proper language plugin for it language == eLanguageTypeRust || language == eLanguageTypeExtRenderScript || // Use Clang for D until there is a proper language plugin for it language == eLanguageTypeD; } } typedef lldb_private::ThreadSafeDenseMap ClangASTMap; static ClangASTMap &GetASTMap() { static ClangASTMap *g_map_ptr = nullptr; static llvm::once_flag g_once_flag; llvm::call_once(g_once_flag, []() { g_map_ptr = new ClangASTMap(); // leaked on purpose to avoid spins }); return *g_map_ptr; } static bool IsOperator(const char *name, clang::OverloadedOperatorKind &op_kind) { if (name == nullptr || name[0] == '\0') return false; #define OPERATOR_PREFIX "operator" #define OPERATOR_PREFIX_LENGTH (sizeof(OPERATOR_PREFIX) - 1) const char *post_op_name = nullptr; bool no_space = true; if (::strncmp(name, OPERATOR_PREFIX, OPERATOR_PREFIX_LENGTH)) return false; post_op_name = name + OPERATOR_PREFIX_LENGTH; 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; } return true; } clang::AccessSpecifier ClangASTContext::ConvertAccessTypeToAccessSpecifier(AccessType access) { switch (access) { default: break; case eAccessNone: return AS_none; case eAccessPublic: return AS_public; case eAccessPrivate: return AS_private; case eAccessProtected: return AS_protected; } return AS_none; } static void ParseLangArgs(LangOptions &Opts, InputKind IK, const char *triple) { // FIXME: Cleanup per-file based stuff. // 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 == IK_Asm) { + if (IK.getLanguage() == InputKind::Asm) { Opts.AsmPreprocessor = 1; - } else if (IK == IK_ObjC || IK == IK_ObjCXX || IK == IK_PreprocessedObjC || - IK == IK_PreprocessedObjCXX) { + } else if (IK.isObjectiveC()) { Opts.ObjC1 = Opts.ObjC2 = 1; } LangStandard::Kind LangStd = LangStandard::lang_unspecified; if (LangStd == LangStandard::lang_unspecified) { // Based on the base language, pick one. - switch (IK) { - case IK_None: - case IK_AST: - case IK_LLVM_IR: - case IK_RenderScript: + switch (IK.getLanguage()) { + case InputKind::Unknown: + case InputKind::LLVM_IR: + case InputKind::RenderScript: llvm_unreachable("Invalid input kind!"); - case IK_OpenCL: - LangStd = LangStandard::lang_opencl; + case InputKind::OpenCL: + LangStd = LangStandard::lang_opencl10; break; - case IK_CUDA: - case IK_PreprocessedCuda: + case InputKind::CUDA: LangStd = LangStandard::lang_cuda; break; - case IK_Asm: - case IK_C: - case IK_PreprocessedC: - case IK_ObjC: - case IK_PreprocessedObjC: + case InputKind::Asm: + case InputKind::C: + case InputKind::ObjC: LangStd = LangStandard::lang_gnu99; break; - case IK_CXX: - case IK_PreprocessedCXX: - case IK_ObjCXX: - case IK_PreprocessedObjCXX: + case InputKind::CXX: + case InputKind::ObjCXX: LangStd = LangStandard::lang_gnucxx98; break; } } const LangStandard &Std = LangStandard::getLangStandardForKind(LangStd); Opts.LineComment = Std.hasLineComments(); Opts.C99 = Std.isC99(); Opts.CPlusPlus = Std.isCPlusPlus(); Opts.CPlusPlus11 = Std.isCPlusPlus11(); Opts.Digraphs = Std.hasDigraphs(); Opts.GNUMode = Std.isGNUMode(); Opts.GNUInline = !Std.isC99(); Opts.HexFloats = Std.hasHexFloats(); Opts.ImplicitInt = Std.hasImplicitInt(); Opts.WChar = true; // OpenCL has some additional defaults. - if (LangStd == LangStandard::lang_opencl) { + if (LangStd == LangStandard::lang_opencl10) { Opts.OpenCL = 1; Opts.AltiVec = 1; Opts.CXXOperatorNames = 1; Opts.LaxVectorConversions = 1; } // OpenCL and C++ both have bool, true, false keywords. Opts.Bool = Opts.OpenCL || Opts.CPlusPlus; // if (Opts.CPlusPlus) // Opts.CXXOperatorNames = !Args.hasArg(OPT_fno_operator_names); // // if (Args.hasArg(OPT_fobjc_gc_only)) // Opts.setGCMode(LangOptions::GCOnly); // else if (Args.hasArg(OPT_fobjc_gc)) // Opts.setGCMode(LangOptions::HybridGC); // // if (Args.hasArg(OPT_print_ivar_layout)) // Opts.ObjCGCBitmapPrint = 1; // // if (Args.hasArg(OPT_faltivec)) // Opts.AltiVec = 1; // // if (Args.hasArg(OPT_pthread)) // Opts.POSIXThreads = 1; // // llvm::StringRef Vis = getLastArgValue(Args, OPT_fvisibility, // "default"); // if (Vis == "default") Opts.setValueVisibilityMode(DefaultVisibility); // else if (Vis == "hidden") // Opts.setVisibilityMode(LangOptions::Hidden); // else if (Vis == "protected") // Opts.setVisibilityMode(LangOptions::Protected); // else // Diags.Report(diag::err_drv_invalid_value) // << Args.getLastArg(OPT_fvisibility)->getAsString(Args) << Vis; // Opts.OverflowChecking = Args.hasArg(OPT_ftrapv); // Mimicing gcc's behavior, trigraphs are only enabled if -trigraphs // is specified, or -std is set to a conforming mode. Opts.Trigraphs = !Opts.GNUMode; // if (Args.hasArg(OPT_trigraphs)) // Opts.Trigraphs = 1; // // Opts.DollarIdents = Args.hasFlag(OPT_fdollars_in_identifiers, // OPT_fno_dollars_in_identifiers, // !Opts.AsmPreprocessor); // Opts.PascalStrings = Args.hasArg(OPT_fpascal_strings); // Opts.Microsoft = Args.hasArg(OPT_fms_extensions); // Opts.WritableStrings = Args.hasArg(OPT_fwritable_strings); // if (Args.hasArg(OPT_fno_lax_vector_conversions)) // Opts.LaxVectorConversions = 0; // Opts.Exceptions = Args.hasArg(OPT_fexceptions); // Opts.RTTI = !Args.hasArg(OPT_fno_rtti); // Opts.Blocks = Args.hasArg(OPT_fblocks); Opts.CharIsSigned = ArchSpec(triple).CharIsSignedByDefault(); // Opts.ShortWChar = Args.hasArg(OPT_fshort_wchar); // Opts.Freestanding = Args.hasArg(OPT_ffreestanding); // Opts.NoBuiltin = Args.hasArg(OPT_fno_builtin) || Opts.Freestanding; // Opts.AssumeSaneOperatorNew = // !Args.hasArg(OPT_fno_assume_sane_operator_new); // Opts.HeinousExtensions = Args.hasArg(OPT_fheinous_gnu_extensions); // Opts.AccessControl = Args.hasArg(OPT_faccess_control); // Opts.ElideConstructors = !Args.hasArg(OPT_fno_elide_constructors); // Opts.MathErrno = !Args.hasArg(OPT_fno_math_errno); // Opts.InstantiationDepth = getLastArgIntValue(Args, OPT_ftemplate_depth, // 99, // Diags); // Opts.NeXTRuntime = !Args.hasArg(OPT_fgnu_runtime); // Opts.ObjCConstantStringClass = getLastArgValue(Args, // OPT_fconstant_string_class); // Opts.ObjCNonFragileABI = Args.hasArg(OPT_fobjc_nonfragile_abi); // Opts.CatchUndefined = Args.hasArg(OPT_fcatch_undefined_behavior); // Opts.EmitAllDecls = Args.hasArg(OPT_femit_all_decls); // Opts.PICLevel = getLastArgIntValue(Args, OPT_pic_level, 0, Diags); // Opts.Static = Args.hasArg(OPT_static_define); Opts.OptimizeSize = 0; // FIXME: Eliminate this dependency. // unsigned Opt = // Args.hasArg(OPT_Os) ? 2 : getLastArgIntValue(Args, OPT_O, 0, Diags); // Opts.Optimize = Opt != 0; unsigned Opt = 0; // This is the __NO_INLINE__ define, which just depends on things like the // optimization level and -fno-inline, not actually whether the backend has // inlining enabled. // // FIXME: This is affected by other options (-fno-inline). Opts.NoInlineDefine = !Opt; // unsigned SSP = getLastArgIntValue(Args, OPT_stack_protector, 0, Diags); // switch (SSP) { // default: // Diags.Report(diag::err_drv_invalid_value) // << Args.getLastArg(OPT_stack_protector)->getAsString(Args) << // SSP; // break; // case 0: Opts.setStackProtectorMode(LangOptions::SSPOff); break; // case 1: Opts.setStackProtectorMode(LangOptions::SSPOn); break; // case 2: Opts.setStackProtectorMode(LangOptions::SSPReq); break; // } } ClangASTContext::ClangASTContext(const char *target_triple) : TypeSystem(TypeSystem::eKindClang), m_target_triple(), m_ast_ap(), m_language_options_ap(), m_source_manager_ap(), m_diagnostics_engine_ap(), m_target_options_rp(), m_target_info_ap(), m_identifier_table_ap(), m_selector_table_ap(), m_builtins_ap(), 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); } //---------------------------------------------------------------------- // Destructor //---------------------------------------------------------------------- ClangASTContext::~ClangASTContext() { Finalize(); } ConstString ClangASTContext::GetPluginNameStatic() { return ConstString("clang"); } ConstString ClangASTContext::GetPluginName() { return ClangASTContext::GetPluginNameStatic(); } uint32_t ClangASTContext::GetPluginVersion() { return 1; } 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 (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 (module) { std::shared_ptr ast_sp(new ClangASTContext); if (ast_sp) { ast_sp->SetArchitecture(fixed_arch); } return ast_sp; } else if (target && target->IsValid()) { std::shared_ptr ast_sp( new ClangASTContextForExpressions(*target)); if (ast_sp) { ast_sp->SetArchitecture(fixed_arch); ast_sp->m_scratch_ast_source_ap.reset( new ClangASTSource(target->shared_from_this())); ast_sp->m_scratch_ast_source_ap->InstallASTContext( ast_sp->getASTContext()); llvm::IntrusiveRefCntPtr proxy_ast_source( ast_sp->m_scratch_ast_source_ap->CreateProxy()); ast_sp->SetExternalSource(proxy_ast_source); return ast_sp; } } } } return lldb::TypeSystemSP(); } void ClangASTContext::EnumerateSupportedLanguages( std::set &languages_for_types, std::set &languages_for_expressions) { static std::vector 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}); static std::vector 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()); } void ClangASTContext::Initialize() { PluginManager::RegisterPlugin(GetPluginNameStatic(), "clang base AST context plug-in", CreateInstance, EnumerateSupportedLanguages); } void ClangASTContext::Terminate() { PluginManager::UnregisterPlugin(CreateInstance); } void ClangASTContext::Finalize() { if (m_ast_ap.get()) { GetASTMap().Erase(m_ast_ap.get()); if (!m_ast_owned) m_ast_ap.release(); } m_builtins_ap.reset(); m_selector_table_ap.reset(); m_identifier_table_ap.reset(); m_target_info_ap.reset(); m_target_options_rp.reset(); m_diagnostics_engine_ap.reset(); m_source_manager_ap.reset(); m_language_options_ap.reset(); m_ast_ap.reset(); m_scratch_ast_source_ap.reset(); } void ClangASTContext::Clear() { m_ast_ap.reset(); m_language_options_ap.reset(); m_source_manager_ap.reset(); m_diagnostics_engine_ap.reset(); m_target_options_rp.reset(); m_target_info_ap.reset(); m_identifier_table_ap.reset(); m_selector_table_ap.reset(); m_builtins_ap.reset(); m_pointer_byte_size = 0; } const char *ClangASTContext::GetTargetTriple() { 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::SetExternalSource( llvm::IntrusiveRefCntPtr &ast_source_ap) { ASTContext *ast = getASTContext(); if (ast) { ast->setExternalSource(ast_source_ap); ast->getTranslationUnitDecl()->setHasExternalLexicalStorage(true); // ast->getTranslationUnitDecl()->setHasExternalVisibleStorage(true); } } void ClangASTContext::RemoveExternalSource() { ASTContext *ast = getASTContext(); if (ast) { llvm::IntrusiveRefCntPtr empty_ast_source_ap; ast->setExternalSource(empty_ast_source_ap); ast->getTranslationUnitDecl()->setHasExternalLexicalStorage(false); // ast->getTranslationUnitDecl()->setHasExternalVisibleStorage(false); } } void ClangASTContext::setASTContext(clang::ASTContext *ast_ctx) { if (!m_ast_owned) { m_ast_ap.release(); } m_ast_owned = false; m_ast_ap.reset(ast_ctx); GetASTMap().Insert(ast_ctx, this); } ASTContext *ClangASTContext::getASTContext() { if (m_ast_ap.get() == nullptr) { m_ast_owned = true; m_ast_ap.reset(new ASTContext(*getLanguageOptions(), *getSourceManager(), *getIdentifierTable(), *getSelectorTable(), *getBuiltinContext())); m_ast_ap->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_ap->InitBuiltinTypes(*target_info); if ((m_callback_tag_decl || m_callback_objc_decl) && m_callback_baton) { m_ast_ap->getTranslationUnitDecl()->setHasExternalLexicalStorage(); // m_ast_ap->getTranslationUnitDecl()->setHasExternalVisibleStorage(); } GetASTMap().Insert(m_ast_ap.get(), this); llvm::IntrusiveRefCntPtr ast_source_ap( new ClangExternalASTSourceCallbacks( ClangASTContext::CompleteTagDecl, ClangASTContext::CompleteObjCInterfaceDecl, nullptr, ClangASTContext::LayoutRecordType, this)); SetExternalSource(ast_source_ap); } return m_ast_ap.get(); } ClangASTContext *ClangASTContext::GetASTContext(clang::ASTContext *ast) { ClangASTContext *clang_ast = GetASTMap().Lookup(ast); return clang_ast; } Builtin::Context *ClangASTContext::getBuiltinContext() { if (m_builtins_ap.get() == nullptr) m_builtins_ap.reset(new Builtin::Context()); return m_builtins_ap.get(); } IdentifierTable *ClangASTContext::getIdentifierTable() { if (m_identifier_table_ap.get() == nullptr) m_identifier_table_ap.reset( new IdentifierTable(*ClangASTContext::getLanguageOptions(), nullptr)); return m_identifier_table_ap.get(); } LangOptions *ClangASTContext::getLanguageOptions() { if (m_language_options_ap.get() == nullptr) { m_language_options_ap.reset(new LangOptions()); - ParseLangArgs(*m_language_options_ap, IK_ObjCXX, GetTargetTriple()); - // InitializeLangOptions(*m_language_options_ap, IK_ObjCXX); + ParseLangArgs(*m_language_options_ap, InputKind::ObjCXX, GetTargetTriple()); + // InitializeLangOptions(*m_language_options_ap, InputKind::ObjCXX); } return m_language_options_ap.get(); } SelectorTable *ClangASTContext::getSelectorTable() { if (m_selector_table_ap.get() == nullptr) m_selector_table_ap.reset(new SelectorTable()); return m_selector_table_ap.get(); } clang::FileManager *ClangASTContext::getFileManager() { if (m_file_manager_ap.get() == nullptr) { clang::FileSystemOptions file_system_options; m_file_manager_ap.reset(new clang::FileManager(file_system_options)); } return m_file_manager_ap.get(); } clang::SourceManager *ClangASTContext::getSourceManager() { if (m_source_manager_ap.get() == nullptr) m_source_manager_ap.reset( new clang::SourceManager(*getDiagnosticsEngine(), *getFileManager())); return m_source_manager_ap.get(); } clang::DiagnosticsEngine *ClangASTContext::getDiagnosticsEngine() { if (m_diagnostics_engine_ap.get() == nullptr) { llvm::IntrusiveRefCntPtr diag_id_sp(new DiagnosticIDs()); m_diagnostics_engine_ap.reset( new DiagnosticsEngine(diag_id_sp, new DiagnosticOptions())); } return m_diagnostics_engine_ap.get(); } clang::MangleContext *ClangASTContext::getMangleContext() { if (m_mangle_ctx_ap.get() == nullptr) m_mangle_ctx_ap.reset(getASTContext()->createMangleContext()); return m_mangle_ctx_ap.get(); } class NullDiagnosticConsumer : public DiagnosticConsumer { public: NullDiagnosticConsumer() { m_log = lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS); } void HandleDiagnostic(DiagnosticsEngine::Level DiagLevel, const clang::Diagnostic &info) { if (m_log) { llvm::SmallVector diag_str(10); info.FormatDiagnostic(diag_str); diag_str.push_back('\0'); m_log->Printf("Compiler diagnostic: %s\n", diag_str.data()); } } DiagnosticConsumer *clone(DiagnosticsEngine &Diags) const { return new NullDiagnosticConsumer(); } private: Log *m_log; }; DiagnosticConsumer *ClangASTContext::getDiagnosticConsumer() { if (m_diagnostic_consumer_ap.get() == nullptr) m_diagnostic_consumer_ap.reset(new NullDiagnosticConsumer); return m_diagnostic_consumer_ap.get(); } std::shared_ptr &ClangASTContext::getTargetOptions() { if (m_target_options_rp.get() == nullptr && !m_target_triple.empty()) { m_target_options_rp = std::make_shared(); if (m_target_options_rp.get() != nullptr) m_target_options_rp->Triple = m_target_triple; } return m_target_options_rp; } TargetInfo *ClangASTContext::getTargetInfo() { // target_triple should be something like "x86_64-apple-macosx" if (m_target_info_ap.get() == nullptr && !m_target_triple.empty()) m_target_info_ap.reset(TargetInfo::CreateTargetInfo(*getDiagnosticsEngine(), getTargetOptions())); return m_target_info_ap.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); if (qual_type_bit_size == bit_size) return true; return false; } 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(); switch (encoding) { case eEncodingInvalid: if (QualTypeMatchesBitSize(bit_size, ast, ast->VoidPtrTy)) return CompilerType(ast, 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); 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); 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); 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)); break; } return CompilerType(); } lldb::BasicType ClangASTContext::GetBasicTypeEnumeration(const ConstString &name) { if (name) { typedef UniqueCStringMap TypeNameToBasicTypeMap; static TypeNameToBasicTypeMap g_type_map; static llvm::once_flag g_once_flag; llvm::call_once(g_once_flag, []() { // "void" - g_type_map.Append(ConstString("void").GetStringRef(), eBasicTypeVoid); + g_type_map.Append(ConstString("void"), eBasicTypeVoid); // "char" - g_type_map.Append(ConstString("char").GetStringRef(), eBasicTypeChar); - g_type_map.Append(ConstString("signed char").GetStringRef(), - eBasicTypeSignedChar); - g_type_map.Append(ConstString("unsigned char").GetStringRef(), - eBasicTypeUnsignedChar); - g_type_map.Append(ConstString("wchar_t").GetStringRef(), eBasicTypeWChar); - g_type_map.Append(ConstString("signed wchar_t").GetStringRef(), - eBasicTypeSignedWChar); - g_type_map.Append(ConstString("unsigned wchar_t").GetStringRef(), + g_type_map.Append(ConstString("char"), eBasicTypeChar); + g_type_map.Append(ConstString("signed char"), eBasicTypeSignedChar); + g_type_map.Append(ConstString("unsigned char"), eBasicTypeUnsignedChar); + g_type_map.Append(ConstString("wchar_t"), eBasicTypeWChar); + g_type_map.Append(ConstString("signed wchar_t"), eBasicTypeSignedWChar); + g_type_map.Append(ConstString("unsigned wchar_t"), eBasicTypeUnsignedWChar); // "short" - g_type_map.Append(ConstString("short").GetStringRef(), eBasicTypeShort); - g_type_map.Append(ConstString("short int").GetStringRef(), - eBasicTypeShort); - g_type_map.Append(ConstString("unsigned short").GetStringRef(), + g_type_map.Append(ConstString("short"), eBasicTypeShort); + g_type_map.Append(ConstString("short int"), eBasicTypeShort); + g_type_map.Append(ConstString("unsigned short"), eBasicTypeUnsignedShort); + g_type_map.Append(ConstString("unsigned short int"), eBasicTypeUnsignedShort); - g_type_map.Append(ConstString("unsigned short int").GetStringRef(), - eBasicTypeUnsignedShort); // "int" - g_type_map.Append(ConstString("int").GetStringRef(), eBasicTypeInt); - g_type_map.Append(ConstString("signed int").GetStringRef(), - eBasicTypeInt); - g_type_map.Append(ConstString("unsigned int").GetStringRef(), - eBasicTypeUnsignedInt); - g_type_map.Append(ConstString("unsigned").GetStringRef(), - eBasicTypeUnsignedInt); + g_type_map.Append(ConstString("int"), eBasicTypeInt); + g_type_map.Append(ConstString("signed int"), eBasicTypeInt); + g_type_map.Append(ConstString("unsigned int"), eBasicTypeUnsignedInt); + g_type_map.Append(ConstString("unsigned"), eBasicTypeUnsignedInt); // "long" - g_type_map.Append(ConstString("long").GetStringRef(), eBasicTypeLong); - g_type_map.Append(ConstString("long int").GetStringRef(), eBasicTypeLong); - g_type_map.Append(ConstString("unsigned long").GetStringRef(), + g_type_map.Append(ConstString("long"), eBasicTypeLong); + g_type_map.Append(ConstString("long int"), eBasicTypeLong); + g_type_map.Append(ConstString("unsigned long"), eBasicTypeUnsignedLong); + g_type_map.Append(ConstString("unsigned long int"), eBasicTypeUnsignedLong); - g_type_map.Append(ConstString("unsigned long int").GetStringRef(), - eBasicTypeUnsignedLong); // "long long" - g_type_map.Append(ConstString("long long").GetStringRef(), - eBasicTypeLongLong); - g_type_map.Append(ConstString("long long int").GetStringRef(), - eBasicTypeLongLong); - g_type_map.Append(ConstString("unsigned long long").GetStringRef(), + g_type_map.Append(ConstString("long long"), eBasicTypeLongLong); + g_type_map.Append(ConstString("long long int"), eBasicTypeLongLong); + g_type_map.Append(ConstString("unsigned long long"), eBasicTypeUnsignedLongLong); - g_type_map.Append(ConstString("unsigned long long int").GetStringRef(), + g_type_map.Append(ConstString("unsigned long long int"), eBasicTypeUnsignedLongLong); // "int128" - g_type_map.Append(ConstString("__int128_t").GetStringRef(), - eBasicTypeInt128); - g_type_map.Append(ConstString("__uint128_t").GetStringRef(), - eBasicTypeUnsignedInt128); + g_type_map.Append(ConstString("__int128_t"), eBasicTypeInt128); + g_type_map.Append(ConstString("__uint128_t"), eBasicTypeUnsignedInt128); // Miscellaneous - g_type_map.Append(ConstString("bool").GetStringRef(), eBasicTypeBool); - g_type_map.Append(ConstString("float").GetStringRef(), eBasicTypeFloat); - g_type_map.Append(ConstString("double").GetStringRef(), eBasicTypeDouble); - g_type_map.Append(ConstString("long double").GetStringRef(), - eBasicTypeLongDouble); - g_type_map.Append(ConstString("id").GetStringRef(), eBasicTypeObjCID); - g_type_map.Append(ConstString("SEL").GetStringRef(), eBasicTypeObjCSel); - g_type_map.Append(ConstString("nullptr").GetStringRef(), - eBasicTypeNullPtr); + g_type_map.Append(ConstString("bool"), eBasicTypeBool); + g_type_map.Append(ConstString("float"), eBasicTypeFloat); + g_type_map.Append(ConstString("double"), eBasicTypeDouble); + g_type_map.Append(ConstString("long double"), eBasicTypeLongDouble); + g_type_map.Append(ConstString("id"), eBasicTypeObjCID); + g_type_map.Append(ConstString("SEL"), eBasicTypeObjCSel); + g_type_map.Append(ConstString("nullptr"), eBasicTypeNullPtr); g_type_map.Sort(); }); - return g_type_map.Find(name.GetStringRef(), eBasicTypeInvalid); + return g_type_map.Find(name, eBasicTypeInvalid); } return eBasicTypeInvalid; } CompilerType ClangASTContext::GetBasicType(ASTContext *ast, const 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) m_pointer_byte_size = GetBasicType(lldb::eBasicTypeVoid) .GetPointerType() .GetByteSize(nullptr); return m_pointer_byte_size; } CompilerType ClangASTContext::GetBasicType(lldb::BasicType basic_type) { return GetBasicType(getASTContext(), basic_type); } CompilerType ClangASTContext::GetBasicType(ASTContext *ast, lldb::BasicType basic_type) { if (!ast) return CompilerType(); lldb::opaque_compiler_type_t clang_type = GetOpaqueCompilerType(ast, basic_type); if (clang_type) return CompilerType(GetASTContext(ast), clang_type); return CompilerType(); } CompilerType ClangASTContext::GetBuiltinTypeForDWARFEncodingAndBitSize( const char *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; case DW_ATE_address: if (QualTypeMatchesBitSize(bit_size, ast, ast->VoidPtrTy)) return CompilerType(ast, 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_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; } } // 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); } else { Host::SystemLog(Host::eSystemLogError, "error: need to add support for " "DW_TAG_base_type encoded with " "DW_ATE = 0x%x, bit_size = %u\n", dw_ate, bit_size); } 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); 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); return importer.Import(source_decl); } bool ClangASTContext::AreTypesSame(CompilerType type1, CompilerType type2, bool ignore_qualifiers) { ClangASTContext *ast = llvm::dyn_cast_or_null(type1.GetTypeSystem()); if (!ast || ast != type2.GetTypeSystem()) return false; if (type1.GetOpaqueQualType() == type2.GetOpaqueQualType()) return true; QualType type1_qual = ClangUtil::GetQualType(type1); QualType type2_qual = ClangUtil::GetQualType(type2); if (ignore_qualifiers) { type1_qual = type1_qual.getUnqualifiedType(); type2_qual = type2_qual.getUnqualifiedType(); } return ast->getASTContext()->hasSameType(type1_qual, type2_qual); } CompilerType ClangASTContext::GetTypeForDecl(clang::NamedDecl *decl) { if (clang::ObjCInterfaceDecl *interface_decl = llvm::dyn_cast(decl)) return GetTypeForDecl(interface_decl); if (clang::TagDecl *tag_decl = llvm::dyn_cast(decl)) return GetTypeForDecl(tag_decl); return CompilerType(); } 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(); } 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(); } #pragma mark Structure, Unions, Classes CompilerType ClangASTContext::CreateRecordType(DeclContext *decl_ctx, AccessType access_type, const char *name, int kind, LanguageType language, ClangASTMetadata *metadata) { ASTContext *ast = getASTContext(); assert(ast != nullptr); if (decl_ctx == nullptr) decl_ctx = ast->getTranslationUnitDecl(); if (language == eLanguageTypeObjC || language == eLanguageTypeObjC_plus_plus) { bool isForwardDecl = true; bool isInternal = false; return CreateObjCClass(name, decl_ctx, isForwardDecl, isInternal, metadata); } // NOTE: Eventually CXXRecordDecl will be merged back into RecordDecl and // we will need to update this code. I was told to currently always use // the CXXRecordDecl class since we often don't know from debug information // if 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]); CXXRecordDecl *decl = CXXRecordDecl::Create( *ast, (TagDecl::TagKind)kind, decl_ctx, SourceLocation(), SourceLocation(), is_anonymous ? nullptr : &ast->Idents.get(name)); if (is_anonymous) decl->setAnonymousStructOrUnion(true); if (decl) { if (metadata) SetMetadata(ast, decl, *metadata); if (access_type != eAccessNone) decl->setAccess(ConvertAccessTypeToAccessSpecifier(access_type)); if (decl_ctx) decl_ctx->addDecl(decl); return CompilerType(ast, ast->getTagDeclType(decl)); } return CompilerType(); } static TemplateParameterList *CreateTemplateParameterList( ASTContext *ast, const ClangASTContext::TemplateParameterInfos &template_param_infos, llvm::SmallVector &template_param_decls) { const bool parameter_pack = false; const bool is_typename = false; const unsigned depth = 0; const size_t num_template_params = template_param_infos.GetSize(); for (size_t i = 0; i < num_template_params; ++i) { const char *name = template_param_infos.names[i]; IdentifierInfo *identifier_info = nullptr; if (name && name[0]) identifier_info = &ast->Idents.get(name); if (template_param_infos.args[i].getKind() == TemplateArgument::Integral) { template_param_decls.push_back(NonTypeTemplateParmDecl::Create( *ast, ast->getTranslationUnitDecl(), // Is this the right decl context?, // SourceLocation StartLoc, SourceLocation(), SourceLocation(), depth, i, identifier_info, template_param_infos.args[i].getIntegralType(), parameter_pack, nullptr)); } else { template_param_decls.push_back(TemplateTypeParmDecl::Create( *ast, ast->getTranslationUnitDecl(), // Is this the right decl context? SourceLocation(), SourceLocation(), depth, i, identifier_info, is_typename, parameter_pack)); } } clang::Expr *const requires_clause = nullptr; // TODO: Concepts TemplateParameterList *template_param_list = TemplateParameterList::Create( *ast, SourceLocation(), SourceLocation(), template_param_decls, SourceLocation(), requires_clause); return template_param_list; } clang::FunctionTemplateDecl *ClangASTContext::CreateFunctionTemplateDecl( clang::DeclContext *decl_ctx, clang::FunctionDecl *func_decl, const char *name, const TemplateParameterInfos &template_param_infos) { // /// \brief Create a function template node. ASTContext *ast = getASTContext(); llvm::SmallVector template_param_decls; TemplateParameterList *template_param_list = CreateTemplateParameterList( ast, template_param_infos, template_param_decls); FunctionTemplateDecl *func_tmpl_decl = FunctionTemplateDecl::Create( *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(); i < template_param_decl_count; ++i) { // TODO: verify which decl context we should put template_param_decls into.. template_param_decls[i]->setDeclContext(func_decl); } return func_tmpl_decl; } void ClangASTContext::CreateFunctionTemplateSpecializationInfo( FunctionDecl *func_decl, clang::FunctionTemplateDecl *func_tmpl_decl, const TemplateParameterInfos &infos) { TemplateArgumentList template_args(TemplateArgumentList::OnStack, infos.args); func_decl->setFunctionTemplateSpecialization(func_tmpl_decl, &template_args, nullptr); } ClassTemplateDecl *ClangASTContext::CreateClassTemplateDecl( DeclContext *decl_ctx, lldb::AccessType access_type, const char *class_name, int kind, const TemplateParameterInfos &template_param_infos) { ASTContext *ast = getASTContext(); ClassTemplateDecl *class_template_decl = nullptr; if (decl_ctx == nullptr) decl_ctx = ast->getTranslationUnitDecl(); IdentifierInfo &identifier_info = ast->Idents.get(class_name); DeclarationName decl_name(&identifier_info); clang::DeclContext::lookup_result result = decl_ctx->lookup(decl_name); for (NamedDecl *decl : result) { class_template_decl = dyn_cast(decl); if (class_template_decl) return class_template_decl; } llvm::SmallVector template_param_decls; TemplateParameterList *template_param_list = CreateTemplateParameterList( ast, template_param_infos, template_param_decls); CXXRecordDecl *template_cxx_decl = CXXRecordDecl::Create( *ast, (TagDecl::TagKind)kind, decl_ctx, // What decl context do we use here? TU? The actual decl // context? SourceLocation(), SourceLocation(), &identifier_info); for (size_t i = 0, template_param_decl_count = template_param_decls.size(); i < template_param_decl_count; ++i) { template_param_decls[i]->setDeclContext(template_cxx_decl); } // With templated classes, we say that a class is templated with // specializations, but that the bare class has no functions. // template_cxx_decl->startDefinition(); // template_cxx_decl->completeDefinition(); class_template_decl = ClassTemplateDecl::Create( *ast, decl_ctx, // What decl context do we use here? TU? The actual decl // context? SourceLocation(), decl_name, template_param_list, template_cxx_decl); if (class_template_decl) { if (access_type != eAccessNone) class_template_decl->setAccess( ConvertAccessTypeToAccessSpecifier(access_type)); // if (TagDecl *ctx_tag_decl = dyn_cast(decl_ctx)) // CompleteTagDeclarationDefinition(GetTypeForDecl(ctx_tag_decl)); decl_ctx->addDecl(class_template_decl); #ifdef LLDB_CONFIGURATION_DEBUG VerifyDecl(class_template_decl); #endif } return class_template_decl; } ClassTemplateSpecializationDecl * ClangASTContext::CreateClassTemplateSpecializationDecl( DeclContext *decl_ctx, ClassTemplateDecl *class_template_decl, int kind, const TemplateParameterInfos &template_param_infos) { ASTContext *ast = getASTContext(); ClassTemplateSpecializationDecl *class_template_specialization_decl = ClassTemplateSpecializationDecl::Create( *ast, (TagDecl::TagKind)kind, decl_ctx, SourceLocation(), SourceLocation(), class_template_decl, template_param_infos.args, nullptr); class_template_specialization_decl->setSpecializationKind( TSK_ExplicitSpecialization); return class_template_specialization_decl; } 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)); } return CompilerType(); } static inline bool check_op_param(bool is_method, clang::OverloadedOperatorKind op_kind, bool unary, bool binary, uint32_t num_params) { // Special-case call since it can take any number of operands if (op_kind == OO_Call) return true; // The parameter count doesn't include "this" if (is_method) ++num_params; if (num_params == 1) return unary; if (num_params == 2) return binary; else return false; } bool ClangASTContext::CheckOverloadedOperatorKindParameterCount( bool is_method, clang::OverloadedOperatorKind op_kind, uint32_t num_params) { switch (op_kind) { default: break; // C++ standard allows any number of arguments to new/delete case OO_New: case OO_Array_New: case OO_Delete: case OO_Array_Delete: return true; } #define OVERLOADED_OPERATOR(Name, Spelling, Token, Unary, Binary, MemberOnly) \ case OO_##Name: \ return check_op_param(is_method, op_kind, Unary, Binary, num_params); switch (op_kind) { #include "clang/Basic/OperatorKinds.def" default: break; } return false; } clang::AccessSpecifier ClangASTContext::UnifyAccessSpecifiers(clang::AccessSpecifier lhs, clang::AccessSpecifier rhs) { // Make the access equal to the stricter of the field and the nested field's // access if (lhs == AS_none || rhs == AS_none) return AS_none; if (lhs == AS_private || rhs == AS_private) return AS_private; if (lhs == AS_protected || rhs == AS_protected) return AS_protected; return AS_public; } 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) 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)) { bitfield_bit_size = bit_width_apsint.getLimitedValue(UINT32_MAX); return true; } } } return false; } bool ClangASTContext::RecordHasFields(const RecordDecl *record_decl) { if (record_decl == nullptr) return false; if (!record_decl->field_empty()) return true; // No fields, lets check this is a CXX record and check the base classes const CXXRecordDecl *cxx_record_decl = dyn_cast(record_decl); if (cxx_record_decl) { CXXRecordDecl::base_class_const_iterator base_class, base_class_end; for (base_class = cxx_record_decl->bases_begin(), base_class_end = cxx_record_decl->bases_end(); base_class != base_class_end; ++base_class) { const CXXRecordDecl *base_class_decl = cast( base_class->getType()->getAs()->getDecl()); if (RecordHasFields(base_class_decl)) return true; } } return false; } #pragma mark Objective C Classes CompilerType ClangASTContext::CreateObjCClass(const char *name, DeclContext *decl_ctx, bool isForwardDecl, bool isInternal, ClangASTMetadata *metadata) { ASTContext *ast = getASTContext(); assert(ast != nullptr); assert(name && name[0]); if (decl_ctx == nullptr) decl_ctx = ast->getTranslationUnitDecl(); ObjCInterfaceDecl *decl = ObjCInterfaceDecl::Create( *ast, decl_ctx, SourceLocation(), &ast->Idents.get(name), nullptr, nullptr, SourceLocation(), /*isForwardDecl,*/ isInternal); if (decl && metadata) SetMetadata(ast, decl, *metadata); return CompilerType(ast, ast->getObjCInterfaceType(decl)); } static inline bool BaseSpecifierIsEmpty(const CXXBaseSpecifier *b) { return ClangASTContext::RecordHasFields(b->getType()->getAsCXXRecordDecl()) == false; } uint32_t ClangASTContext::GetNumBaseClasses(const CXXRecordDecl *cxx_record_decl, bool omit_empty_base_classes) { uint32_t num_bases = 0; if (cxx_record_decl) { if (omit_empty_base_classes) { CXXRecordDecl::base_class_const_iterator base_class, base_class_end; for (base_class = cxx_record_decl->bases_begin(), base_class_end = cxx_record_decl->bases_end(); base_class != base_class_end; ++base_class) { // Skip empty base classes if (omit_empty_base_classes) { if (BaseSpecifierIsEmpty(base_class)) continue; } ++num_bases; } } else num_bases = cxx_record_decl->getNumBases(); } return num_bases; } #pragma mark Namespace Declarations NamespaceDecl * ClangASTContext::GetUniqueNamespaceDeclaration(const char *name, DeclContext *decl_ctx) { NamespaceDecl *namespace_decl = nullptr; 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); DeclarationName decl_name(&identifier_info); clang::DeclContext::lookup_result result = decl_ctx->lookup(decl_name); for (NamedDecl *decl : result) { namespace_decl = dyn_cast(decl); if (namespace_decl) return namespace_decl; } namespace_decl = NamespaceDecl::Create(*ast, decl_ctx, false, SourceLocation(), SourceLocation(), &identifier_info, nullptr); decl_ctx->addDecl(namespace_decl); } else { if (decl_ctx == translation_unit_decl) { namespace_decl = translation_unit_decl->getAnonymousNamespace(); if (namespace_decl) return namespace_decl; namespace_decl = NamespaceDecl::Create(*ast, decl_ctx, false, SourceLocation(), SourceLocation(), nullptr, nullptr); translation_unit_decl->setAnonymousNamespace(namespace_decl); translation_unit_decl->addDecl(namespace_decl); assert(namespace_decl == translation_unit_decl->getAnonymousNamespace()); } else { NamespaceDecl *parent_namespace_decl = cast(decl_ctx); if (parent_namespace_decl) { namespace_decl = parent_namespace_decl->getAnonymousNamespace(); if (namespace_decl) return namespace_decl; namespace_decl = NamespaceDecl::Create(*ast, decl_ctx, false, SourceLocation(), SourceLocation(), nullptr, nullptr); parent_namespace_decl->setAnonymousNamespace(namespace_decl); parent_namespace_decl->addDecl(namespace_decl); assert(namespace_decl == parent_namespace_decl->getAnonymousNamespace()); } else { // BAD!!! } } } #ifdef LLDB_CONFIGURATION_DEBUG VerifyDecl(namespace_decl); #endif return namespace_decl; } NamespaceDecl *ClangASTContext::GetUniqueNamespaceDeclaration( clang::ASTContext *ast, const char *name, clang::DeclContext *decl_ctx) { ClangASTContext *ast_ctx = ClangASTContext::GetASTContext(ast); if (ast_ctx == nullptr) return nullptr; return ast_ctx->GetUniqueNamespaceDeclaration(name, decl_ctx); } clang::BlockDecl * ClangASTContext::CreateBlockDeclaration(clang::DeclContext *ctx) { if (ctx != nullptr) { clang::BlockDecl *decl = clang::BlockDecl::Create(*getASTContext(), ctx, clang::SourceLocation()); ctx->addDecl(decl); return decl; } return nullptr; } clang::DeclContext *FindLCABetweenDecls(clang::DeclContext *left, clang::DeclContext *right, clang::DeclContext *root) { if (root == nullptr) return nullptr; std::set path_left; for (clang::DeclContext *d = left; d != nullptr; d = d->getParent()) path_left.insert(d); for (clang::DeclContext *d = right; d != nullptr; d = d->getParent()) if (path_left.find(d) != path_left.end()) return d; return nullptr; } 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()); clang::UsingDirectiveDecl *using_decl = clang::UsingDirectiveDecl::Create( *getASTContext(), decl_ctx, clang::SourceLocation(), clang::SourceLocation(), clang::NestedNameSpecifierLoc(), clang::SourceLocation(), ns_decl, FindLCABetweenDecls(decl_ctx, ns_decl, translation_unit)); decl_ctx->addDecl(using_decl); return using_decl; } return nullptr; } clang::UsingDecl * ClangASTContext::CreateUsingDeclaration(clang::DeclContext *current_decl_ctx, clang::NamedDecl *target) { if (current_decl_ctx != nullptr && target != nullptr) { clang::UsingDecl *using_decl = clang::UsingDecl::Create( *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, target); using_decl->addShadowDecl(shadow_decl); current_decl_ctx->addDecl(using_decl); return using_decl; } return nullptr; } clang::VarDecl *ClangASTContext::CreateVariableDeclaration( 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(), clang::SourceLocation(), name && name[0] ? &getASTContext()->Idents.getOwn(name) : nullptr, type, nullptr, clang::SC_None); var_decl->setAccess(clang::AS_public); decl_context->addDecl(var_decl); return var_decl; } return nullptr; } lldb::opaque_compiler_type_t ClangASTContext::GetOpaqueCompilerType(clang::ASTContext *ast, lldb::BasicType basic_type) { switch (basic_type) { case eBasicTypeVoid: return ast->VoidTy.getAsOpaquePtr(); case eBasicTypeChar: return ast->CharTy.getAsOpaquePtr(); case eBasicTypeSignedChar: return ast->SignedCharTy.getAsOpaquePtr(); case eBasicTypeUnsignedChar: return ast->UnsignedCharTy.getAsOpaquePtr(); case eBasicTypeWChar: return ast->getWCharType().getAsOpaquePtr(); case eBasicTypeSignedWChar: return ast->getSignedWCharType().getAsOpaquePtr(); case eBasicTypeUnsignedWChar: return ast->getUnsignedWCharType().getAsOpaquePtr(); case eBasicTypeChar16: return ast->Char16Ty.getAsOpaquePtr(); case eBasicTypeChar32: return ast->Char32Ty.getAsOpaquePtr(); case eBasicTypeShort: return ast->ShortTy.getAsOpaquePtr(); case eBasicTypeUnsignedShort: return ast->UnsignedShortTy.getAsOpaquePtr(); case eBasicTypeInt: return ast->IntTy.getAsOpaquePtr(); case eBasicTypeUnsignedInt: return ast->UnsignedIntTy.getAsOpaquePtr(); case eBasicTypeLong: return ast->LongTy.getAsOpaquePtr(); case eBasicTypeUnsignedLong: return ast->UnsignedLongTy.getAsOpaquePtr(); case eBasicTypeLongLong: return ast->LongLongTy.getAsOpaquePtr(); case eBasicTypeUnsignedLongLong: return ast->UnsignedLongLongTy.getAsOpaquePtr(); case eBasicTypeInt128: return ast->Int128Ty.getAsOpaquePtr(); case eBasicTypeUnsignedInt128: return ast->UnsignedInt128Ty.getAsOpaquePtr(); case eBasicTypeBool: return ast->BoolTy.getAsOpaquePtr(); case eBasicTypeHalf: return ast->HalfTy.getAsOpaquePtr(); case eBasicTypeFloat: return ast->FloatTy.getAsOpaquePtr(); case eBasicTypeDouble: return ast->DoubleTy.getAsOpaquePtr(); case eBasicTypeLongDouble: return ast->LongDoubleTy.getAsOpaquePtr(); case eBasicTypeFloatComplex: return ast->FloatComplexTy.getAsOpaquePtr(); case eBasicTypeDoubleComplex: return ast->DoubleComplexTy.getAsOpaquePtr(); case eBasicTypeLongDoubleComplex: return ast->LongDoubleComplexTy.getAsOpaquePtr(); case eBasicTypeObjCID: return ast->getObjCIdType().getAsOpaquePtr(); case eBasicTypeObjCClass: return ast->getObjCClassType().getAsOpaquePtr(); case eBasicTypeObjCSel: return ast->getObjCSelType().getAsOpaquePtr(); case eBasicTypeNullPtr: return ast->NullPtrTy.getAsOpaquePtr(); default: return nullptr; } } #pragma mark Function Types clang::DeclarationName ClangASTContext::GetDeclarationName(const char *name, const CompilerType &function_clang_type) { if (!name || !name[0]) return clang::DeclarationName(); clang::OverloadedOperatorKind op_kind = clang::NUM_OVERLOADED_OPERATORS; if (!IsOperator(name, op_kind) || op_kind == clang::NUM_OVERLOADED_OPERATORS) return DeclarationName(&getASTContext()->Idents.get( name)); // Not operator, but a regular function. // Check the number of operator parameters. Sometimes we have // seen bad DWARF that doesn't correctly describe operators and // if we try to create a method and add it to the class, clang // will assert and crash, so we need to make sure things are // acceptable. clang::QualType method_qual_type(ClangUtil::GetQualType(function_clang_type)); const clang::FunctionProtoType *function_type = llvm::dyn_cast(method_qual_type.getTypePtr()); if (function_type == nullptr) return clang::DeclarationName(); const bool is_method = false; const unsigned int num_params = function_type->getNumParams(); if (!ClangASTContext::CheckOverloadedOperatorKindParameterCount( is_method, op_kind, num_params)) return clang::DeclarationName(); 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(); if (decl_ctx == nullptr) decl_ctx = ast->getTranslationUnitDecl(); const bool hasWrittenPrototype = true; const bool isConstexprSpecified = false; clang::DeclarationName declarationName = GetDeclarationName(name, function_clang_type); func_decl = FunctionDecl::Create( *ast, decl_ctx, SourceLocation(), SourceLocation(), declarationName, ClangUtil::GetQualType(function_clang_type), nullptr, (clang::StorageClass)storage, is_inline, hasWrittenPrototype, isConstexprSpecified); if (func_decl) decl_ctx->addDecl(func_decl); #ifdef LLDB_CONFIGURATION_DEBUG VerifyDecl(func_decl); #endif return func_decl; } CompilerType ClangASTContext::CreateFunctionType( ASTContext *ast, const CompilerType &result_type, const CompilerType *args, unsigned num_args, bool is_variadic, unsigned type_quals) { if (ast == nullptr) return CompilerType(); // invalid AST if (!result_type || !ClangUtil::IsClangType(result_type)) return CompilerType(); // invalid return type std::vector qual_type_args; if (num_args > 0 && args == nullptr) return CompilerType(); // invalid argument array passed in // Verify that all arguments are valid and the right type for (unsigned i = 0; i < num_args; ++i) { if (args[i]) { // Make sure we have a clang type in args[i] and not a type from another // language whose name might match const bool is_clang_type = ClangUtil::IsClangType(args[i]); lldbassert(is_clang_type); if (is_clang_type) qual_type_args.push_back(ClangUtil::GetQualType(args[i])); else return CompilerType(); // invalid argument type (must be a clang type) } else return CompilerType(); // invalid argument type (empty) } // TODO: Detect calling convention in DWARF? FunctionProtoType::ExtProtoInfo proto_info; proto_info.Variadic = is_variadic; proto_info.ExceptionSpec = EST_None; proto_info.TypeQuals = type_quals; proto_info.RefQualifier = RQ_None; return CompilerType(ast, ast->getFunctionType(ClangUtil::GetQualType(result_type), qual_type_args, proto_info)); } ParmVarDecl *ClangASTContext::CreateParameterDeclaration( const char *name, const CompilerType ¶m_type, int storage) { ASTContext *ast = getASTContext(); assert(ast != nullptr); return ParmVarDecl::Create(*ast, ast->getTranslationUnitDecl(), SourceLocation(), SourceLocation(), name && name[0] ? &ast->Idents.get(name) : nullptr, ClangUtil::GetQualType(param_type), nullptr, (clang::StorageClass)storage, nullptr); } void ClangASTContext::SetFunctionParameters(FunctionDecl *function_decl, ParmVarDecl **params, unsigned num_params) { if (function_decl) function_decl->setParams(ArrayRef(params, num_params)); } CompilerType ClangASTContext::CreateBlockPointerType(const CompilerType &function_type) { QualType block_type = m_ast_ap->getBlockPointerType( clang::QualType::getFromOpaquePtr(function_type.GetOpaqueQualType())); return CompilerType(this, block_type.getAsOpaquePtr()); } #pragma mark Array Types CompilerType ClangASTContext::CreateArrayType(const CompilerType &element_type, size_t element_count, bool is_vector) { if (element_type.IsValid()) { ASTContext *ast = getASTContext(); assert(ast != nullptr); if (is_vector) { return CompilerType( ast, 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)); } else { return CompilerType( ast, ast->getConstantArrayType(ClangUtil::GetQualType(element_type), ap_element_count, clang::ArrayType::Normal, 0)); } } } return CompilerType(); } CompilerType ClangASTContext::CreateStructForIdentifier( const ConstString &type_name, const std::initializer_list> &type_fields, bool packed) { CompilerType type; if (!type_name.IsEmpty() && (type = GetTypeForIdentifier(type_name)) .IsValid()) { lldbassert(0 && "Trying to create a type for an existing name"); return type; } type = CreateRecordType(nullptr, lldb::eAccessPublic, type_name.GetCString(), clang::TTK_Struct, lldb::eLanguageTypeC); StartTagDeclarationDefinition(type); for (const auto &field : type_fields) AddFieldToRecordType(type, field.first, field.second, lldb::eAccessPublic, 0); if (packed) SetIsPacked(type); CompleteTagDeclarationDefinition(type); return type; } CompilerType ClangASTContext::GetOrCreateStructForIdentifier( const ConstString &type_name, const std::initializer_list> &type_fields, bool packed) { CompilerType type; if ((type = GetTypeForIdentifier(type_name)).IsValid()) return type; return CreateStructForIdentifier(type_name, type_fields, packed); } #pragma mark Enumeration Types CompilerType ClangASTContext::CreateEnumerationType(const char *name, DeclContext *decl_ctx, const Declaration &decl, const CompilerType &integer_clang_type) { // TODO: Do something intelligent with the Declaration object passed in // like maybe filling in the SourceLocation with it... ASTContext *ast = getASTContext(); // TODO: ask about these... // const bool IsScoped = false; // const bool IsFixed = false; EnumDecl *enum_decl = EnumDecl::Create( *ast, decl_ctx, SourceLocation(), SourceLocation(), name && name[0] ? &ast->Idents.get(name) : nullptr, nullptr, false, // IsScoped false, // IsScopedUsingClassTag false); // IsFixed if (enum_decl) { // TODO: check if we should be setting the promotion type too? enum_decl->setIntegerType(ClangUtil::GetQualType(integer_clang_type)); enum_decl->setAccess(AS_public); // TODO respect what's in the debug info return CompilerType(ast, ast->getTagDeclType(enum_decl)); } return CompilerType(); } // Disable this for now since I can't seem to get a nicely formatted float // out of the APFloat class without just getting the float, double or quad // and then using a formatted print on it which defeats the purpose. We ideally // would like to get perfect string values for any kind of float semantics // so we can support remote targets. The code below also requires a patch to // llvm::APInt. // bool // ClangASTContext::ConvertFloatValueToString (ASTContext *ast, // lldb::opaque_compiler_type_t clang_type, const uint8_t* bytes, size_t // byte_size, int apint_byte_order, std::string &float_str) //{ // uint32_t count = 0; // bool is_complex = false; // if (ClangASTContext::IsFloatingPointType (clang_type, count, is_complex)) // { // unsigned num_bytes_per_float = byte_size / count; // unsigned num_bits_per_float = num_bytes_per_float * 8; // // float_str.clear(); // uint32_t i; // for (i=0; i 0) // { // if (i > 0) // float_str.append(", "); // float_str.append(s); // if (i == 1 && is_complex) // float_str.append(1, 'i'); // } // } // return !float_str.empty(); // } // return false; //} CompilerType ClangASTContext::GetIntTypeFromBitSize(clang::ASTContext *ast, size_t bit_size, bool is_signed) { if (ast) { if (is_signed) { if (bit_size == ast->getTypeSize(ast->SignedCharTy)) return CompilerType(ast, ast->SignedCharTy); if (bit_size == ast->getTypeSize(ast->ShortTy)) return CompilerType(ast, ast->ShortTy); if (bit_size == ast->getTypeSize(ast->IntTy)) return CompilerType(ast, ast->IntTy); if (bit_size == ast->getTypeSize(ast->LongTy)) return CompilerType(ast, ast->LongTy); if (bit_size == ast->getTypeSize(ast->LongLongTy)) return CompilerType(ast, ast->LongLongTy); 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->UnsignedShortTy)) return CompilerType(ast, ast->UnsignedShortTy); if (bit_size == ast->getTypeSize(ast->UnsignedIntTy)) return CompilerType(ast, ast->UnsignedIntTy); if (bit_size == ast->getTypeSize(ast->UnsignedLongTy)) return CompilerType(ast, ast->UnsignedLongTy); if (bit_size == ast->getTypeSize(ast->UnsignedLongLongTy)) return CompilerType(ast, ast->UnsignedLongLongTy); if (bit_size == ast->getTypeSize(ast->UnsignedInt128Ty)) return CompilerType(ast, 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(); } void ClangASTContext::DumpDeclContextHiearchy(clang::DeclContext *decl_ctx) { if (decl_ctx) { DumpDeclContextHiearchy(decl_ctx->getParent()); clang::NamedDecl *named_decl = llvm::dyn_cast(decl_ctx); if (named_decl) { printf("%20s: %s\n", decl_ctx->getDeclKindName(), named_decl->getDeclName().getAsString().c_str()); } else { printf("%20s\n", decl_ctx->getDeclKindName()); } } } void ClangASTContext::DumpDeclHiearchy(clang::Decl *decl) { if (decl == nullptr) return; DumpDeclContextHiearchy(decl->getDeclContext()); clang::RecordDecl *record_decl = llvm::dyn_cast(decl); if (record_decl) { printf("%20s: %s%s\n", decl->getDeclKindName(), record_decl->getDeclName().getAsString().c_str(), record_decl->isInjectedClassName() ? " (injected class name)" : ""); } else { clang::NamedDecl *named_decl = llvm::dyn_cast(decl); if (named_decl) { printf("%20s: %s\n", decl->getDeclKindName(), named_decl->getDeclName().getAsString().c_str()); } else { printf("%20s\n", decl->getDeclKindName()); } } } bool ClangASTContext::DeclsAreEquivalent(clang::Decl *lhs_decl, clang::Decl *rhs_decl) { if (lhs_decl && rhs_decl) { //---------------------------------------------------------------------- // Make sure the decl kinds match first //---------------------------------------------------------------------- const clang::Decl::Kind lhs_decl_kind = lhs_decl->getKind(); const clang::Decl::Kind rhs_decl_kind = rhs_decl->getKind(); if (lhs_decl_kind == rhs_decl_kind) { //------------------------------------------------------------------ // Now check that the decl contexts kinds are all equivalent // before we have to check any names of the decl contexts... //------------------------------------------------------------------ clang::DeclContext *lhs_decl_ctx = lhs_decl->getDeclContext(); clang::DeclContext *rhs_decl_ctx = rhs_decl->getDeclContext(); if (lhs_decl_ctx && rhs_decl_ctx) { while (1) { if (lhs_decl_ctx && rhs_decl_ctx) { const clang::Decl::Kind lhs_decl_ctx_kind = lhs_decl_ctx->getDeclKind(); const clang::Decl::Kind rhs_decl_ctx_kind = rhs_decl_ctx->getDeclKind(); if (lhs_decl_ctx_kind == rhs_decl_ctx_kind) { lhs_decl_ctx = lhs_decl_ctx->getParent(); rhs_decl_ctx = rhs_decl_ctx->getParent(); if (lhs_decl_ctx == nullptr && rhs_decl_ctx == nullptr) break; } else return false; } else return false; } //-------------------------------------------------------------- // Now make sure the name of the decls match //-------------------------------------------------------------- clang::NamedDecl *lhs_named_decl = llvm::dyn_cast(lhs_decl); clang::NamedDecl *rhs_named_decl = llvm::dyn_cast(rhs_decl); if (lhs_named_decl && rhs_named_decl) { clang::DeclarationName lhs_decl_name = lhs_named_decl->getDeclName(); clang::DeclarationName rhs_decl_name = rhs_named_decl->getDeclName(); if (lhs_decl_name.getNameKind() == rhs_decl_name.getNameKind()) { if (lhs_decl_name.getAsString() != rhs_decl_name.getAsString()) return false; } else return false; } else return false; //-------------------------------------------------------------- // We know that the decl context kinds all match, so now we need // to make sure the names match as well //-------------------------------------------------------------- lhs_decl_ctx = lhs_decl->getDeclContext(); rhs_decl_ctx = rhs_decl->getDeclContext(); while (1) { switch (lhs_decl_ctx->getDeclKind()) { case clang::Decl::TranslationUnit: // We don't care about the translation unit names return true; default: { clang::NamedDecl *lhs_named_decl = llvm::dyn_cast(lhs_decl_ctx); clang::NamedDecl *rhs_named_decl = llvm::dyn_cast(rhs_decl_ctx); if (lhs_named_decl && rhs_named_decl) { clang::DeclarationName lhs_decl_name = lhs_named_decl->getDeclName(); clang::DeclarationName rhs_decl_name = rhs_named_decl->getDeclName(); if (lhs_decl_name.getNameKind() == rhs_decl_name.getNameKind()) { if (lhs_decl_name.getAsString() != rhs_decl_name.getAsString()) return false; } else return false; } else return false; } break; } lhs_decl_ctx = lhs_decl_ctx->getParent(); rhs_decl_ctx = rhs_decl_ctx->getParent(); } } } } return false; } bool ClangASTContext::GetCompleteDecl(clang::ASTContext *ast, clang::Decl *decl) { if (!decl) return false; ExternalASTSource *ast_source = ast->getExternalSource(); if (!ast_source) return false; if (clang::TagDecl *tag_decl = llvm::dyn_cast(decl)) { if (tag_decl->isCompleteDefinition()) return true; if (!tag_decl->hasExternalLexicalStorage()) return false; ast_source->CompleteType(tag_decl); return !tag_decl->getTypeForDecl()->isIncompleteType(); } else if (clang::ObjCInterfaceDecl *objc_interface_decl = llvm::dyn_cast(decl)) { if (objc_interface_decl->getDefinition()) return true; if (!objc_interface_decl->hasExternalLexicalStorage()) return false; ast_source->CompleteType(objc_interface_decl); return !objc_interface_decl->getTypeForDecl()->isIncompleteType(); } else { return false; } } void ClangASTContext::SetMetadataAsUserID(const void *object, user_id_t user_id) { ClangASTMetadata meta_data; meta_data.SetUserID(user_id); SetMetadata(object, meta_data); } void ClangASTContext::SetMetadata(clang::ASTContext *ast, const void *object, ClangASTMetadata &metadata) { ClangExternalASTSourceCommon *external_source = ClangExternalASTSourceCommon::Lookup(ast->getExternalSource()); if (external_source) external_source->SetMetadata(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; } clang::DeclContext * ClangASTContext::GetAsDeclContext(clang::CXXMethodDecl *cxx_method_decl) { return llvm::dyn_cast(cxx_method_decl); } clang::DeclContext * ClangASTContext::GetAsDeclContext(clang::ObjCMethodDecl *objc_method_decl) { return llvm::dyn_cast(objc_method_decl); } bool ClangASTContext::SetTagTypeKind(clang::QualType tag_qual_type, int kind) const { const clang::Type *clang_type = tag_qual_type.getTypePtr(); if (clang_type) { const clang::TagType *tag_type = llvm::dyn_cast(clang_type); if (tag_type) { clang::TagDecl *tag_decl = llvm::dyn_cast(tag_type->getDecl()); if (tag_decl) { tag_decl->setTagKind((clang::TagDecl::TagKind)kind); return true; } } } return false; } bool ClangASTContext::SetDefaultAccessForRecordFields( clang::RecordDecl *record_decl, int default_accessibility, int *assigned_accessibilities, size_t num_assigned_accessibilities) { if (record_decl) { uint32_t field_idx; clang::RecordDecl::field_iterator field, field_end; for (field = record_decl->field_begin(), field_end = record_decl->field_end(), field_idx = 0; field != field_end; ++field, ++field_idx) { // If no accessibility was assigned, assign the correct one if (field_idx < num_assigned_accessibilities && assigned_accessibilities[field_idx] == clang::AS_none) field->setAccess((clang::AccessSpecifier)default_accessibility); } return true; } return false; } clang::DeclContext * ClangASTContext::GetDeclContextForType(const CompilerType &type) { return GetDeclContextForType(ClangUtil::GetQualType(type)); } clang::DeclContext * ClangASTContext::GetDeclContextForType(clang::QualType type) { if (type.isNull()) return nullptr; clang::QualType qual_type = type.getCanonicalType(); const clang::Type::TypeClass type_class = qual_type->getTypeClass(); switch (type_class) { case clang::Type::ObjCInterface: return llvm::cast(qual_type.getTypePtr()) ->getInterface(); case clang::Type::ObjCObjectPointer: return GetDeclContextForType( llvm::cast(qual_type.getTypePtr()) ->getPointeeType()); case clang::Type::Record: return llvm::cast(qual_type)->getDecl(); case clang::Type::Enum: return llvm::cast(qual_type)->getDecl(); case clang::Type::Typedef: return GetDeclContextForType(llvm::cast(qual_type) ->getDecl() ->getUnderlyingType()); case clang::Type::Auto: return GetDeclContextForType( llvm::cast(qual_type)->getDeducedType()); case clang::Type::Elaborated: return GetDeclContextForType( llvm::cast(qual_type)->getNamedType()); case clang::Type::Paren: return GetDeclContextForType( llvm::cast(qual_type)->desugar()); default: break; } // No DeclContext in this type... return nullptr; } static bool GetCompleteQualType(clang::ASTContext *ast, clang::QualType qual_type, bool allow_completion = true) { const clang::Type::TypeClass type_class = qual_type->getTypeClass(); switch (type_class) { case clang::Type::ConstantArray: case clang::Type::IncompleteArray: case clang::Type::VariableArray: { const clang::ArrayType *array_type = llvm::dyn_cast(qual_type.getTypePtr()); if (array_type) return GetCompleteQualType(ast, array_type->getElementType(), allow_completion); } break; case clang::Type::Record: { clang::CXXRecordDecl *cxx_record_decl = qual_type->getAsCXXRecordDecl(); if (cxx_record_decl) { if (cxx_record_decl->hasExternalLexicalStorage()) { const bool is_complete = cxx_record_decl->isCompleteDefinition(); const bool fields_loaded = cxx_record_decl->hasLoadedFieldsFromExternalStorage(); if (is_complete && fields_loaded) return true; if (!allow_completion) return false; // Call the field_begin() accessor to for it to use the external source // to load the fields... clang::ExternalASTSource *external_ast_source = ast->getExternalSource(); if (external_ast_source) { external_ast_source->CompleteType(cxx_record_decl); if (cxx_record_decl->isCompleteDefinition()) { cxx_record_decl->field_begin(); cxx_record_decl->setHasLoadedFieldsFromExternalStorage(true); } } } } const clang::TagType *tag_type = llvm::cast(qual_type.getTypePtr()); return !tag_type->isIncompleteType(); } break; case clang::Type::Enum: { const clang::TagType *tag_type = llvm::dyn_cast(qual_type.getTypePtr()); if (tag_type) { clang::TagDecl *tag_decl = tag_type->getDecl(); if (tag_decl) { if (tag_decl->getDefinition()) return true; if (!allow_completion) return false; if (tag_decl->hasExternalLexicalStorage()) { if (ast) { clang::ExternalASTSource *external_ast_source = ast->getExternalSource(); if (external_ast_source) { external_ast_source->CompleteType(tag_decl); return !tag_type->isIncompleteType(); } } } return false; } } } break; case clang::Type::ObjCObject: case clang::Type::ObjCInterface: { const clang::ObjCObjectType *objc_class_type = llvm::dyn_cast(qual_type); if (objc_class_type) { clang::ObjCInterfaceDecl *class_interface_decl = objc_class_type->getInterface(); // 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 (class_interface_decl->getDefinition()) return true; if (!allow_completion) return false; if (class_interface_decl->hasExternalLexicalStorage()) { if (ast) { clang::ExternalASTSource *external_ast_source = ast->getExternalSource(); if (external_ast_source) { external_ast_source->CompleteType(class_interface_decl); return !objc_class_type->isIncompleteType(); } } } return false; } } } break; case clang::Type::Typedef: return GetCompleteQualType(ast, llvm::cast(qual_type) ->getDecl() ->getUnderlyingType(), allow_completion); case clang::Type::Auto: return GetCompleteQualType( ast, llvm::cast(qual_type)->getDeducedType(), allow_completion); case clang::Type::Elaborated: return GetCompleteQualType( ast, llvm::cast(qual_type)->getNamedType(), allow_completion); case clang::Type::Paren: return GetCompleteQualType( ast, llvm::cast(qual_type)->desugar(), allow_completion); case clang::Type::Attributed: return GetCompleteQualType( ast, llvm::cast(qual_type)->getModifiedType(), allow_completion); default: break; } return true; } static clang::ObjCIvarDecl::AccessControl ConvertAccessTypeToObjCIvarAccessControl(AccessType access) { switch (access) { case eAccessNone: return clang::ObjCIvarDecl::None; case eAccessPublic: return clang::ObjCIvarDecl::Public; case eAccessPrivate: return clang::ObjCIvarDecl::Private; case eAccessProtected: return clang::ObjCIvarDecl::Protected; case eAccessPackage: return clang::ObjCIvarDecl::Package; } return clang::ObjCIvarDecl::None; } //---------------------------------------------------------------------- // Tests //---------------------------------------------------------------------- bool ClangASTContext::IsAggregateType(lldb::opaque_compiler_type_t type) { clang::QualType qual_type(GetCanonicalQualType(type)); const clang::Type::TypeClass type_class = qual_type->getTypeClass(); switch (type_class) { case clang::Type::IncompleteArray: case clang::Type::VariableArray: case clang::Type::ConstantArray: case clang::Type::ExtVector: case clang::Type::Vector: case clang::Type::Record: case clang::Type::ObjCObject: case clang::Type::ObjCInterface: return true; case clang::Type::Auto: return IsAggregateType(llvm::cast(qual_type) ->getDeducedType() .getAsOpaquePtr()); case clang::Type::Elaborated: return IsAggregateType(llvm::cast(qual_type) ->getNamedType() .getAsOpaquePtr()); case clang::Type::Typedef: return IsAggregateType(llvm::cast(qual_type) ->getDecl() ->getUnderlyingType() .getAsOpaquePtr()); case clang::Type::Paren: return IsAggregateType( llvm::cast(qual_type)->desugar().getAsOpaquePtr()); default: break; } // The clang type does have a value return false; } bool ClangASTContext::IsAnonymousType(lldb::opaque_compiler_type_t type) { clang::QualType qual_type(GetCanonicalQualType(type)); const clang::Type::TypeClass type_class = qual_type->getTypeClass(); switch (type_class) { case clang::Type::Record: { if (const clang::RecordType *record_type = llvm::dyn_cast_or_null( qual_type.getTypePtrOrNull())) { if (const clang::RecordDecl *record_decl = record_type->getDecl()) { return record_decl->isAnonymousStructOrUnion(); } } break; } case clang::Type::Auto: return IsAnonymousType(llvm::cast(qual_type) ->getDeducedType() .getAsOpaquePtr()); case clang::Type::Elaborated: return IsAnonymousType(llvm::cast(qual_type) ->getNamedType() .getAsOpaquePtr()); case clang::Type::Typedef: return IsAnonymousType(llvm::cast(qual_type) ->getDecl() ->getUnderlyingType() .getAsOpaquePtr()); case clang::Type::Paren: return IsAnonymousType( llvm::cast(qual_type)->desugar().getAsOpaquePtr()); default: break; } // The clang type does have a value return false; } 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)); const clang::Type::TypeClass type_class = qual_type->getTypeClass(); switch (type_class) { default: break; case clang::Type::ConstantArray: if (element_type_ptr) element_type_ptr->SetCompilerType( getASTContext(), llvm::cast(qual_type)->getElementType()); if (size) *size = llvm::cast(qual_type) ->getSize() .getLimitedValue(ULLONG_MAX); if (is_incomplete) *is_incomplete = false; return true; case clang::Type::IncompleteArray: if (element_type_ptr) element_type_ptr->SetCompilerType( getASTContext(), llvm::cast(qual_type)->getElementType()); if (size) *size = 0; if (is_incomplete) *is_incomplete = true; return true; case clang::Type::VariableArray: if (element_type_ptr) element_type_ptr->SetCompilerType( getASTContext(), llvm::cast(qual_type)->getElementType()); if (size) *size = 0; if (is_incomplete) *is_incomplete = false; return true; case clang::Type::DependentSizedArray: if (element_type_ptr) element_type_ptr->SetCompilerType( getASTContext(), llvm::cast(qual_type) ->getElementType()); if (size) *size = 0; if (is_incomplete) *is_incomplete = false; return true; case clang::Type::Typedef: return IsArrayType(llvm::cast(qual_type) ->getDecl() ->getUnderlyingType() .getAsOpaquePtr(), element_type_ptr, size, is_incomplete); case clang::Type::Auto: return IsArrayType(llvm::cast(qual_type) ->getDeducedType() .getAsOpaquePtr(), element_type_ptr, size, is_incomplete); case clang::Type::Elaborated: return IsArrayType(llvm::cast(qual_type) ->getNamedType() .getAsOpaquePtr(), element_type_ptr, size, is_incomplete); case clang::Type::Paren: return IsArrayType( llvm::cast(qual_type)->desugar().getAsOpaquePtr(), element_type_ptr, size, is_incomplete); } if (element_type_ptr) element_type_ptr->Clear(); if (size) *size = 0; if (is_incomplete) *is_incomplete = false; return false; } bool ClangASTContext::IsVectorType(lldb::opaque_compiler_type_t type, CompilerType *element_type, uint64_t *size) { clang::QualType qual_type(GetCanonicalQualType(type)); const clang::Type::TypeClass type_class = qual_type->getTypeClass(); switch (type_class) { case clang::Type::Vector: { const clang::VectorType *vector_type = qual_type->getAs(); if (vector_type) { if (size) *size = vector_type->getNumElements(); if (element_type) *element_type = CompilerType(getASTContext(), vector_type->getElementType()); } return true; } break; case clang::Type::ExtVector: { const clang::ExtVectorType *ext_vector_type = qual_type->getAs(); if (ext_vector_type) { if (size) *size = ext_vector_type->getNumElements(); if (element_type) *element_type = CompilerType(getASTContext(), ext_vector_type->getElementType()); } return true; } default: break; } return false; } bool ClangASTContext::IsRuntimeGeneratedType( lldb::opaque_compiler_type_t type) { clang::DeclContext *decl_ctx = ClangASTContext::GetASTContext(getASTContext()) ->GetDeclContextForType(GetQualType(type)); if (!decl_ctx) return false; if (!llvm::isa(decl_ctx)) return false; clang::ObjCInterfaceDecl *result_iface_decl = llvm::dyn_cast(decl_ctx); ClangASTMetadata *ast_metadata = ClangASTContext::GetMetadata(getASTContext(), result_iface_decl); if (!ast_metadata) return false; return (ast_metadata->GetISAPtr() != 0); } bool ClangASTContext::IsCharType(lldb::opaque_compiler_type_t type) { return GetQualType(type).getUnqualifiedType()->isCharType(); } bool ClangASTContext::IsCompleteType(lldb::opaque_compiler_type_t type) { const bool allow_completion = false; return GetCompleteQualType(getASTContext(), GetQualType(type), allow_completion); } bool ClangASTContext::IsConst(lldb::opaque_compiler_type_t type) { return GetQualType(type).isConstQualified(); } bool ClangASTContext::IsCStringType(lldb::opaque_compiler_type_t type, uint32_t &length) { CompilerType pointee_or_element_clang_type; length = 0; Flags type_flags(GetTypeInfo(type, &pointee_or_element_clang_type)); if (!pointee_or_element_clang_type.IsValid()) return false; if (type_flags.AnySet(eTypeIsArray | eTypeIsPointer)) { if (pointee_or_element_clang_type.IsCharType()) { if (type_flags.Test(eTypeIsArray)) { // We know the size of the array and it could be a C string // since it is an array of characters length = llvm::cast( GetCanonicalQualType(type).getTypePtr()) ->getSize() .getLimitedValue(); } return true; } } return false; } bool ClangASTContext::IsFunctionType(lldb::opaque_compiler_type_t type, bool *is_variadic_ptr) { if (type) { clang::QualType qual_type(GetCanonicalQualType(type)); if (qual_type->isFunctionType()) { if (is_variadic_ptr) { const clang::FunctionProtoType *function_proto_type = llvm::dyn_cast(qual_type.getTypePtr()); if (function_proto_type) *is_variadic_ptr = function_proto_type->isVariadic(); else *is_variadic_ptr = false; } return true; } const clang::Type::TypeClass type_class = qual_type->getTypeClass(); switch (type_class) { default: break; case clang::Type::Typedef: return IsFunctionType(llvm::cast(qual_type) ->getDecl() ->getUnderlyingType() .getAsOpaquePtr(), nullptr); case clang::Type::Auto: return IsFunctionType(llvm::cast(qual_type) ->getDeducedType() .getAsOpaquePtr(), nullptr); case clang::Type::Elaborated: return IsFunctionType(llvm::cast(qual_type) ->getNamedType() .getAsOpaquePtr(), nullptr); case clang::Type::Paren: return IsFunctionType( llvm::cast(qual_type)->desugar().getAsOpaquePtr(), nullptr); case clang::Type::LValueReference: case clang::Type::RValueReference: { const clang::ReferenceType *reference_type = llvm::cast(qual_type.getTypePtr()); if (reference_type) return IsFunctionType(reference_type->getPointeeType().getAsOpaquePtr(), nullptr); } break; } } return false; } // Used to detect "Homogeneous Floating-point Aggregates" uint32_t ClangASTContext::IsHomogeneousAggregate(lldb::opaque_compiler_type_t type, CompilerType *base_type_ptr) { if (!type) return 0; clang::QualType qual_type(GetCanonicalQualType(type)); const clang::Type::TypeClass type_class = qual_type->getTypeClass(); switch (type_class) { case clang::Type::Record: if (GetCompleteType(type)) { const clang::CXXRecordDecl *cxx_record_decl = qual_type->getAsCXXRecordDecl(); if (cxx_record_decl) { if (cxx_record_decl->getNumBases() || cxx_record_decl->isDynamicClass()) return 0; } const clang::RecordType *record_type = llvm::cast(qual_type.getTypePtr()); if (record_type) { const clang::RecordDecl *record_decl = record_type->getDecl(); if (record_decl) { // We are looking for a structure that contains only floating point // types clang::RecordDecl::field_iterator field_pos, field_end = record_decl->field_end(); uint32_t num_fields = 0; bool is_hva = false; bool is_hfa = false; clang::QualType base_qual_type; uint64_t base_bitwidth = 0; 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); if (field_qual_type->isFloatingType()) { if (field_qual_type->isComplexType()) return 0; else { if (num_fields == 0) base_qual_type = field_qual_type; else { if (is_hva) return 0; is_hfa = true; if (field_qual_type.getTypePtr() != base_qual_type.getTypePtr()) return 0; } } } else if (field_qual_type->isVectorType() || field_qual_type->isExtVectorType()) { if (num_fields == 0) { base_qual_type = field_qual_type; base_bitwidth = field_bitwidth; } else { if (is_hfa) return 0; is_hva = true; if (base_bitwidth != field_bitwidth) return 0; if (field_qual_type.getTypePtr() != base_qual_type.getTypePtr()) return 0; } } else return 0; ++num_fields; } if (base_type_ptr) *base_type_ptr = CompilerType(getASTContext(), base_qual_type); return num_fields; } } } break; case clang::Type::Typedef: return IsHomogeneousAggregate(llvm::cast(qual_type) ->getDecl() ->getUnderlyingType() .getAsOpaquePtr(), base_type_ptr); case clang::Type::Auto: return IsHomogeneousAggregate(llvm::cast(qual_type) ->getDeducedType() .getAsOpaquePtr(), base_type_ptr); case clang::Type::Elaborated: return IsHomogeneousAggregate(llvm::cast(qual_type) ->getNamedType() .getAsOpaquePtr(), base_type_ptr); default: break; } return 0; } size_t ClangASTContext::GetNumberOfFunctionArguments( lldb::opaque_compiler_type_t type) { if (type) { clang::QualType qual_type(GetCanonicalQualType(type)); const clang::FunctionProtoType *func = llvm::dyn_cast(qual_type.getTypePtr()); if (func) return func->getNumParams(); } return 0; } CompilerType ClangASTContext::GetFunctionArgumentAtIndex(lldb::opaque_compiler_type_t type, const size_t index) { if (type) { clang::QualType qual_type(GetQualType(type)); const clang::FunctionProtoType *func = llvm::dyn_cast(qual_type.getTypePtr()); if (func) { if (index < func->getNumParams()) return CompilerType(getASTContext(), func->getParamType(index)); } } return CompilerType(); } bool ClangASTContext::IsFunctionPointerType(lldb::opaque_compiler_type_t type) { if (type) { clang::QualType qual_type(GetCanonicalQualType(type)); if (qual_type->isFunctionPointerType()) return true; const clang::Type::TypeClass type_class = qual_type->getTypeClass(); switch (type_class) { default: break; case clang::Type::Typedef: return IsFunctionPointerType(llvm::cast(qual_type) ->getDecl() ->getUnderlyingType() .getAsOpaquePtr()); case clang::Type::Auto: return IsFunctionPointerType(llvm::cast(qual_type) ->getDeducedType() .getAsOpaquePtr()); case clang::Type::Elaborated: return IsFunctionPointerType(llvm::cast(qual_type) ->getNamedType() .getAsOpaquePtr()); case clang::Type::Paren: return IsFunctionPointerType( llvm::cast(qual_type)->desugar().getAsOpaquePtr()); case clang::Type::LValueReference: case clang::Type::RValueReference: { const clang::ReferenceType *reference_type = llvm::cast(qual_type.getTypePtr()); if (reference_type) return IsFunctionPointerType( reference_type->getPointeeType().getAsOpaquePtr()); } break; } } return false; } bool ClangASTContext::IsBlockPointerType( lldb::opaque_compiler_type_t type, CompilerType *function_pointer_type_ptr) { if (type) { clang::QualType qual_type(GetCanonicalQualType(type)); if (qual_type->isBlockPointerType()) { if (function_pointer_type_ptr) { const clang::BlockPointerType *block_pointer_type = qual_type->getAs(); QualType pointee_type = block_pointer_type->getPointeeType(); QualType function_pointer_type = m_ast_ap->getPointerType(pointee_type); *function_pointer_type_ptr = CompilerType(getASTContext(), function_pointer_type); } return true; } const clang::Type::TypeClass type_class = qual_type->getTypeClass(); switch (type_class) { default: break; case clang::Type::Typedef: return IsBlockPointerType(llvm::cast(qual_type) ->getDecl() ->getUnderlyingType() .getAsOpaquePtr(), function_pointer_type_ptr); case clang::Type::Auto: return IsBlockPointerType(llvm::cast(qual_type) ->getDeducedType() .getAsOpaquePtr(), function_pointer_type_ptr); case clang::Type::Elaborated: return IsBlockPointerType(llvm::cast(qual_type) ->getNamedType() .getAsOpaquePtr(), function_pointer_type_ptr); case clang::Type::Paren: return IsBlockPointerType( llvm::cast(qual_type)->desugar().getAsOpaquePtr(), function_pointer_type_ptr); case clang::Type::LValueReference: case clang::Type::RValueReference: { const clang::ReferenceType *reference_type = llvm::cast(qual_type.getTypePtr()); if (reference_type) return IsBlockPointerType( reference_type->getPointeeType().getAsOpaquePtr(), function_pointer_type_ptr); } break; } } return false; } bool ClangASTContext::IsIntegerType(lldb::opaque_compiler_type_t type, bool &is_signed) { if (!type) return false; clang::QualType qual_type(GetCanonicalQualType(type)); const clang::BuiltinType *builtin_type = llvm::dyn_cast(qual_type->getCanonicalTypeInternal()); if (builtin_type) { if (builtin_type->isInteger()) { is_signed = builtin_type->isSignedInteger(); return true; } } return false; } bool ClangASTContext::IsEnumerationType(lldb::opaque_compiler_type_t type, bool &is_signed) { if (type) { const clang::EnumType *enum_type = llvm::dyn_cast( GetCanonicalQualType(type)->getCanonicalTypeInternal()); if (enum_type) { IsIntegerType(enum_type->getDecl()->getIntegerType().getAsOpaquePtr(), is_signed); return true; } } return false; } bool ClangASTContext::IsPointerType(lldb::opaque_compiler_type_t type, CompilerType *pointee_type) { if (type) { clang::QualType qual_type(GetCanonicalQualType(type)); const clang::Type::TypeClass type_class = qual_type->getTypeClass(); switch (type_class) { case clang::Type::Builtin: switch (llvm::cast(qual_type)->getKind()) { default: break; case clang::BuiltinType::ObjCId: case clang::BuiltinType::ObjCClass: return true; } return false; case clang::Type::ObjCObjectPointer: if (pointee_type) pointee_type->SetCompilerType( getASTContext(), llvm::cast(qual_type) ->getPointeeType()); return true; case clang::Type::BlockPointer: if (pointee_type) pointee_type->SetCompilerType( getASTContext(), llvm::cast(qual_type)->getPointeeType()); return true; case clang::Type::Pointer: if (pointee_type) pointee_type->SetCompilerType( getASTContext(), llvm::cast(qual_type)->getPointeeType()); return true; case clang::Type::MemberPointer: if (pointee_type) pointee_type->SetCompilerType( getASTContext(), llvm::cast(qual_type)->getPointeeType()); return true; case clang::Type::Typedef: return IsPointerType(llvm::cast(qual_type) ->getDecl() ->getUnderlyingType() .getAsOpaquePtr(), pointee_type); case clang::Type::Auto: return IsPointerType(llvm::cast(qual_type) ->getDeducedType() .getAsOpaquePtr(), pointee_type); case clang::Type::Elaborated: return IsPointerType(llvm::cast(qual_type) ->getNamedType() .getAsOpaquePtr(), pointee_type); case clang::Type::Paren: return IsPointerType( llvm::cast(qual_type)->desugar().getAsOpaquePtr(), pointee_type); default: break; } } if (pointee_type) pointee_type->Clear(); return false; } bool ClangASTContext::IsPointerOrReferenceType( lldb::opaque_compiler_type_t type, CompilerType *pointee_type) { if (type) { clang::QualType qual_type(GetCanonicalQualType(type)); const clang::Type::TypeClass type_class = qual_type->getTypeClass(); switch (type_class) { case clang::Type::Builtin: switch (llvm::cast(qual_type)->getKind()) { default: break; case clang::BuiltinType::ObjCId: case clang::BuiltinType::ObjCClass: return true; } return false; case clang::Type::ObjCObjectPointer: if (pointee_type) pointee_type->SetCompilerType( getASTContext(), llvm::cast(qual_type) ->getPointeeType()); return true; case clang::Type::BlockPointer: if (pointee_type) pointee_type->SetCompilerType( getASTContext(), llvm::cast(qual_type)->getPointeeType()); return true; case clang::Type::Pointer: if (pointee_type) pointee_type->SetCompilerType( getASTContext(), llvm::cast(qual_type)->getPointeeType()); return true; case clang::Type::MemberPointer: if (pointee_type) pointee_type->SetCompilerType( getASTContext(), llvm::cast(qual_type)->getPointeeType()); return true; case clang::Type::LValueReference: if (pointee_type) pointee_type->SetCompilerType( getASTContext(), llvm::cast(qual_type)->desugar()); return true; case clang::Type::RValueReference: if (pointee_type) pointee_type->SetCompilerType( getASTContext(), llvm::cast(qual_type)->desugar()); return true; case clang::Type::Typedef: return IsPointerOrReferenceType(llvm::cast(qual_type) ->getDecl() ->getUnderlyingType() .getAsOpaquePtr(), pointee_type); case clang::Type::Auto: return IsPointerOrReferenceType(llvm::cast(qual_type) ->getDeducedType() .getAsOpaquePtr(), pointee_type); case clang::Type::Elaborated: return IsPointerOrReferenceType( llvm::cast(qual_type) ->getNamedType() .getAsOpaquePtr(), pointee_type); case clang::Type::Paren: return IsPointerOrReferenceType( llvm::cast(qual_type)->desugar().getAsOpaquePtr(), pointee_type); default: break; } } if (pointee_type) pointee_type->Clear(); return false; } bool ClangASTContext::IsReferenceType(lldb::opaque_compiler_type_t type, CompilerType *pointee_type, bool *is_rvalue) { if (type) { clang::QualType qual_type(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(qual_type)->desugar()); if (is_rvalue) *is_rvalue = false; return true; case clang::Type::RValueReference: if (pointee_type) pointee_type->SetCompilerType( getASTContext(), llvm::cast(qual_type)->desugar()); if (is_rvalue) *is_rvalue = true; return true; case clang::Type::Typedef: return IsReferenceType(llvm::cast(qual_type) ->getDecl() ->getUnderlyingType() .getAsOpaquePtr(), pointee_type, is_rvalue); case clang::Type::Auto: return IsReferenceType(llvm::cast(qual_type) ->getDeducedType() .getAsOpaquePtr(), pointee_type, is_rvalue); case clang::Type::Elaborated: return IsReferenceType(llvm::cast(qual_type) ->getNamedType() .getAsOpaquePtr(), pointee_type, is_rvalue); case clang::Type::Paren: return IsReferenceType( llvm::cast(qual_type)->desugar().getAsOpaquePtr(), pointee_type, is_rvalue); default: break; } } if (pointee_type) pointee_type->Clear(); return false; } bool ClangASTContext::IsFloatingPointType(lldb::opaque_compiler_type_t type, uint32_t &count, bool &is_complex) { if (type) { clang::QualType qual_type(GetCanonicalQualType(type)); if (const clang::BuiltinType *BT = llvm::dyn_cast( qual_type->getCanonicalTypeInternal())) { clang::BuiltinType::Kind kind = BT->getKind(); if (kind >= clang::BuiltinType::Float && kind <= clang::BuiltinType::LongDouble) { count = 1; is_complex = false; return true; } } else if (const clang::ComplexType *CT = llvm::dyn_cast( qual_type->getCanonicalTypeInternal())) { if (IsFloatingPointType(CT->getElementType().getAsOpaquePtr(), count, is_complex)) { count = 2; is_complex = true; return true; } } else if (const clang::VectorType *VT = llvm::dyn_cast( qual_type->getCanonicalTypeInternal())) { if (IsFloatingPointType(VT->getElementType().getAsOpaquePtr(), count, is_complex)) { count = VT->getNumElements(); is_complex = false; return true; } } } count = 0; is_complex = false; return false; } bool ClangASTContext::IsDefined(lldb::opaque_compiler_type_t type) { if (!type) return false; clang::QualType qual_type(GetQualType(type)); const clang::TagType *tag_type = llvm::dyn_cast(qual_type.getTypePtr()); if (tag_type) { clang::TagDecl *tag_decl = tag_type->getDecl(); if (tag_decl) return tag_decl->isCompleteDefinition(); return false; } else { const clang::ObjCObjectType *objc_class_type = llvm::dyn_cast(qual_type); if (objc_class_type) { clang::ObjCInterfaceDecl *class_interface_decl = objc_class_type->getInterface(); if (class_interface_decl) return class_interface_decl->getDefinition() != nullptr; return false; } } return true; } bool ClangASTContext::IsObjCClassType(const CompilerType &type) { if (type) { clang::QualType qual_type(ClangUtil::GetCanonicalQualType(type)); const clang::ObjCObjectPointerType *obj_pointer_type = llvm::dyn_cast(qual_type); if (obj_pointer_type) return obj_pointer_type->isObjCClassType(); } return false; } bool ClangASTContext::IsObjCObjectOrInterfaceType(const CompilerType &type) { if (ClangUtil::IsClangType(type)) return ClangUtil::GetCanonicalQualType(type)->isObjCObjectOrInterfaceType(); return false; } bool ClangASTContext::IsClassType(lldb::opaque_compiler_type_t type) { if (!type) return false; clang::QualType qual_type(GetCanonicalQualType(type)); const clang::Type::TypeClass type_class = qual_type->getTypeClass(); return (type_class == clang::Type::Record); } bool ClangASTContext::IsEnumType(lldb::opaque_compiler_type_t type) { if (!type) return false; clang::QualType qual_type(GetCanonicalQualType(type)); const clang::Type::TypeClass type_class = qual_type->getTypeClass(); return (type_class == clang::Type::Enum); } bool ClangASTContext::IsPolymorphicClass(lldb::opaque_compiler_type_t type) { if (type) { clang::QualType qual_type(GetCanonicalQualType(type)); const clang::Type::TypeClass type_class = qual_type->getTypeClass(); switch (type_class) { case clang::Type::Record: if (GetCompleteType(type)) { const clang::RecordType *record_type = llvm::cast(qual_type.getTypePtr()); const clang::RecordDecl *record_decl = record_type->getDecl(); if (record_decl) { const clang::CXXRecordDecl *cxx_record_decl = llvm::dyn_cast(record_decl); if (cxx_record_decl) return cxx_record_decl->isPolymorphic(); } } break; default: break; } } return false; } bool ClangASTContext::IsPossibleDynamicType(lldb::opaque_compiler_type_t type, CompilerType *dynamic_pointee_type, bool check_cplusplus, bool check_objc) { clang::QualType pointee_qual_type; if (type) { clang::QualType qual_type(GetCanonicalQualType(type)); bool success = false; const clang::Type::TypeClass type_class = qual_type->getTypeClass(); switch (type_class) { case clang::Type::Builtin: if (check_objc && llvm::cast(qual_type)->getKind() == clang::BuiltinType::ObjCId) { if (dynamic_pointee_type) dynamic_pointee_type->SetCompilerType(this, type); return true; } break; case clang::Type::ObjCObjectPointer: if (check_objc) { if (auto objc_pointee_type = qual_type->getPointeeType().getTypePtrOrNull()) { if (auto objc_object_type = llvm::dyn_cast_or_null( objc_pointee_type)) { if (objc_object_type->isObjCClass()) return false; } } if (dynamic_pointee_type) dynamic_pointee_type->SetCompilerType( getASTContext(), llvm::cast(qual_type) ->getPointeeType()); return true; } break; case clang::Type::Pointer: pointee_qual_type = llvm::cast(qual_type)->getPointeeType(); success = true; break; case clang::Type::LValueReference: case clang::Type::RValueReference: pointee_qual_type = llvm::cast(qual_type)->getPointeeType(); success = true; break; case clang::Type::Typedef: return IsPossibleDynamicType(llvm::cast(qual_type) ->getDecl() ->getUnderlyingType() .getAsOpaquePtr(), dynamic_pointee_type, check_cplusplus, check_objc); case clang::Type::Auto: return IsPossibleDynamicType(llvm::cast(qual_type) ->getDeducedType() .getAsOpaquePtr(), dynamic_pointee_type, check_cplusplus, check_objc); case clang::Type::Elaborated: return IsPossibleDynamicType(llvm::cast(qual_type) ->getNamedType() .getAsOpaquePtr(), dynamic_pointee_type, check_cplusplus, check_objc); case clang::Type::Paren: return IsPossibleDynamicType( llvm::cast(qual_type)->desugar().getAsOpaquePtr(), dynamic_pointee_type, check_cplusplus, check_objc); default: break; } if (success) { // Check to make sure what we are pointing too is a possible dynamic C++ // type // We currently accept any "void *" (in case we have a class that has been // watered down to an opaque pointer) and virtual C++ classes. const clang::Type::TypeClass pointee_type_class = pointee_qual_type.getCanonicalType()->getTypeClass(); switch (pointee_type_class) { case clang::Type::Builtin: switch (llvm::cast(pointee_qual_type)->getKind()) { case clang::BuiltinType::UnknownAny: case clang::BuiltinType::Void: if (dynamic_pointee_type) dynamic_pointee_type->SetCompilerType(getASTContext(), pointee_qual_type); return true; default: break; } break; case clang::Type::Record: if (check_cplusplus) { clang::CXXRecordDecl *cxx_record_decl = pointee_qual_type->getAsCXXRecordDecl(); if (cxx_record_decl) { bool is_complete = cxx_record_decl->isCompleteDefinition(); if (is_complete) success = cxx_record_decl->isDynamicClass(); else { ClangASTMetadata *metadata = ClangASTContext::GetMetadata( getASTContext(), cxx_record_decl); if (metadata) success = metadata->GetIsDynamicCXXType(); else { is_complete = CompilerType(getASTContext(), pointee_qual_type) .GetCompleteType(); if (is_complete) success = cxx_record_decl->isDynamicClass(); else success = false; } } if (success) { if (dynamic_pointee_type) dynamic_pointee_type->SetCompilerType(getASTContext(), pointee_qual_type); return true; } } } break; case clang::Type::ObjCObject: case clang::Type::ObjCInterface: if (check_objc) { if (dynamic_pointee_type) dynamic_pointee_type->SetCompilerType(getASTContext(), pointee_qual_type); return true; } break; default: break; } } } if (dynamic_pointee_type) dynamic_pointee_type->Clear(); return false; } bool ClangASTContext::IsScalarType(lldb::opaque_compiler_type_t type) { if (!type) return false; return (GetTypeInfo(type, nullptr) & eTypeIsScalar) != 0; } bool ClangASTContext::IsTypedefType(lldb::opaque_compiler_type_t type) { if (!type) return false; return GetQualType(type)->getTypeClass() == clang::Type::Typedef; } bool ClangASTContext::IsVoidType(lldb::opaque_compiler_type_t type) { if (!type) return false; return GetCanonicalQualType(type)->isVoidType(); } bool ClangASTContext::SupportsLanguage(lldb::LanguageType language) { 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; } bool ClangASTContext::IsCXXClassType(const CompilerType &type) { if (!type) return false; clang::QualType qual_type(ClangUtil::GetCanonicalQualType(type)); if (!qual_type.isNull() && qual_type->getAsCXXRecordDecl() != nullptr) return true; return false; } bool ClangASTContext::IsBeingDefined(lldb::opaque_compiler_type_t type) { if (!type) return false; clang::QualType qual_type(GetCanonicalQualType(type)); const clang::TagType *tag_type = llvm::dyn_cast(qual_type); if (tag_type) return tag_type->isBeingDefined(); return false; } bool ClangASTContext::IsObjCObjectPointerType(const CompilerType &type, CompilerType *class_type_ptr) { if (!type) return false; clang::QualType qual_type(ClangUtil::GetCanonicalQualType(type)); if (!qual_type.isNull() && qual_type->isObjCObjectPointerType()) { if (class_type_ptr) { if (!qual_type->isObjCClassType() && !qual_type->isObjCIdType()) { const clang::ObjCObjectPointerType *obj_pointer_type = llvm::dyn_cast(qual_type); if (obj_pointer_type == nullptr) class_type_ptr->Clear(); else class_type_ptr->SetCompilerType( type.GetTypeSystem(), clang::QualType(obj_pointer_type->getInterfaceType(), 0) .getAsOpaquePtr()); } } return true; } if (class_type_ptr) class_type_ptr->Clear(); 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(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), allow_completion); } ConstString ClangASTContext::GetTypeName(lldb::opaque_compiler_type_t type) { std::string type_name; if (type) { clang::PrintingPolicy printing_policy(getASTContext()->getPrintingPolicy()); clang::QualType qual_type(GetQualType(type)); printing_policy.SuppressTagKeyword = true; const clang::TypedefType *typedef_type = qual_type->getAs(); if (typedef_type) { const clang::TypedefNameDecl *typedef_decl = typedef_type->getDecl(); type_name = typedef_decl->getQualifiedNameAsString(); } else { type_name = qual_type.getAsString(printing_policy); } } return ConstString(type_name); } uint32_t ClangASTContext::GetTypeInfo(lldb::opaque_compiler_type_t type, CompilerType *pointee_or_element_clang_type) { if (!type) return 0; if (pointee_or_element_clang_type) pointee_or_element_clang_type->Clear(); clang::QualType qual_type(GetQualType(type)); const clang::Type::TypeClass type_class = qual_type->getTypeClass(); switch (type_class) { case clang::Type::Builtin: { const clang::BuiltinType *builtin_type = llvm::dyn_cast( qual_type->getCanonicalTypeInternal()); uint32_t builtin_type_flags = eTypeIsBuiltIn | eTypeHasValue; switch (builtin_type->getKind()) { case clang::BuiltinType::ObjCId: case clang::BuiltinType::ObjCClass: if (pointee_or_element_clang_type) pointee_or_element_clang_type->SetCompilerType( getASTContext(), getASTContext()->ObjCBuiltinClassTy); 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); builtin_type_flags |= eTypeIsPointer | eTypeIsObjC; break; case clang::BuiltinType::Bool: case clang::BuiltinType::Char_U: case clang::BuiltinType::UChar: case clang::BuiltinType::WChar_U: case clang::BuiltinType::Char16: case clang::BuiltinType::Char32: case clang::BuiltinType::UShort: case clang::BuiltinType::UInt: case clang::BuiltinType::ULong: case clang::BuiltinType::ULongLong: case clang::BuiltinType::UInt128: case clang::BuiltinType::Char_S: case clang::BuiltinType::SChar: case clang::BuiltinType::WChar_S: case clang::BuiltinType::Short: case clang::BuiltinType::Int: case clang::BuiltinType::Long: case clang::BuiltinType::LongLong: case clang::BuiltinType::Int128: case clang::BuiltinType::Float: case clang::BuiltinType::Double: case clang::BuiltinType::LongDouble: builtin_type_flags |= eTypeIsScalar; if (builtin_type->isInteger()) { builtin_type_flags |= eTypeIsInteger; if (builtin_type->isSignedInteger()) builtin_type_flags |= eTypeIsSigned; } else if (builtin_type->isFloatingPoint()) builtin_type_flags |= eTypeIsFloat; break; default: break; } return builtin_type_flags; } case clang::Type::BlockPointer: if (pointee_or_element_clang_type) pointee_or_element_clang_type->SetCompilerType( getASTContext(), qual_type->getPointeeType()); return eTypeIsPointer | eTypeHasChildren | eTypeIsBlock; case clang::Type::Complex: { uint32_t complex_type_flags = eTypeIsBuiltIn | eTypeHasValue | eTypeIsComplex; const clang::ComplexType *complex_type = llvm::dyn_cast( qual_type->getCanonicalTypeInternal()); if (complex_type) { clang::QualType complex_element_type(complex_type->getElementType()); if (complex_element_type->isIntegerType()) complex_type_flags |= eTypeIsFloat; else if (complex_element_type->isFloatingType()) complex_type_flags |= eTypeIsInteger; } return complex_type_flags; } break; case clang::Type::ConstantArray: case clang::Type::DependentSizedArray: case clang::Type::IncompleteArray: case clang::Type::VariableArray: if (pointee_or_element_clang_type) pointee_or_element_clang_type->SetCompilerType( getASTContext(), llvm::cast(qual_type.getTypePtr()) ->getElementType()); return eTypeHasChildren | eTypeIsArray; case clang::Type::DependentName: return 0; case clang::Type::DependentSizedExtVector: return eTypeHasChildren | eTypeIsVector; case clang::Type::DependentTemplateSpecialization: return eTypeIsTemplate; case clang::Type::Decltype: return 0; case clang::Type::Enum: if (pointee_or_element_clang_type) pointee_or_element_clang_type->SetCompilerType( getASTContext(), llvm::cast(qual_type)->getDecl()->getIntegerType()); return eTypeIsEnumeration | eTypeHasValue; case clang::Type::Auto: return CompilerType( getASTContext(), llvm::cast(qual_type)->getDeducedType()) .GetTypeInfo(pointee_or_element_clang_type); case clang::Type::Elaborated: return CompilerType( getASTContext(), llvm::cast(qual_type)->getNamedType()) .GetTypeInfo(pointee_or_element_clang_type); case clang::Type::Paren: return CompilerType(getASTContext(), llvm::cast(qual_type)->desugar()) .GetTypeInfo(pointee_or_element_clang_type); case clang::Type::FunctionProto: return eTypeIsFuncPrototype | eTypeHasValue; case clang::Type::FunctionNoProto: return eTypeIsFuncPrototype | eTypeHasValue; case clang::Type::InjectedClassName: return 0; case clang::Type::LValueReference: case clang::Type::RValueReference: if (pointee_or_element_clang_type) pointee_or_element_clang_type->SetCompilerType( getASTContext(), llvm::cast(qual_type.getTypePtr()) ->getPointeeType()); return eTypeHasChildren | eTypeIsReference | eTypeHasValue; case clang::Type::MemberPointer: return eTypeIsPointer | eTypeIsMember | eTypeHasValue; case clang::Type::ObjCObjectPointer: if (pointee_or_element_clang_type) pointee_or_element_clang_type->SetCompilerType( getASTContext(), qual_type->getPointeeType()); return eTypeHasChildren | eTypeIsObjC | eTypeIsClass | eTypeIsPointer | eTypeHasValue; case clang::Type::ObjCObject: return eTypeHasChildren | eTypeIsObjC | eTypeIsClass; case clang::Type::ObjCInterface: return eTypeHasChildren | eTypeIsObjC | eTypeIsClass; case clang::Type::Pointer: if (pointee_or_element_clang_type) pointee_or_element_clang_type->SetCompilerType( getASTContext(), qual_type->getPointeeType()); return eTypeHasChildren | eTypeIsPointer | eTypeHasValue; case clang::Type::Record: if (qual_type->getAsCXXRecordDecl()) return eTypeHasChildren | eTypeIsClass | eTypeIsCPlusPlus; else return eTypeHasChildren | eTypeIsStructUnion; break; case clang::Type::SubstTemplateTypeParm: return eTypeIsTemplate; case clang::Type::TemplateTypeParm: return eTypeIsTemplate; case clang::Type::TemplateSpecialization: return eTypeIsTemplate; case clang::Type::Typedef: return eTypeIsTypedef | CompilerType(getASTContext(), llvm::cast(qual_type) ->getDecl() ->getUnderlyingType()) .GetTypeInfo(pointee_or_element_clang_type); case clang::Type::TypeOfExpr: return 0; case clang::Type::TypeOf: return 0; case clang::Type::UnresolvedUsing: return 0; case clang::Type::ExtVector: case clang::Type::Vector: { uint32_t vector_type_flags = eTypeHasChildren | eTypeIsVector; const clang::VectorType *vector_type = llvm::dyn_cast( qual_type->getCanonicalTypeInternal()); if (vector_type) { if (vector_type->isIntegerType()) vector_type_flags |= eTypeIsFloat; else if (vector_type->isFloatingType()) vector_type_flags |= eTypeIsInteger; } return vector_type_flags; } default: return 0; } return 0; } lldb::LanguageType ClangASTContext::GetMinimumLanguage(lldb::opaque_compiler_type_t type) { if (!type) return lldb::eLanguageTypeC; // If the type is a reference, then resolve it to what it refers to first: clang::QualType qual_type(GetCanonicalQualType(type).getNonReferenceType()); if (qual_type->isAnyPointerType()) { if (qual_type->isObjCObjectPointerType()) return lldb::eLanguageTypeObjC; clang::QualType pointee_type(qual_type->getPointeeType()); if (pointee_type->getPointeeCXXRecordDecl() != nullptr) return lldb::eLanguageTypeC_plus_plus; if (pointee_type->isObjCObjectOrInterfaceType()) return lldb::eLanguageTypeObjC; if (pointee_type->isObjCClassType()) return lldb::eLanguageTypeObjC; if (pointee_type.getTypePtr() == getASTContext()->ObjCBuiltinIdTy.getTypePtr()) return lldb::eLanguageTypeObjC; } else { if (qual_type->isObjCObjectOrInterfaceType()) return lldb::eLanguageTypeObjC; if (qual_type->getAsCXXRecordDecl()) return lldb::eLanguageTypeC_plus_plus; switch (qual_type->getTypeClass()) { default: break; case clang::Type::Builtin: switch (llvm::cast(qual_type)->getKind()) { default: case clang::BuiltinType::Void: case clang::BuiltinType::Bool: case clang::BuiltinType::Char_U: case clang::BuiltinType::UChar: case clang::BuiltinType::WChar_U: case clang::BuiltinType::Char16: case clang::BuiltinType::Char32: case clang::BuiltinType::UShort: case clang::BuiltinType::UInt: case clang::BuiltinType::ULong: case clang::BuiltinType::ULongLong: case clang::BuiltinType::UInt128: case clang::BuiltinType::Char_S: case clang::BuiltinType::SChar: case clang::BuiltinType::WChar_S: case clang::BuiltinType::Short: case clang::BuiltinType::Int: case clang::BuiltinType::Long: case clang::BuiltinType::LongLong: case clang::BuiltinType::Int128: case clang::BuiltinType::Float: case clang::BuiltinType::Double: case clang::BuiltinType::LongDouble: break; case clang::BuiltinType::NullPtr: return eLanguageTypeC_plus_plus; case clang::BuiltinType::ObjCId: case clang::BuiltinType::ObjCClass: case clang::BuiltinType::ObjCSel: return eLanguageTypeObjC; case clang::BuiltinType::Dependent: case clang::BuiltinType::Overload: case clang::BuiltinType::BoundMember: case clang::BuiltinType::UnknownAny: break; } break; case clang::Type::Typedef: return CompilerType(getASTContext(), llvm::cast(qual_type) ->getDecl() ->getUnderlyingType()) .GetMinimumLanguage(); } } return lldb::eLanguageTypeC; } lldb::TypeClass ClangASTContext::GetTypeClass(lldb::opaque_compiler_type_t type) { if (!type) return lldb::eTypeClassInvalid; clang::QualType qual_type(GetQualType(type)); switch (qual_type->getTypeClass()) { case clang::Type::UnaryTransform: break; case clang::Type::FunctionNoProto: return lldb::eTypeClassFunction; case clang::Type::FunctionProto: return lldb::eTypeClassFunction; case clang::Type::IncompleteArray: return lldb::eTypeClassArray; case clang::Type::VariableArray: return lldb::eTypeClassArray; case clang::Type::ConstantArray: return lldb::eTypeClassArray; case clang::Type::DependentSizedArray: return lldb::eTypeClassArray; case clang::Type::DependentSizedExtVector: return lldb::eTypeClassVector; case clang::Type::ExtVector: return lldb::eTypeClassVector; case clang::Type::Vector: return lldb::eTypeClassVector; case clang::Type::Builtin: return lldb::eTypeClassBuiltin; case clang::Type::ObjCObjectPointer: return lldb::eTypeClassObjCObjectPointer; case clang::Type::BlockPointer: return lldb::eTypeClassBlockPointer; case clang::Type::Pointer: return lldb::eTypeClassPointer; case clang::Type::LValueReference: return lldb::eTypeClassReference; case clang::Type::RValueReference: return lldb::eTypeClassReference; case clang::Type::MemberPointer: return lldb::eTypeClassMemberPointer; case clang::Type::Complex: if (qual_type->isComplexType()) return lldb::eTypeClassComplexFloat; else return lldb::eTypeClassComplexInteger; case clang::Type::ObjCObject: return lldb::eTypeClassObjCObject; case clang::Type::ObjCInterface: return lldb::eTypeClassObjCInterface; case clang::Type::Record: { const clang::RecordType *record_type = llvm::cast(qual_type.getTypePtr()); const clang::RecordDecl *record_decl = record_type->getDecl(); if (record_decl->isUnion()) return lldb::eTypeClassUnion; else if (record_decl->isStruct()) return lldb::eTypeClassStruct; else return lldb::eTypeClassClass; } break; case clang::Type::Enum: return lldb::eTypeClassEnumeration; case clang::Type::Typedef: return lldb::eTypeClassTypedef; case clang::Type::UnresolvedUsing: break; case clang::Type::Paren: return CompilerType(getASTContext(), llvm::cast(qual_type)->desugar()) .GetTypeClass(); case clang::Type::Auto: return CompilerType( getASTContext(), llvm::cast(qual_type)->getDeducedType()) .GetTypeClass(); case clang::Type::Elaborated: return CompilerType( getASTContext(), llvm::cast(qual_type)->getNamedType()) .GetTypeClass(); case clang::Type::Attributed: break; case clang::Type::TemplateTypeParm: break; case clang::Type::SubstTemplateTypeParm: break; case clang::Type::SubstTemplateTypeParmPack: break; case clang::Type::InjectedClassName: break; case clang::Type::DependentName: break; case clang::Type::DependentTemplateSpecialization: break; case clang::Type::PackExpansion: break; case clang::Type::TypeOfExpr: break; case clang::Type::TypeOf: break; case clang::Type::Decltype: break; case clang::Type::TemplateSpecialization: break; case clang::Type::DeducedTemplateSpecialization: break; case clang::Type::Atomic: break; case clang::Type::Pipe: break; // pointer type decayed from an array or function type. case clang::Type::Decayed: break; case clang::Type::Adjusted: break; case clang::Type::ObjCTypeParam: break; } // We don't know hot to display this type... return lldb::eTypeClassOther; } unsigned ClangASTContext::GetTypeQualifiers(lldb::opaque_compiler_type_t type) { if (type) return GetQualType(type).getQualifiers().getCVRQualifiers(); return 0; } //---------------------------------------------------------------------- // Creating related types //---------------------------------------------------------------------- CompilerType ClangASTContext::GetArrayElementType(lldb::opaque_compiler_type_t type, uint64_t *stride) { if (type) { clang::QualType qual_type(GetCanonicalQualType(type)); const clang::Type *array_eletype = qual_type.getTypePtr()->getArrayElementTypeNoTypeQual(); if (!array_eletype) return CompilerType(); CompilerType element_type(getASTContext(), array_eletype->getCanonicalTypeUnqualified()); // TODO: the real stride will be >= this value.. find the real one! if (stride) *stride = element_type.GetByteSize(nullptr); return element_type; } return CompilerType(); } CompilerType ClangASTContext::GetArrayType(lldb::opaque_compiler_type_t type, 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)); } } return CompilerType(); } CompilerType ClangASTContext::GetCanonicalType(lldb::opaque_compiler_type_t type) { if (type) return CompilerType(getASTContext(), GetCanonicalQualType(type)); return CompilerType(); } static clang::QualType GetFullyUnqualifiedType_Impl(clang::ASTContext *ast, clang::QualType qual_type) { if (qual_type->isPointerType()) qual_type = ast->getPointerType( GetFullyUnqualifiedType_Impl(ast, qual_type->getPointeeType())); else qual_type = qual_type.getUnqualifiedType(); qual_type.removeLocalConst(); qual_type.removeLocalRestrict(); qual_type.removeLocalVolatile(); return qual_type; } CompilerType ClangASTContext::GetFullyUnqualifiedType(lldb::opaque_compiler_type_t type) { if (type) return CompilerType( getASTContext(), GetFullyUnqualifiedType_Impl(getASTContext(), GetQualType(type))); return CompilerType(); } int ClangASTContext::GetFunctionArgumentCount( lldb::opaque_compiler_type_t type) { if (type) { const clang::FunctionProtoType *func = llvm::dyn_cast(GetCanonicalQualType(type)); if (func) return func->getNumParams(); } return -1; } CompilerType ClangASTContext::GetFunctionArgumentTypeAtIndex( lldb::opaque_compiler_type_t type, size_t idx) { if (type) { const clang::FunctionProtoType *func = llvm::dyn_cast(GetQualType(type)); if (func) { const uint32_t num_args = func->getNumParams(); if (idx < num_args) return CompilerType(getASTContext(), func->getParamType(idx)); } } return CompilerType(); } CompilerType ClangASTContext::GetFunctionReturnType(lldb::opaque_compiler_type_t type) { if (type) { clang::QualType qual_type(GetQualType(type)); const clang::FunctionProtoType *func = llvm::dyn_cast(qual_type.getTypePtr()); if (func) return CompilerType(getASTContext(), func->getReturnType()); } return CompilerType(); } size_t ClangASTContext::GetNumMemberFunctions(lldb::opaque_compiler_type_t type) { size_t num_functions = 0; if (type) { clang::QualType qual_type(GetCanonicalQualType(type)); switch (qual_type->getTypeClass()) { case clang::Type::Record: if (GetCompleteQualType(getASTContext(), qual_type)) { const clang::RecordType *record_type = llvm::cast(qual_type.getTypePtr()); const clang::RecordDecl *record_decl = record_type->getDecl(); assert(record_decl); const clang::CXXRecordDecl *cxx_record_decl = llvm::dyn_cast(record_decl); if (cxx_record_decl) num_functions = std::distance(cxx_record_decl->method_begin(), cxx_record_decl->method_end()); } break; case clang::Type::ObjCObjectPointer: { const clang::ObjCObjectPointerType *objc_class_type = qual_type->getAsObjCInterfacePointerType(); const clang::ObjCInterfaceType *objc_interface_type = objc_class_type->getInterfaceType(); if (objc_interface_type && GetCompleteType(static_cast( const_cast(objc_interface_type)))) { clang::ObjCInterfaceDecl *class_interface_decl = objc_interface_type->getDecl(); if (class_interface_decl) { num_functions = std::distance(class_interface_decl->meth_begin(), class_interface_decl->meth_end()); } } break; } case clang::Type::ObjCObject: case clang::Type::ObjCInterface: if (GetCompleteType(type)) { const clang::ObjCObjectType *objc_class_type = llvm::dyn_cast(qual_type.getTypePtr()); if (objc_class_type) { clang::ObjCInterfaceDecl *class_interface_decl = objc_class_type->getInterface(); if (class_interface_decl) num_functions = std::distance(class_interface_decl->meth_begin(), class_interface_decl->meth_end()); } } break; case clang::Type::Typedef: return CompilerType(getASTContext(), llvm::cast(qual_type) ->getDecl() ->getUnderlyingType()) .GetNumMemberFunctions(); case clang::Type::Auto: return CompilerType( getASTContext(), llvm::cast(qual_type)->getDeducedType()) .GetNumMemberFunctions(); case clang::Type::Elaborated: return CompilerType( getASTContext(), llvm::cast(qual_type)->getNamedType()) .GetNumMemberFunctions(); case clang::Type::Paren: return CompilerType(getASTContext(), llvm::cast(qual_type)->desugar()) .GetNumMemberFunctions(); default: break; } } return num_functions; } TypeMemberFunctionImpl ClangASTContext::GetMemberFunctionAtIndex(lldb::opaque_compiler_type_t type, size_t idx) { std::string name; MemberFunctionKind kind(MemberFunctionKind::eMemberFunctionKindUnknown); CompilerType clang_type; CompilerDecl clang_decl; if (type) { clang::QualType qual_type(GetCanonicalQualType(type)); switch (qual_type->getTypeClass()) { case clang::Type::Record: if (GetCompleteQualType(getASTContext(), qual_type)) { const clang::RecordType *record_type = llvm::cast(qual_type.getTypePtr()); const clang::RecordDecl *record_decl = record_type->getDecl(); assert(record_decl); const clang::CXXRecordDecl *cxx_record_decl = llvm::dyn_cast(record_decl); if (cxx_record_decl) { auto method_iter = cxx_record_decl->method_begin(); auto method_end = cxx_record_decl->method_end(); if (idx < static_cast(std::distance(method_iter, method_end))) { std::advance(method_iter, idx); clang::CXXMethodDecl *cxx_method_decl = method_iter->getCanonicalDecl(); if (cxx_method_decl) { name = cxx_method_decl->getDeclName().getAsString(); if (cxx_method_decl->isStatic()) kind = lldb::eMemberFunctionKindStaticMethod; else if (llvm::isa(cxx_method_decl)) kind = lldb::eMemberFunctionKindConstructor; else if (llvm::isa(cxx_method_decl)) kind = lldb::eMemberFunctionKindDestructor; else kind = lldb::eMemberFunctionKindInstanceMethod; clang_type = CompilerType( this, cxx_method_decl->getType().getAsOpaquePtr()); clang_decl = CompilerDecl(this, cxx_method_decl); } } } } break; case clang::Type::ObjCObjectPointer: { const clang::ObjCObjectPointerType *objc_class_type = qual_type->getAsObjCInterfacePointerType(); const clang::ObjCInterfaceType *objc_interface_type = objc_class_type->getInterfaceType(); if (objc_interface_type && GetCompleteType(static_cast( const_cast(objc_interface_type)))) { clang::ObjCInterfaceDecl *class_interface_decl = objc_interface_type->getDecl(); if (class_interface_decl) { auto method_iter = class_interface_decl->meth_begin(); auto method_end = class_interface_decl->meth_end(); if (idx < static_cast(std::distance(method_iter, method_end))) { std::advance(method_iter, idx); clang::ObjCMethodDecl *objc_method_decl = method_iter->getCanonicalDecl(); if (objc_method_decl) { clang_decl = CompilerDecl(this, objc_method_decl); name = objc_method_decl->getSelector().getAsString(); if (objc_method_decl->isClassMethod()) kind = lldb::eMemberFunctionKindStaticMethod; else kind = lldb::eMemberFunctionKindInstanceMethod; } } } } break; } case clang::Type::ObjCObject: case clang::Type::ObjCInterface: if (GetCompleteType(type)) { const clang::ObjCObjectType *objc_class_type = llvm::dyn_cast(qual_type.getTypePtr()); if (objc_class_type) { clang::ObjCInterfaceDecl *class_interface_decl = objc_class_type->getInterface(); if (class_interface_decl) { auto method_iter = class_interface_decl->meth_begin(); auto method_end = class_interface_decl->meth_end(); if (idx < static_cast(std::distance(method_iter, method_end))) { std::advance(method_iter, idx); clang::ObjCMethodDecl *objc_method_decl = method_iter->getCanonicalDecl(); if (objc_method_decl) { clang_decl = CompilerDecl(this, objc_method_decl); name = objc_method_decl->getSelector().getAsString(); if (objc_method_decl->isClassMethod()) kind = lldb::eMemberFunctionKindStaticMethod; else kind = lldb::eMemberFunctionKindInstanceMethod; } } } } } break; case clang::Type::Typedef: return GetMemberFunctionAtIndex(llvm::cast(qual_type) ->getDecl() ->getUnderlyingType() .getAsOpaquePtr(), idx); case clang::Type::Auto: return GetMemberFunctionAtIndex(llvm::cast(qual_type) ->getDeducedType() .getAsOpaquePtr(), idx); case clang::Type::Elaborated: return GetMemberFunctionAtIndex( llvm::cast(qual_type) ->getNamedType() .getAsOpaquePtr(), idx); case clang::Type::Paren: return GetMemberFunctionAtIndex( llvm::cast(qual_type)->desugar().getAsOpaquePtr(), idx); default: break; } } if (kind == eMemberFunctionKindUnknown) return TypeMemberFunctionImpl(); else return TypeMemberFunctionImpl(clang_type, clang_decl, name, kind); } CompilerType ClangASTContext::GetNonReferenceType(lldb::opaque_compiler_type_t type) { if (type) return CompilerType(getASTContext(), GetQualType(type).getNonReferenceType()); return CompilerType(); } CompilerType ClangASTContext::CreateTypedefType( const CompilerType &type, const char *typedef_name, const CompilerDeclContext &compiler_decl_ctx) { if (type && typedef_name && typedef_name[0]) { ClangASTContext *ast = llvm::dyn_cast(type.GetTypeSystem()); if (!ast) return CompilerType(); 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(); 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)); decl->setAccess(clang::AS_public); // TODO respect proper access specifier // Get a uniqued clang::QualType for the typedef decl type return CompilerType(clang_ast, clang_ast->getTypedefType(decl)); } return CompilerType(); } CompilerType ClangASTContext::GetPointeeType(lldb::opaque_compiler_type_t type) { if (type) { clang::QualType qual_type(GetQualType(type)); return CompilerType(getASTContext(), qual_type.getTypePtr()->getPointeeType()); } return CompilerType(); } CompilerType ClangASTContext::GetPointerType(lldb::opaque_compiler_type_t type) { if (type) { clang::QualType qual_type(GetQualType(type)); const clang::Type::TypeClass type_class = qual_type->getTypeClass(); switch (type_class) { case clang::Type::ObjCObject: case clang::Type::ObjCInterface: return CompilerType(getASTContext(), getASTContext()->getObjCObjectPointerType(qual_type)); default: return CompilerType(getASTContext(), getASTContext()->getPointerType(qual_type)); } } return CompilerType(); } CompilerType ClangASTContext::GetLValueReferenceType(lldb::opaque_compiler_type_t type) { if (type) return CompilerType(this, getASTContext() ->getLValueReferenceType(GetQualType(type)) .getAsOpaquePtr()); else return CompilerType(); } CompilerType ClangASTContext::GetRValueReferenceType(lldb::opaque_compiler_type_t type) { if (type) return CompilerType(this, getASTContext() ->getRValueReferenceType(GetQualType(type)) .getAsOpaquePtr()); else return CompilerType(); } CompilerType ClangASTContext::AddConstModifier(lldb::opaque_compiler_type_t type) { if (type) { clang::QualType result(GetQualType(type)); result.addConst(); return CompilerType(this, result.getAsOpaquePtr()); } return CompilerType(); } CompilerType ClangASTContext::AddVolatileModifier(lldb::opaque_compiler_type_t type) { if (type) { clang::QualType result(GetQualType(type)); result.addVolatile(); return CompilerType(this, result.getAsOpaquePtr()); } return CompilerType(); } CompilerType ClangASTContext::AddRestrictModifier(lldb::opaque_compiler_type_t type) { if (type) { clang::QualType result(GetQualType(type)); result.addRestrict(); return CompilerType(this, result.getAsOpaquePtr()); } return CompilerType(); } CompilerType ClangASTContext::CreateTypedef(lldb::opaque_compiler_type_t type, const char *typedef_name, const CompilerDeclContext &compiler_decl_ctx) { if (type) { 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(); 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::TagDecl *tdecl = nullptr; if (!qual_type.isNull()) { if (const clang::RecordType *rt = qual_type->getAs()) tdecl = rt->getDecl(); if (const clang::EnumType *et = qual_type->getAs()) tdecl = et->getDecl(); } // Check whether this declaration is an anonymous struct, union, or enum, // hidden behind a typedef. If so, we // try to check whether we have a typedef tag to attach to the original // record declaration if (tdecl && !tdecl->getIdentifier() && !tdecl->getTypedefNameForAnonDecl()) tdecl->setTypedefNameForAnonDecl(decl); 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 CompilerType(); } CompilerType ClangASTContext::GetTypedefedType(lldb::opaque_compiler_type_t type) { if (type) { const clang::TypedefType *typedef_type = llvm::dyn_cast(GetQualType(type)); if (typedef_type) return CompilerType(getASTContext(), typedef_type->getDecl()->getUnderlyingType()); } return CompilerType(); } //---------------------------------------------------------------------- // Create related types using the current type's AST //---------------------------------------------------------------------- CompilerType ClangASTContext::GetBasicTypeFromAST(lldb::BasicType basic_type) { return ClangASTContext::GetBasicType(getASTContext(), basic_type); } //---------------------------------------------------------------------- // Exploring the type //---------------------------------------------------------------------- uint64_t ClangASTContext::GetBitSize(lldb::opaque_compiler_type_t type, ExecutionContextScope *exe_scope) { if (GetCompleteType(type)) { clang::QualType qual_type(GetCanonicalQualType(type)); const clang::Type::TypeClass type_class = qual_type->getTypeClass(); switch (type_class) { case clang::Type::Record: if (GetCompleteType(type)) return getASTContext()->getTypeSize(qual_type); else return 0; break; case clang::Type::ObjCInterface: case clang::Type::ObjCObject: { ExecutionContext exe_ctx(exe_scope); Process *process = exe_ctx.GetProcessPtr(); if (process) { ObjCLanguageRuntime *objc_runtime = process->GetObjCLanguageRuntime(); if (objc_runtime) { uint64_t bit_size = 0; if (objc_runtime->GetTypeBitSize( CompilerType(getASTContext(), qual_type), bit_size)) return bit_size; } } else { static bool g_printed = false; if (!g_printed) { StreamString s; DumpTypeDescription(type, &s); llvm::outs() << "warning: trying to determine the size of type "; llvm::outs() << s.GetString() << "\n"; llvm::outs() << "without a valid ExecutionContext. this is not " "reliable. please file a bug against LLDB.\n"; llvm::outs() << "backtrace:\n"; llvm::sys::PrintStackTrace(llvm::outs()); llvm::outs() << "\n"; g_printed = true; } } } LLVM_FALLTHROUGH; default: const uint32_t bit_size = getASTContext()->getTypeSize(qual_type); if (bit_size == 0) { if (qual_type->isIncompleteArrayType()) return getASTContext()->getTypeSize( qual_type->getArrayElementTypeNoTypeQual() ->getCanonicalTypeUnqualified()); } if (qual_type->isObjCObjectOrInterfaceType()) return bit_size + getASTContext()->getTypeSize( getASTContext()->ObjCBuiltinClassTy); return bit_size; } } return 0; } size_t ClangASTContext::GetTypeBitAlign(lldb::opaque_compiler_type_t type) { if (GetCompleteType(type)) return getASTContext()->getTypeAlign(GetQualType(type)); return 0; } lldb::Encoding ClangASTContext::GetEncoding(lldb::opaque_compiler_type_t type, uint64_t &count) { if (!type) return lldb::eEncodingInvalid; count = 1; clang::QualType qual_type(GetCanonicalQualType(type)); switch (qual_type->getTypeClass()) { case clang::Type::UnaryTransform: break; case clang::Type::FunctionNoProto: case clang::Type::FunctionProto: break; case clang::Type::IncompleteArray: case clang::Type::VariableArray: break; case clang::Type::ConstantArray: break; case clang::Type::ExtVector: case clang::Type::Vector: // TODO: Set this to more than one??? break; case clang::Type::Builtin: switch (llvm::cast(qual_type)->getKind()) { case clang::BuiltinType::Void: break; case clang::BuiltinType::Bool: case clang::BuiltinType::Char_S: case clang::BuiltinType::SChar: case clang::BuiltinType::WChar_S: case clang::BuiltinType::Char16: case clang::BuiltinType::Char32: case clang::BuiltinType::Short: case clang::BuiltinType::Int: case clang::BuiltinType::Long: case clang::BuiltinType::LongLong: case clang::BuiltinType::Int128: return lldb::eEncodingSint; case clang::BuiltinType::Char_U: case clang::BuiltinType::UChar: case clang::BuiltinType::WChar_U: case clang::BuiltinType::UShort: case clang::BuiltinType::UInt: case clang::BuiltinType::ULong: case clang::BuiltinType::ULongLong: case clang::BuiltinType::UInt128: return lldb::eEncodingUint; case clang::BuiltinType::Half: case clang::BuiltinType::Float: case clang::BuiltinType::Float128: case clang::BuiltinType::Double: case clang::BuiltinType::LongDouble: return lldb::eEncodingIEEE754; case clang::BuiltinType::ObjCClass: case clang::BuiltinType::ObjCId: case clang::BuiltinType::ObjCSel: return lldb::eEncodingUint; case clang::BuiltinType::NullPtr: return lldb::eEncodingUint; case clang::BuiltinType::Kind::ARCUnbridgedCast: case clang::BuiltinType::Kind::BoundMember: case clang::BuiltinType::Kind::BuiltinFn: case clang::BuiltinType::Kind::Dependent: case clang::BuiltinType::Kind::OCLClkEvent: case clang::BuiltinType::Kind::OCLEvent: case clang::BuiltinType::Kind::OCLImage1dRO: case clang::BuiltinType::Kind::OCLImage1dWO: case clang::BuiltinType::Kind::OCLImage1dRW: case clang::BuiltinType::Kind::OCLImage1dArrayRO: case clang::BuiltinType::Kind::OCLImage1dArrayWO: case clang::BuiltinType::Kind::OCLImage1dArrayRW: case clang::BuiltinType::Kind::OCLImage1dBufferRO: case clang::BuiltinType::Kind::OCLImage1dBufferWO: case clang::BuiltinType::Kind::OCLImage1dBufferRW: case clang::BuiltinType::Kind::OCLImage2dRO: case clang::BuiltinType::Kind::OCLImage2dWO: case clang::BuiltinType::Kind::OCLImage2dRW: case clang::BuiltinType::Kind::OCLImage2dArrayRO: case clang::BuiltinType::Kind::OCLImage2dArrayWO: case clang::BuiltinType::Kind::OCLImage2dArrayRW: case clang::BuiltinType::Kind::OCLImage2dArrayDepthRO: case clang::BuiltinType::Kind::OCLImage2dArrayDepthWO: case clang::BuiltinType::Kind::OCLImage2dArrayDepthRW: case clang::BuiltinType::Kind::OCLImage2dArrayMSAARO: case clang::BuiltinType::Kind::OCLImage2dArrayMSAAWO: case clang::BuiltinType::Kind::OCLImage2dArrayMSAARW: case clang::BuiltinType::Kind::OCLImage2dArrayMSAADepthRO: case clang::BuiltinType::Kind::OCLImage2dArrayMSAADepthWO: case clang::BuiltinType::Kind::OCLImage2dArrayMSAADepthRW: case clang::BuiltinType::Kind::OCLImage2dDepthRO: case clang::BuiltinType::Kind::OCLImage2dDepthWO: case clang::BuiltinType::Kind::OCLImage2dDepthRW: case clang::BuiltinType::Kind::OCLImage2dMSAARO: case clang::BuiltinType::Kind::OCLImage2dMSAAWO: case clang::BuiltinType::Kind::OCLImage2dMSAARW: case clang::BuiltinType::Kind::OCLImage2dMSAADepthRO: case clang::BuiltinType::Kind::OCLImage2dMSAADepthWO: case clang::BuiltinType::Kind::OCLImage2dMSAADepthRW: case clang::BuiltinType::Kind::OCLImage3dRO: case clang::BuiltinType::Kind::OCLImage3dWO: case clang::BuiltinType::Kind::OCLImage3dRW: case clang::BuiltinType::Kind::OCLQueue: case clang::BuiltinType::Kind::OCLReserveID: case clang::BuiltinType::Kind::OCLSampler: case clang::BuiltinType::Kind::OMPArraySection: case clang::BuiltinType::Kind::Overload: case clang::BuiltinType::Kind::PseudoObject: case clang::BuiltinType::Kind::UnknownAny: break; } break; // All pointer types are represented as unsigned integer encodings. // We may nee to add a eEncodingPointer if we ever need to know the // difference case clang::Type::ObjCObjectPointer: case clang::Type::BlockPointer: case clang::Type::Pointer: case clang::Type::LValueReference: case clang::Type::RValueReference: case clang::Type::MemberPointer: return lldb::eEncodingUint; case clang::Type::Complex: { lldb::Encoding encoding = lldb::eEncodingIEEE754; if (qual_type->isComplexType()) encoding = lldb::eEncodingIEEE754; else { const clang::ComplexType *complex_type = qual_type->getAsComplexIntegerType(); if (complex_type) encoding = CompilerType(getASTContext(), complex_type->getElementType()) .GetEncoding(count); else encoding = lldb::eEncodingSint; } count = 2; return encoding; } case clang::Type::ObjCInterface: break; case clang::Type::Record: break; case clang::Type::Enum: return lldb::eEncodingSint; case clang::Type::Typedef: return CompilerType(getASTContext(), llvm::cast(qual_type) ->getDecl() ->getUnderlyingType()) .GetEncoding(count); case clang::Type::Auto: return CompilerType( getASTContext(), llvm::cast(qual_type)->getDeducedType()) .GetEncoding(count); case clang::Type::Elaborated: return CompilerType( getASTContext(), llvm::cast(qual_type)->getNamedType()) .GetEncoding(count); case clang::Type::Paren: return CompilerType(getASTContext(), llvm::cast(qual_type)->desugar()) .GetEncoding(count); case clang::Type::DependentSizedArray: case clang::Type::DependentSizedExtVector: case clang::Type::UnresolvedUsing: case clang::Type::Attributed: case clang::Type::TemplateTypeParm: case clang::Type::SubstTemplateTypeParm: case clang::Type::SubstTemplateTypeParmPack: case clang::Type::InjectedClassName: case clang::Type::DependentName: case clang::Type::DependentTemplateSpecialization: case clang::Type::PackExpansion: case clang::Type::ObjCObject: case clang::Type::TypeOfExpr: case clang::Type::TypeOf: case clang::Type::Decltype: case clang::Type::TemplateSpecialization: case clang::Type::DeducedTemplateSpecialization: case clang::Type::Atomic: case clang::Type::Adjusted: case clang::Type::Pipe: break; // pointer type decayed from an array or function type. case clang::Type::Decayed: break; case clang::Type::ObjCTypeParam: break; } count = 0; return lldb::eEncodingInvalid; } lldb::Format ClangASTContext::GetFormat(lldb::opaque_compiler_type_t type) { if (!type) return lldb::eFormatDefault; clang::QualType qual_type(GetCanonicalQualType(type)); switch (qual_type->getTypeClass()) { case clang::Type::UnaryTransform: break; case clang::Type::FunctionNoProto: case clang::Type::FunctionProto: break; case clang::Type::IncompleteArray: case clang::Type::VariableArray: break; case clang::Type::ConstantArray: return lldb::eFormatVoid; // no value case clang::Type::ExtVector: case clang::Type::Vector: break; case clang::Type::Builtin: switch (llvm::cast(qual_type)->getKind()) { // default: assert(0 && "Unknown builtin type!"); case clang::BuiltinType::UnknownAny: case clang::BuiltinType::Void: case clang::BuiltinType::BoundMember: break; case clang::BuiltinType::Bool: return lldb::eFormatBoolean; case clang::BuiltinType::Char_S: case clang::BuiltinType::SChar: case clang::BuiltinType::WChar_S: case clang::BuiltinType::Char_U: case clang::BuiltinType::UChar: case clang::BuiltinType::WChar_U: return lldb::eFormatChar; case clang::BuiltinType::Char16: return lldb::eFormatUnicode16; case clang::BuiltinType::Char32: return lldb::eFormatUnicode32; case clang::BuiltinType::UShort: return lldb::eFormatUnsigned; case clang::BuiltinType::Short: return lldb::eFormatDecimal; case clang::BuiltinType::UInt: return lldb::eFormatUnsigned; case clang::BuiltinType::Int: return lldb::eFormatDecimal; case clang::BuiltinType::ULong: return lldb::eFormatUnsigned; case clang::BuiltinType::Long: return lldb::eFormatDecimal; case clang::BuiltinType::ULongLong: return lldb::eFormatUnsigned; case clang::BuiltinType::LongLong: return lldb::eFormatDecimal; case clang::BuiltinType::UInt128: return lldb::eFormatUnsigned; case clang::BuiltinType::Int128: return lldb::eFormatDecimal; case clang::BuiltinType::Half: case clang::BuiltinType::Float: case clang::BuiltinType::Double: case clang::BuiltinType::LongDouble: return lldb::eFormatFloat; default: return lldb::eFormatHex; } break; case clang::Type::ObjCObjectPointer: return lldb::eFormatHex; case clang::Type::BlockPointer: return lldb::eFormatHex; case clang::Type::Pointer: return lldb::eFormatHex; case clang::Type::LValueReference: case clang::Type::RValueReference: return lldb::eFormatHex; case clang::Type::MemberPointer: break; case clang::Type::Complex: { if (qual_type->isComplexType()) return lldb::eFormatComplex; else return lldb::eFormatComplexInteger; } case clang::Type::ObjCInterface: break; case clang::Type::Record: break; case clang::Type::Enum: return lldb::eFormatEnum; case clang::Type::Typedef: return CompilerType(getASTContext(), llvm::cast(qual_type) ->getDecl() ->getUnderlyingType()) .GetFormat(); case clang::Type::Auto: return CompilerType(getASTContext(), llvm::cast(qual_type)->desugar()) .GetFormat(); case clang::Type::Paren: return CompilerType(getASTContext(), llvm::cast(qual_type)->desugar()) .GetFormat(); case clang::Type::Elaborated: return CompilerType( getASTContext(), llvm::cast(qual_type)->getNamedType()) .GetFormat(); case clang::Type::DependentSizedArray: case clang::Type::DependentSizedExtVector: case clang::Type::UnresolvedUsing: case clang::Type::Attributed: case clang::Type::TemplateTypeParm: case clang::Type::SubstTemplateTypeParm: case clang::Type::SubstTemplateTypeParmPack: case clang::Type::InjectedClassName: case clang::Type::DependentName: case clang::Type::DependentTemplateSpecialization: case clang::Type::PackExpansion: case clang::Type::ObjCObject: case clang::Type::TypeOfExpr: case clang::Type::TypeOf: case clang::Type::Decltype: case clang::Type::TemplateSpecialization: case clang::Type::DeducedTemplateSpecialization: case clang::Type::Atomic: case clang::Type::Adjusted: case clang::Type::Pipe: break; // pointer type decayed from an array or function type. case clang::Type::Decayed: break; case clang::Type::ObjCTypeParam: break; } // We don't know hot to display this type... return lldb::eFormatBytes; } static bool ObjCDeclHasIVars(clang::ObjCInterfaceDecl *class_interface_decl, bool check_superclass) { while (class_interface_decl) { if (class_interface_decl->ivar_size() > 0) return true; if (check_superclass) class_interface_decl = class_interface_decl->getSuperClass(); else break; } return false; } uint32_t ClangASTContext::GetNumChildren(lldb::opaque_compiler_type_t type, bool omit_empty_base_classes) { if (!type) return 0; uint32_t num_children = 0; clang::QualType qual_type(GetQualType(type)); const clang::Type::TypeClass type_class = qual_type->getTypeClass(); switch (type_class) { case clang::Type::Builtin: switch (llvm::cast(qual_type)->getKind()) { case clang::BuiltinType::ObjCId: // child is Class case clang::BuiltinType::ObjCClass: // child is Class num_children = 1; break; default: break; } break; case clang::Type::Complex: return 0; case clang::Type::Record: if (GetCompleteQualType(getASTContext(), qual_type)) { const clang::RecordType *record_type = llvm::cast(qual_type.getTypePtr()); const clang::RecordDecl *record_decl = record_type->getDecl(); assert(record_decl); const clang::CXXRecordDecl *cxx_record_decl = llvm::dyn_cast(record_decl); if (cxx_record_decl) { if (omit_empty_base_classes) { // Check each base classes to see if it or any of its // base classes contain any fields. This can help // limit the noise in variable views by not having to // show base classes that contain no members. clang::CXXRecordDecl::base_class_const_iterator base_class, base_class_end; for (base_class = cxx_record_decl->bases_begin(), base_class_end = cxx_record_decl->bases_end(); base_class != base_class_end; ++base_class) { const clang::CXXRecordDecl *base_class_decl = llvm::cast( base_class->getType() ->getAs() ->getDecl()); // Skip empty base classes if (ClangASTContext::RecordHasFields(base_class_decl) == false) continue; num_children++; } } else { // Include all base classes num_children += cxx_record_decl->getNumBases(); } } clang::RecordDecl::field_iterator field, field_end; for (field = record_decl->field_begin(), field_end = record_decl->field_end(); field != field_end; ++field) ++num_children; } break; case clang::Type::ObjCObject: case clang::Type::ObjCInterface: if (GetCompleteQualType(getASTContext(), qual_type)) { const clang::ObjCObjectType *objc_class_type = llvm::dyn_cast(qual_type.getTypePtr()); assert(objc_class_type); if (objc_class_type) { clang::ObjCInterfaceDecl *class_interface_decl = objc_class_type->getInterface(); if (class_interface_decl) { clang::ObjCInterfaceDecl *superclass_interface_decl = class_interface_decl->getSuperClass(); if (superclass_interface_decl) { if (omit_empty_base_classes) { if (ObjCDeclHasIVars(superclass_interface_decl, true)) ++num_children; } else ++num_children; } num_children += class_interface_decl->ivar_size(); } } } break; case clang::Type::ObjCObjectPointer: { const clang::ObjCObjectPointerType *pointer_type = llvm::cast(qual_type.getTypePtr()); clang::QualType pointee_type = pointer_type->getPointeeType(); uint32_t num_pointee_children = CompilerType(getASTContext(), pointee_type) .GetNumChildren(omit_empty_base_classes); // If this type points to a simple type, then it has 1 child if (num_pointee_children == 0) num_children = 1; else num_children = num_pointee_children; } break; case clang::Type::Vector: case clang::Type::ExtVector: num_children = llvm::cast(qual_type.getTypePtr())->getNumElements(); break; case clang::Type::ConstantArray: num_children = llvm::cast(qual_type.getTypePtr()) ->getSize() .getLimitedValue(); break; case clang::Type::Pointer: { const clang::PointerType *pointer_type = llvm::cast(qual_type.getTypePtr()); clang::QualType pointee_type(pointer_type->getPointeeType()); uint32_t num_pointee_children = CompilerType(getASTContext(), pointee_type) .GetNumChildren(omit_empty_base_classes); 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 num_children = GetNumPointeeChildren(pointee_type); } else num_children = num_pointee_children; } break; case clang::Type::LValueReference: case clang::Type::RValueReference: { const clang::ReferenceType *reference_type = llvm::cast(qual_type.getTypePtr()); clang::QualType pointee_type = reference_type->getPointeeType(); uint32_t num_pointee_children = CompilerType(getASTContext(), pointee_type) .GetNumChildren(omit_empty_base_classes); // If this type points to a simple type, then it has 1 child if (num_pointee_children == 0) num_children = 1; else num_children = num_pointee_children; } break; case clang::Type::Typedef: num_children = CompilerType(getASTContext(), llvm::cast(qual_type) ->getDecl() ->getUnderlyingType()) .GetNumChildren(omit_empty_base_classes); break; case clang::Type::Auto: num_children = CompilerType(getASTContext(), llvm::cast(qual_type)->getDeducedType()) .GetNumChildren(omit_empty_base_classes); break; case clang::Type::Elaborated: num_children = CompilerType( getASTContext(), llvm::cast(qual_type)->getNamedType()) .GetNumChildren(omit_empty_base_classes); break; case clang::Type::Paren: num_children = CompilerType(getASTContext(), llvm::cast(qual_type)->desugar()) .GetNumChildren(omit_empty_base_classes); break; default: break; } return num_children; } CompilerType ClangASTContext::GetBuiltinTypeByName(const ConstString &name) { return GetBasicType(GetBasicTypeEnumeration(name)); } lldb::BasicType ClangASTContext::GetBasicTypeEnumeration(lldb::opaque_compiler_type_t type) { if (type) { clang::QualType qual_type(GetQualType(type)); const clang::Type::TypeClass type_class = qual_type->getTypeClass(); if (type_class == clang::Type::Builtin) { switch (llvm::cast(qual_type)->getKind()) { case clang::BuiltinType::Void: return eBasicTypeVoid; case clang::BuiltinType::Bool: return eBasicTypeBool; case clang::BuiltinType::Char_S: return eBasicTypeSignedChar; case clang::BuiltinType::Char_U: return eBasicTypeUnsignedChar; case clang::BuiltinType::Char16: return eBasicTypeChar16; case clang::BuiltinType::Char32: return eBasicTypeChar32; case clang::BuiltinType::UChar: return eBasicTypeUnsignedChar; case clang::BuiltinType::SChar: return eBasicTypeSignedChar; case clang::BuiltinType::WChar_S: return eBasicTypeSignedWChar; case clang::BuiltinType::WChar_U: return eBasicTypeUnsignedWChar; case clang::BuiltinType::Short: return eBasicTypeShort; case clang::BuiltinType::UShort: return eBasicTypeUnsignedShort; case clang::BuiltinType::Int: return eBasicTypeInt; case clang::BuiltinType::UInt: return eBasicTypeUnsignedInt; case clang::BuiltinType::Long: return eBasicTypeLong; case clang::BuiltinType::ULong: return eBasicTypeUnsignedLong; case clang::BuiltinType::LongLong: return eBasicTypeLongLong; case clang::BuiltinType::ULongLong: return eBasicTypeUnsignedLongLong; case clang::BuiltinType::Int128: return eBasicTypeInt128; case clang::BuiltinType::UInt128: return eBasicTypeUnsignedInt128; case clang::BuiltinType::Half: return eBasicTypeHalf; case clang::BuiltinType::Float: return eBasicTypeFloat; case clang::BuiltinType::Double: return eBasicTypeDouble; case clang::BuiltinType::LongDouble: return eBasicTypeLongDouble; case clang::BuiltinType::NullPtr: return eBasicTypeNullPtr; case clang::BuiltinType::ObjCId: return eBasicTypeObjCID; case clang::BuiltinType::ObjCClass: return eBasicTypeObjCClass; case clang::BuiltinType::ObjCSel: return eBasicTypeObjCSel; default: return eBasicTypeOther; } } } return eBasicTypeInvalid; } void ClangASTContext::ForEachEnumerator( lldb::opaque_compiler_type_t type, std::function const &callback) { const clang::EnumType *enum_type = llvm::dyn_cast(GetCanonicalQualType(type)); if (enum_type) { const clang::EnumDecl *enum_decl = enum_type->getDecl(); if (enum_decl) { CompilerType integer_type(this, enum_decl->getIntegerType().getAsOpaquePtr()); clang::EnumDecl::enumerator_iterator enum_pos, enum_end_pos; for (enum_pos = enum_decl->enumerator_begin(), enum_end_pos = enum_decl->enumerator_end(); enum_pos != enum_end_pos; ++enum_pos) { ConstString name(enum_pos->getNameAsString().c_str()); if (!callback(integer_type, name, enum_pos->getInitVal())) break; } } } } #pragma mark Aggregate Types uint32_t ClangASTContext::GetNumFields(lldb::opaque_compiler_type_t type) { if (!type) return 0; uint32_t count = 0; clang::QualType qual_type(GetCanonicalQualType(type)); const clang::Type::TypeClass type_class = qual_type->getTypeClass(); switch (type_class) { case clang::Type::Record: if (GetCompleteType(type)) { const clang::RecordType *record_type = llvm::dyn_cast(qual_type.getTypePtr()); if (record_type) { clang::RecordDecl *record_decl = record_type->getDecl(); if (record_decl) { uint32_t field_idx = 0; clang::RecordDecl::field_iterator field, field_end; for (field = record_decl->field_begin(), field_end = record_decl->field_end(); field != field_end; ++field) ++field_idx; count = field_idx; } } } break; case clang::Type::Typedef: count = CompilerType(getASTContext(), llvm::cast(qual_type) ->getDecl() ->getUnderlyingType()) .GetNumFields(); break; case clang::Type::Auto: count = CompilerType(getASTContext(), llvm::cast(qual_type)->getDeducedType()) .GetNumFields(); break; case clang::Type::Elaborated: count = CompilerType( getASTContext(), llvm::cast(qual_type)->getNamedType()) .GetNumFields(); break; case clang::Type::Paren: count = CompilerType(getASTContext(), llvm::cast(qual_type)->desugar()) .GetNumFields(); break; case clang::Type::ObjCObjectPointer: { const clang::ObjCObjectPointerType *objc_class_type = qual_type->getAsObjCInterfacePointerType(); const clang::ObjCInterfaceType *objc_interface_type = objc_class_type->getInterfaceType(); if (objc_interface_type && GetCompleteType(static_cast( const_cast(objc_interface_type)))) { clang::ObjCInterfaceDecl *class_interface_decl = objc_interface_type->getDecl(); if (class_interface_decl) { count = class_interface_decl->ivar_size(); } } break; } case clang::Type::ObjCObject: case clang::Type::ObjCInterface: if (GetCompleteType(type)) { const clang::ObjCObjectType *objc_class_type = llvm::dyn_cast(qual_type.getTypePtr()); if (objc_class_type) { clang::ObjCInterfaceDecl *class_interface_decl = objc_class_type->getInterface(); if (class_interface_decl) count = class_interface_decl->ivar_size(); } } break; default: break; } return count; } static lldb::opaque_compiler_type_t GetObjCFieldAtIndex(clang::ASTContext *ast, clang::ObjCInterfaceDecl *class_interface_decl, size_t idx, std::string &name, uint64_t *bit_offset_ptr, uint32_t *bitfield_bit_size_ptr, bool *is_bitfield_ptr) { if (class_interface_decl) { if (idx < (class_interface_decl->ivar_size())) { clang::ObjCInterfaceDecl::ivar_iterator ivar_pos, ivar_end = class_interface_decl->ivar_end(); uint32_t ivar_idx = 0; for (ivar_pos = class_interface_decl->ivar_begin(); ivar_pos != ivar_end; ++ivar_pos, ++ivar_idx) { if (ivar_idx == idx) { const clang::ObjCIvarDecl *ivar_decl = *ivar_pos; clang::QualType ivar_qual_type(ivar_decl->getType()); name.assign(ivar_decl->getNameAsString()); if (bit_offset_ptr) { const clang::ASTRecordLayout &interface_layout = ast->getASTObjCInterfaceLayout(class_interface_decl); *bit_offset_ptr = interface_layout.getFieldOffset(ivar_idx); } const bool is_bitfield = ivar_pos->isBitField(); if (bitfield_bit_size_ptr) { *bitfield_bit_size_ptr = 0; if (is_bitfield && ast) { clang::Expr *bitfield_bit_size_expr = ivar_pos->getBitWidth(); llvm::APSInt bitfield_apsint; if (bitfield_bit_size_expr && bitfield_bit_size_expr->EvaluateAsInt(bitfield_apsint, *ast)) { *bitfield_bit_size_ptr = bitfield_apsint.getLimitedValue(); } } } if (is_bitfield_ptr) *is_bitfield_ptr = is_bitfield; return ivar_qual_type.getAsOpaquePtr(); } } } } return nullptr; } CompilerType ClangASTContext::GetFieldAtIndex(lldb::opaque_compiler_type_t type, size_t idx, std::string &name, uint64_t *bit_offset_ptr, uint32_t *bitfield_bit_size_ptr, bool *is_bitfield_ptr) { if (!type) return CompilerType(); clang::QualType qual_type(GetCanonicalQualType(type)); const clang::Type::TypeClass type_class = qual_type->getTypeClass(); switch (type_class) { case clang::Type::Record: if (GetCompleteType(type)) { const clang::RecordType *record_type = llvm::cast(qual_type.getTypePtr()); const clang::RecordDecl *record_decl = record_type->getDecl(); uint32_t field_idx = 0; clang::RecordDecl::field_iterator field, field_end; for (field = record_decl->field_begin(), field_end = record_decl->field_end(); field != field_end; ++field, ++field_idx) { if (idx == field_idx) { // Print the member type if requested // Print the member name and equal sign name.assign(field->getNameAsString()); // Figure out the type byte size (field_type_info.first) and // alignment (field_type_info.second) from the AST context. if (bit_offset_ptr) { const clang::ASTRecordLayout &record_layout = getASTContext()->getASTRecordLayout(record_decl); *bit_offset_ptr = record_layout.getFieldOffset(field_idx); } const bool is_bitfield = field->isBitField(); if (bitfield_bit_size_ptr) { *bitfield_bit_size_ptr = 0; if (is_bitfield) { clang::Expr *bitfield_bit_size_expr = field->getBitWidth(); llvm::APSInt bitfield_apsint; if (bitfield_bit_size_expr && bitfield_bit_size_expr->EvaluateAsInt(bitfield_apsint, *getASTContext())) { *bitfield_bit_size_ptr = bitfield_apsint.getLimitedValue(); } } } if (is_bitfield_ptr) *is_bitfield_ptr = is_bitfield; return CompilerType(getASTContext(), field->getType()); } } } break; case clang::Type::ObjCObjectPointer: { const clang::ObjCObjectPointerType *objc_class_type = qual_type->getAsObjCInterfacePointerType(); const clang::ObjCInterfaceType *objc_interface_type = objc_class_type->getInterfaceType(); if (objc_interface_type && GetCompleteType(static_cast( const_cast(objc_interface_type)))) { clang::ObjCInterfaceDecl *class_interface_decl = objc_interface_type->getDecl(); if (class_interface_decl) { return CompilerType( this, GetObjCFieldAtIndex(getASTContext(), class_interface_decl, idx, name, bit_offset_ptr, bitfield_bit_size_ptr, is_bitfield_ptr)); } } break; } case clang::Type::ObjCObject: case clang::Type::ObjCInterface: if (GetCompleteType(type)) { const clang::ObjCObjectType *objc_class_type = llvm::dyn_cast(qual_type.getTypePtr()); assert(objc_class_type); if (objc_class_type) { clang::ObjCInterfaceDecl *class_interface_decl = objc_class_type->getInterface(); return CompilerType( 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(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(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(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(qual_type)->desugar()) .GetFieldAtIndex(idx, name, bit_offset_ptr, bitfield_bit_size_ptr, is_bitfield_ptr); default: break; } return CompilerType(); } uint32_t ClangASTContext::GetNumDirectBaseClasses(lldb::opaque_compiler_type_t type) { uint32_t count = 0; clang::QualType qual_type(GetCanonicalQualType(type)); const clang::Type::TypeClass type_class = qual_type->getTypeClass(); switch (type_class) { case clang::Type::Record: if (GetCompleteType(type)) { const clang::CXXRecordDecl *cxx_record_decl = qual_type->getAsCXXRecordDecl(); if (cxx_record_decl) count = cxx_record_decl->getNumBases(); } break; case clang::Type::ObjCObjectPointer: count = GetPointeeType(type).GetNumDirectBaseClasses(); break; case clang::Type::ObjCObject: if (GetCompleteType(type)) { const clang::ObjCObjectType *objc_class_type = qual_type->getAsObjCQualifiedInterfaceType(); if (objc_class_type) { clang::ObjCInterfaceDecl *class_interface_decl = objc_class_type->getInterface(); if (class_interface_decl && class_interface_decl->getSuperClass()) count = 1; } } break; case clang::Type::ObjCInterface: if (GetCompleteType(type)) { const clang::ObjCInterfaceType *objc_interface_type = qual_type->getAs(); if (objc_interface_type) { clang::ObjCInterfaceDecl *class_interface_decl = objc_interface_type->getInterface(); if (class_interface_decl && class_interface_decl->getSuperClass()) count = 1; } } break; case clang::Type::Typedef: count = GetNumDirectBaseClasses(llvm::cast(qual_type) ->getDecl() ->getUnderlyingType() .getAsOpaquePtr()); break; case clang::Type::Auto: count = GetNumDirectBaseClasses(llvm::cast(qual_type) ->getDeducedType() .getAsOpaquePtr()); break; case clang::Type::Elaborated: count = GetNumDirectBaseClasses(llvm::cast(qual_type) ->getNamedType() .getAsOpaquePtr()); break; case clang::Type::Paren: return GetNumDirectBaseClasses( llvm::cast(qual_type)->desugar().getAsOpaquePtr()); default: break; } return count; } uint32_t ClangASTContext::GetNumVirtualBaseClasses(lldb::opaque_compiler_type_t type) { uint32_t count = 0; clang::QualType qual_type(GetCanonicalQualType(type)); const clang::Type::TypeClass type_class = qual_type->getTypeClass(); switch (type_class) { case clang::Type::Record: if (GetCompleteType(type)) { const clang::CXXRecordDecl *cxx_record_decl = qual_type->getAsCXXRecordDecl(); if (cxx_record_decl) count = cxx_record_decl->getNumVBases(); } break; case clang::Type::Typedef: count = GetNumVirtualBaseClasses(llvm::cast(qual_type) ->getDecl() ->getUnderlyingType() .getAsOpaquePtr()); break; case clang::Type::Auto: count = GetNumVirtualBaseClasses(llvm::cast(qual_type) ->getDeducedType() .getAsOpaquePtr()); break; case clang::Type::Elaborated: count = GetNumVirtualBaseClasses(llvm::cast(qual_type) ->getNamedType() .getAsOpaquePtr()); break; case clang::Type::Paren: count = GetNumVirtualBaseClasses( llvm::cast(qual_type)->desugar().getAsOpaquePtr()); break; default: break; } return count; } CompilerType ClangASTContext::GetDirectBaseClassAtIndex( lldb::opaque_compiler_type_t type, size_t idx, uint32_t *bit_offset_ptr) { clang::QualType qual_type(GetCanonicalQualType(type)); const clang::Type::TypeClass type_class = qual_type->getTypeClass(); switch (type_class) { case clang::Type::Record: if (GetCompleteType(type)) { const clang::CXXRecordDecl *cxx_record_decl = qual_type->getAsCXXRecordDecl(); if (cxx_record_decl) { uint32_t curr_idx = 0; clang::CXXRecordDecl::base_class_const_iterator base_class, base_class_end; for (base_class = cxx_record_decl->bases_begin(), base_class_end = cxx_record_decl->bases_end(); base_class != base_class_end; ++base_class, ++curr_idx) { if (curr_idx == idx) { if (bit_offset_ptr) { const clang::ASTRecordLayout &record_layout = getASTContext()->getASTRecordLayout(cxx_record_decl); const clang::CXXRecordDecl *base_class_decl = llvm::cast( base_class->getType() ->getAs() ->getDecl()); if (base_class->isVirtual()) *bit_offset_ptr = record_layout.getVBaseClassOffset(base_class_decl) .getQuantity() * 8; else *bit_offset_ptr = record_layout.getBaseClassOffset(base_class_decl) .getQuantity() * 8; } return CompilerType(this, base_class->getType().getAsOpaquePtr()); } } } } break; case clang::Type::ObjCObjectPointer: return GetPointeeType(type).GetDirectBaseClassAtIndex(idx, bit_offset_ptr); case clang::Type::ObjCObject: if (idx == 0 && GetCompleteType(type)) { const clang::ObjCObjectType *objc_class_type = qual_type->getAsObjCQualifiedInterfaceType(); if (objc_class_type) { clang::ObjCInterfaceDecl *class_interface_decl = objc_class_type->getInterface(); if (class_interface_decl) { clang::ObjCInterfaceDecl *superclass_interface_decl = class_interface_decl->getSuperClass(); if (superclass_interface_decl) { if (bit_offset_ptr) *bit_offset_ptr = 0; return CompilerType(getASTContext(), getASTContext()->getObjCInterfaceType( superclass_interface_decl)); } } } } break; case clang::Type::ObjCInterface: if (idx == 0 && GetCompleteType(type)) { const clang::ObjCObjectType *objc_interface_type = qual_type->getAs(); if (objc_interface_type) { clang::ObjCInterfaceDecl *class_interface_decl = objc_interface_type->getInterface(); if (class_interface_decl) { clang::ObjCInterfaceDecl *superclass_interface_decl = class_interface_decl->getSuperClass(); if (superclass_interface_decl) { if (bit_offset_ptr) *bit_offset_ptr = 0; return CompilerType(getASTContext(), getASTContext()->getObjCInterfaceType( superclass_interface_decl)); } } } } break; case clang::Type::Typedef: return GetDirectBaseClassAtIndex(llvm::cast(qual_type) ->getDecl() ->getUnderlyingType() .getAsOpaquePtr(), idx, bit_offset_ptr); case clang::Type::Auto: return GetDirectBaseClassAtIndex(llvm::cast(qual_type) ->getDeducedType() .getAsOpaquePtr(), idx, bit_offset_ptr); case clang::Type::Elaborated: return GetDirectBaseClassAtIndex( llvm::cast(qual_type) ->getNamedType() .getAsOpaquePtr(), idx, bit_offset_ptr); case clang::Type::Paren: return GetDirectBaseClassAtIndex( llvm::cast(qual_type)->desugar().getAsOpaquePtr(), idx, bit_offset_ptr); default: break; } return CompilerType(); } CompilerType ClangASTContext::GetVirtualBaseClassAtIndex( lldb::opaque_compiler_type_t type, size_t idx, uint32_t *bit_offset_ptr) { clang::QualType qual_type(GetCanonicalQualType(type)); const clang::Type::TypeClass type_class = qual_type->getTypeClass(); switch (type_class) { case clang::Type::Record: if (GetCompleteType(type)) { const clang::CXXRecordDecl *cxx_record_decl = qual_type->getAsCXXRecordDecl(); if (cxx_record_decl) { uint32_t curr_idx = 0; clang::CXXRecordDecl::base_class_const_iterator base_class, base_class_end; for (base_class = cxx_record_decl->vbases_begin(), base_class_end = cxx_record_decl->vbases_end(); base_class != base_class_end; ++base_class, ++curr_idx) { if (curr_idx == idx) { if (bit_offset_ptr) { const clang::ASTRecordLayout &record_layout = getASTContext()->getASTRecordLayout(cxx_record_decl); const clang::CXXRecordDecl *base_class_decl = llvm::cast( base_class->getType() ->getAs() ->getDecl()); *bit_offset_ptr = record_layout.getVBaseClassOffset(base_class_decl) .getQuantity() * 8; } return CompilerType(this, base_class->getType().getAsOpaquePtr()); } } } } break; case clang::Type::Typedef: return GetVirtualBaseClassAtIndex(llvm::cast(qual_type) ->getDecl() ->getUnderlyingType() .getAsOpaquePtr(), idx, bit_offset_ptr); case clang::Type::Auto: return GetVirtualBaseClassAtIndex(llvm::cast(qual_type) ->getDeducedType() .getAsOpaquePtr(), idx, bit_offset_ptr); case clang::Type::Elaborated: return GetVirtualBaseClassAtIndex( llvm::cast(qual_type) ->getNamedType() .getAsOpaquePtr(), idx, bit_offset_ptr); case clang::Type::Paren: return GetVirtualBaseClassAtIndex( llvm::cast(qual_type)->desugar().getAsOpaquePtr(), idx, bit_offset_ptr); default: break; } return CompilerType(); } // If a pointer to a pointee type (the clang_type arg) says that it has no // children, then we either need to trust it, or override it and return a // different result. For example, an "int *" has one child that is an integer, // but a function pointer doesn't have any children. Likewise if a Record type // claims it has no children, then there really is nothing to show. uint32_t ClangASTContext::GetNumPointeeChildren(clang::QualType type) { if (type.isNull()) return 0; clang::QualType qual_type(type.getCanonicalType()); const clang::Type::TypeClass type_class = qual_type->getTypeClass(); switch (type_class) { case clang::Type::Builtin: switch (llvm::cast(qual_type)->getKind()) { case clang::BuiltinType::UnknownAny: case clang::BuiltinType::Void: case clang::BuiltinType::NullPtr: case clang::BuiltinType::OCLEvent: case clang::BuiltinType::OCLImage1dRO: case clang::BuiltinType::OCLImage1dWO: case clang::BuiltinType::OCLImage1dRW: case clang::BuiltinType::OCLImage1dArrayRO: case clang::BuiltinType::OCLImage1dArrayWO: case clang::BuiltinType::OCLImage1dArrayRW: case clang::BuiltinType::OCLImage1dBufferRO: case clang::BuiltinType::OCLImage1dBufferWO: case clang::BuiltinType::OCLImage1dBufferRW: case clang::BuiltinType::OCLImage2dRO: case clang::BuiltinType::OCLImage2dWO: case clang::BuiltinType::OCLImage2dRW: case clang::BuiltinType::OCLImage2dArrayRO: case clang::BuiltinType::OCLImage2dArrayWO: case clang::BuiltinType::OCLImage2dArrayRW: case clang::BuiltinType::OCLImage3dRO: case clang::BuiltinType::OCLImage3dWO: case clang::BuiltinType::OCLImage3dRW: case clang::BuiltinType::OCLSampler: return 0; case clang::BuiltinType::Bool: case clang::BuiltinType::Char_U: case clang::BuiltinType::UChar: case clang::BuiltinType::WChar_U: case clang::BuiltinType::Char16: case clang::BuiltinType::Char32: case clang::BuiltinType::UShort: case clang::BuiltinType::UInt: case clang::BuiltinType::ULong: case clang::BuiltinType::ULongLong: case clang::BuiltinType::UInt128: case clang::BuiltinType::Char_S: case clang::BuiltinType::SChar: case clang::BuiltinType::WChar_S: case clang::BuiltinType::Short: case clang::BuiltinType::Int: case clang::BuiltinType::Long: case clang::BuiltinType::LongLong: case clang::BuiltinType::Int128: case clang::BuiltinType::Float: case clang::BuiltinType::Double: case clang::BuiltinType::LongDouble: case clang::BuiltinType::Dependent: case clang::BuiltinType::Overload: case clang::BuiltinType::ObjCId: case clang::BuiltinType::ObjCClass: case clang::BuiltinType::ObjCSel: case clang::BuiltinType::BoundMember: case clang::BuiltinType::Half: case clang::BuiltinType::ARCUnbridgedCast: case clang::BuiltinType::PseudoObject: case clang::BuiltinType::BuiltinFn: case clang::BuiltinType::OMPArraySection: return 1; default: return 0; } break; case clang::Type::Complex: return 1; case clang::Type::Pointer: return 1; case clang::Type::BlockPointer: return 0; // If block pointers don't have debug info, then no children for // them case clang::Type::LValueReference: return 1; case clang::Type::RValueReference: return 1; case clang::Type::MemberPointer: return 0; case clang::Type::ConstantArray: return 0; case clang::Type::IncompleteArray: return 0; case clang::Type::VariableArray: return 0; case clang::Type::DependentSizedArray: return 0; case clang::Type::DependentSizedExtVector: return 0; case clang::Type::Vector: return 0; case clang::Type::ExtVector: return 0; case clang::Type::FunctionProto: return 0; // When we function pointers, they have no children... case clang::Type::FunctionNoProto: return 0; // When we function pointers, they have no children... case clang::Type::UnresolvedUsing: return 0; case clang::Type::Paren: return GetNumPointeeChildren( llvm::cast(qual_type)->desugar()); case clang::Type::Typedef: return GetNumPointeeChildren(llvm::cast(qual_type) ->getDecl() ->getUnderlyingType()); case clang::Type::Auto: return GetNumPointeeChildren( llvm::cast(qual_type)->getDeducedType()); case clang::Type::Elaborated: return GetNumPointeeChildren( llvm::cast(qual_type)->getNamedType()); case clang::Type::TypeOfExpr: return 0; case clang::Type::TypeOf: return 0; case clang::Type::Decltype: return 0; case clang::Type::Record: return 0; case clang::Type::Enum: return 1; case clang::Type::TemplateTypeParm: return 1; case clang::Type::SubstTemplateTypeParm: return 1; case clang::Type::TemplateSpecialization: return 1; case clang::Type::InjectedClassName: return 0; case clang::Type::DependentName: return 1; case clang::Type::DependentTemplateSpecialization: return 1; case clang::Type::ObjCObject: return 0; case clang::Type::ObjCInterface: return 0; case clang::Type::ObjCObjectPointer: return 1; default: break; } return 0; } CompilerType ClangASTContext::GetChildCompilerTypeAtIndex( lldb::opaque_compiler_type_t type, ExecutionContext *exe_ctx, size_t idx, bool transparent_pointers, bool omit_empty_base_classes, bool ignore_array_bounds, std::string &child_name, uint32_t &child_byte_size, int32_t &child_byte_offset, uint32_t &child_bitfield_bit_size, uint32_t &child_bitfield_bit_offset, bool &child_is_base_class, bool &child_is_deref_of_parent, ValueObject *valobj, uint64_t &language_flags) { if (!type) return CompilerType(); clang::QualType parent_qual_type(GetCanonicalQualType(type)); const clang::Type::TypeClass parent_type_class = parent_qual_type->getTypeClass(); child_bitfield_bit_size = 0; child_bitfield_bit_offset = 0; child_is_base_class = false; language_flags = 0; const bool idx_is_valid = idx < GetNumChildren(type, omit_empty_base_classes); uint32_t bit_offset; switch (parent_type_class) { case clang::Type::Builtin: if (idx_is_valid) { switch (llvm::cast(parent_qual_type)->getKind()) { case clang::BuiltinType::ObjCId: case clang::BuiltinType::ObjCClass: child_name = "isa"; child_byte_size = getASTContext()->getTypeSize(getASTContext()->ObjCBuiltinClassTy) / CHAR_BIT; return CompilerType(getASTContext(), getASTContext()->ObjCBuiltinClassTy); default: break; } } break; case clang::Type::Record: if (idx_is_valid && GetCompleteType(type)) { const clang::RecordType *record_type = llvm::cast(parent_qual_type.getTypePtr()); const clang::RecordDecl *record_decl = record_type->getDecl(); assert(record_decl); const clang::ASTRecordLayout &record_layout = getASTContext()->getASTRecordLayout(record_decl); uint32_t child_idx = 0; const clang::CXXRecordDecl *cxx_record_decl = llvm::dyn_cast(record_decl); if (cxx_record_decl) { // We might have base classes to print out first clang::CXXRecordDecl::base_class_const_iterator base_class, base_class_end; for (base_class = cxx_record_decl->bases_begin(), base_class_end = cxx_record_decl->bases_end(); base_class != base_class_end; ++base_class) { const clang::CXXRecordDecl *base_class_decl = nullptr; // Skip empty base classes if (omit_empty_base_classes) { base_class_decl = llvm::cast( base_class->getType()->getAs()->getDecl()); if (ClangASTContext::RecordHasFields(base_class_decl) == false) continue; } if (idx == child_idx) { if (base_class_decl == nullptr) base_class_decl = llvm::cast( base_class->getType()->getAs()->getDecl()); if (base_class->isVirtual()) { bool handled = false; if (valobj) { Error err; AddressType addr_type = eAddressTypeInvalid; lldb::addr_t vtable_ptr_addr = valobj->GetCPPVTableAddress(addr_type); if (vtable_ptr_addr != LLDB_INVALID_ADDRESS && addr_type == eAddressTypeLoad) { ExecutionContext exe_ctx(valobj->GetExecutionContextRef()); Process *process = exe_ctx.GetProcessPtr(); if (process) { clang::VTableContextBase *vtable_ctx = getASTContext()->getVTableContext(); if (vtable_ctx) { if (vtable_ctx->isMicrosoft()) { clang::MicrosoftVTableContext *msoft_vtable_ctx = static_cast( vtable_ctx); if (vtable_ptr_addr) { const lldb::addr_t vbtable_ptr_addr = vtable_ptr_addr + record_layout.getVBPtrOffset().getQuantity(); const lldb::addr_t vbtable_ptr = process->ReadPointerFromMemory(vbtable_ptr_addr, err); if (vbtable_ptr != LLDB_INVALID_ADDRESS) { // Get the index into the virtual base table. The // index is the index in uint32_t from vbtable_ptr const unsigned vbtable_index = msoft_vtable_ctx->getVBTableIndex( cxx_record_decl, base_class_decl); const lldb::addr_t base_offset_addr = vbtable_ptr + vbtable_index * 4; const uint32_t base_offset = process->ReadUnsignedIntegerFromMemory( base_offset_addr, 4, UINT32_MAX, err); if (base_offset != UINT32_MAX) { handled = true; bit_offset = base_offset * 8; } } } } else { clang::ItaniumVTableContext *itanium_vtable_ctx = static_cast( vtable_ctx); if (vtable_ptr_addr) { const lldb::addr_t vtable_ptr = process->ReadPointerFromMemory(vtable_ptr_addr, err); if (vtable_ptr != LLDB_INVALID_ADDRESS) { clang::CharUnits base_offset_offset = itanium_vtable_ctx->getVirtualBaseOffsetOffset( cxx_record_decl, base_class_decl); const lldb::addr_t base_offset_addr = vtable_ptr + base_offset_offset.getQuantity(); const uint32_t base_offset_size = process->GetAddressByteSize(); const uint64_t base_offset = process->ReadUnsignedIntegerFromMemory( base_offset_addr, base_offset_size, UINT32_MAX, err); if (base_offset < UINT32_MAX) { handled = true; bit_offset = base_offset * 8; } } } } } } } } if (!handled) bit_offset = record_layout.getVBaseClassOffset(base_class_decl) .getQuantity() * 8; } else bit_offset = record_layout.getBaseClassOffset(base_class_decl) .getQuantity() * 8; // 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()); child_name = base_class_clang_type.GetTypeName().AsCString(""); uint64_t base_class_clang_type_bit_size = base_class_clang_type.GetBitSize( exe_ctx ? exe_ctx->GetBestExecutionContextScope() : NULL); // Base classes bit sizes should be a multiple of 8 bits in size assert(base_class_clang_type_bit_size % 8 == 0); child_byte_size = base_class_clang_type_bit_size / 8; child_is_base_class = true; return base_class_clang_type; } // We don't increment the child index in the for loop since we might // be skipping empty base classes ++child_idx; } } // Make sure index is in range... uint32_t field_idx = 0; clang::RecordDecl::field_iterator field, field_end; for (field = record_decl->field_begin(), field_end = record_decl->field_end(); field != field_end; ++field, ++field_idx, ++child_idx) { if (idx == child_idx) { // Print the member type if requested // Print the member name and equal sign child_name.assign(field->getNameAsString()); // 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()); assert(field_idx < record_layout.getFieldCount()); child_byte_size = field_clang_type.GetByteSize( exe_ctx ? exe_ctx->GetBestExecutionContextScope() : NULL); const uint32_t child_bit_size = child_byte_size * 8; // 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)) { child_bitfield_bit_offset = bit_offset % child_bit_size; const uint32_t child_bit_offset = bit_offset - child_bitfield_bit_offset; child_byte_offset = child_bit_offset / 8; } else { child_byte_offset = bit_offset / 8; } return field_clang_type; } } } break; case clang::Type::ObjCObject: case clang::Type::ObjCInterface: if (idx_is_valid && GetCompleteType(type)) { const clang::ObjCObjectType *objc_class_type = llvm::dyn_cast(parent_qual_type.getTypePtr()); assert(objc_class_type); if (objc_class_type) { uint32_t child_idx = 0; clang::ObjCInterfaceDecl *class_interface_decl = objc_class_type->getInterface(); if (class_interface_decl) { const clang::ASTRecordLayout &interface_layout = 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)); if (base_class_clang_type.GetNumChildren( omit_empty_base_classes) > 0) { if (idx == 0) { clang::QualType ivar_qual_type( getASTContext()->getObjCInterfaceType( superclass_interface_decl)); child_name.assign( superclass_interface_decl->getNameAsString()); clang::TypeInfo ivar_type_info = 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); } ++child_idx; } } else ++child_idx; } const uint32_t superclass_idx = child_idx; if (idx < (child_idx + class_interface_decl->ivar_size())) { clang::ObjCInterfaceDecl::ivar_iterator ivar_pos, ivar_end = class_interface_decl->ivar_end(); for (ivar_pos = class_interface_decl->ivar_begin(); ivar_pos != ivar_end; ++ivar_pos) { if (child_idx == idx) { clang::ObjCIvarDecl *ivar_decl = *ivar_pos; clang::QualType ivar_qual_type(ivar_decl->getType()); child_name.assign(ivar_decl->getNameAsString()); clang::TypeInfo ivar_type_info = getASTContext()->getTypeInfo(ivar_qual_type.getTypePtr()); child_byte_size = ivar_type_info.Width / 8; // Figure out the field offset within the current // struct/union/class type // For ObjC objects, we can't trust the bit offset we get from // the Clang AST, since // that doesn't account for the space taken up by unbacked // properties, or from // the changing size of base classes that are newer than this // class. // So if we have a process around that we can ask about this // object, do so. child_byte_offset = LLDB_INVALID_IVAR_OFFSET; Process *process = nullptr; if (exe_ctx) process = exe_ctx->GetProcessPtr(); if (process) { ObjCLanguageRuntime *objc_runtime = process->GetObjCLanguageRuntime(); if (objc_runtime != nullptr) { CompilerType parent_ast_type(getASTContext(), parent_qual_type); child_byte_offset = objc_runtime->GetByteOffsetForIvar( parent_ast_type, ivar_decl->getNameAsString().c_str()); } } // Setting this to UINT32_MAX to make sure we don't compute it // twice... bit_offset = UINT32_MAX; if (child_byte_offset == static_cast(LLDB_INVALID_IVAR_OFFSET)) { bit_offset = interface_layout.getFieldOffset(child_idx - superclass_idx); child_byte_offset = bit_offset / 8; } // Note, the ObjC Ivar Byte offset is just that, it doesn't // account for the bit offset // of a bitfield within its containing object. So regardless of // where we get the byte // 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 (bit_offset == UINT32_MAX) bit_offset = interface_layout.getFieldOffset( child_idx - superclass_idx); child_bitfield_bit_offset = bit_offset % 8; } return CompilerType(getASTContext(), ivar_qual_type); } ++child_idx; } } } } } break; case clang::Type::ObjCObjectPointer: if (idx_is_valid) { CompilerType pointee_clang_type(GetPointeeType(type)); if (transparent_pointers && pointee_clang_type.IsAggregateType()) { child_is_deref_of_parent = false; bool tmp_child_is_deref_of_parent = false; return pointee_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, tmp_child_is_deref_of_parent, valobj, language_flags); } else { child_is_deref_of_parent = true; const char *parent_name = valobj ? valobj->GetName().GetCString() : NULL; if (parent_name) { child_name.assign(1, '*'); child_name += parent_name; } // We have a pointer to an simple type if (idx == 0 && pointee_clang_type.GetCompleteType()) { child_byte_size = pointee_clang_type.GetByteSize( exe_ctx ? exe_ctx->GetBestExecutionContextScope() : NULL); child_byte_offset = 0; return pointee_clang_type; } } } break; case clang::Type::Vector: case clang::Type::ExtVector: if (idx_is_valid) { const clang::VectorType *array = llvm::cast(parent_qual_type.getTypePtr()); if (array) { CompilerType element_type(getASTContext(), array->getElementType()); if (element_type.GetCompleteType()) { char element_name[64]; ::snprintf(element_name, sizeof(element_name), "[%" PRIu64 "]", static_cast(idx)); child_name.assign(element_name); child_byte_size = element_type.GetByteSize( exe_ctx ? exe_ctx->GetBestExecutionContextScope() : NULL); child_byte_offset = (int32_t)idx * (int32_t)child_byte_size; return element_type; } } } break; case clang::Type::ConstantArray: case clang::Type::IncompleteArray: if (ignore_array_bounds || idx_is_valid) { const clang::ArrayType *array = GetQualType(type)->getAsArrayTypeUnsafe(); if (array) { CompilerType element_type(getASTContext(), array->getElementType()); if (element_type.GetCompleteType()) { child_name = llvm::formatv("[{0}]", idx); child_byte_size = element_type.GetByteSize( exe_ctx ? exe_ctx->GetBestExecutionContextScope() : NULL); child_byte_offset = (int32_t)idx * (int32_t)child_byte_size; return element_type; } } } break; case clang::Type::Pointer: { CompilerType pointee_clang_type(GetPointeeType(type)); // Don't dereference "void *" pointers if (pointee_clang_type.IsVoidType()) return CompilerType(); if (transparent_pointers && pointee_clang_type.IsAggregateType()) { child_is_deref_of_parent = false; bool tmp_child_is_deref_of_parent = false; return pointee_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, tmp_child_is_deref_of_parent, valobj, language_flags); } else { child_is_deref_of_parent = true; const char *parent_name = valobj ? valobj->GetName().GetCString() : NULL; if (parent_name) { child_name.assign(1, '*'); child_name += parent_name; } // We have a pointer to an simple type if (idx == 0) { child_byte_size = pointee_clang_type.GetByteSize( exe_ctx ? exe_ctx->GetBestExecutionContextScope() : NULL); child_byte_offset = 0; return pointee_clang_type; } } break; } case clang::Type::LValueReference: case clang::Type::RValueReference: if (idx_is_valid) { const clang::ReferenceType *reference_type = llvm::cast(parent_qual_type.getTypePtr()); CompilerType pointee_clang_type(getASTContext(), reference_type->getPointeeType()); if (transparent_pointers && pointee_clang_type.IsAggregateType()) { child_is_deref_of_parent = false; bool tmp_child_is_deref_of_parent = false; return pointee_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, tmp_child_is_deref_of_parent, valobj, language_flags); } else { const char *parent_name = valobj ? valobj->GetName().GetCString() : NULL; if (parent_name) { child_name.assign(1, '&'); child_name += parent_name; } // We have a pointer to an simple type if (idx == 0) { child_byte_size = pointee_clang_type.GetByteSize( exe_ctx ? exe_ctx->GetBestExecutionContextScope() : NULL); child_byte_offset = 0; return pointee_clang_type; } } } break; case clang::Type::Typedef: { CompilerType typedefed_clang_type( getASTContext(), llvm::cast(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(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(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(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; } return CompilerType(); } static uint32_t GetIndexForRecordBase(const clang::RecordDecl *record_decl, const clang::CXXBaseSpecifier *base_spec, bool omit_empty_base_classes) { uint32_t child_idx = 0; const clang::CXXRecordDecl *cxx_record_decl = llvm::dyn_cast(record_decl); // const char *super_name = record_decl->getNameAsCString(); // const char *base_name = // base_spec->getType()->getAs()->getDecl()->getNameAsCString(); // printf ("GetIndexForRecordChild (%s, %s)\n", super_name, base_name); // if (cxx_record_decl) { clang::CXXRecordDecl::base_class_const_iterator base_class, base_class_end; for (base_class = cxx_record_decl->bases_begin(), base_class_end = cxx_record_decl->bases_end(); base_class != base_class_end; ++base_class) { if (omit_empty_base_classes) { if (BaseSpecifierIsEmpty(base_class)) continue; } // printf ("GetIndexForRecordChild (%s, %s) base[%u] = %s\n", // super_name, base_name, // child_idx, // base_class->getType()->getAs()->getDecl()->getNameAsCString()); // // if (base_class == base_spec) return child_idx; ++child_idx; } } return UINT32_MAX; } static uint32_t GetIndexForRecordChild(const clang::RecordDecl *record_decl, clang::NamedDecl *canonical_decl, bool omit_empty_base_classes) { uint32_t child_idx = ClangASTContext::GetNumBaseClasses( llvm::dyn_cast(record_decl), omit_empty_base_classes); clang::RecordDecl::field_iterator field, field_end; for (field = record_decl->field_begin(), field_end = record_decl->field_end(); field != field_end; ++field, ++child_idx) { if (field->getCanonicalDecl() == canonical_decl) return child_idx; } return UINT32_MAX; } // Look for a child member (doesn't include base classes, but it does include // their members) in the type hierarchy. Returns an index path into "clang_type" // on how to reach the appropriate member. // // class A // { // public: // int m_a; // int m_b; // }; // // class B // { // }; // // class C : // public B, // public A // { // }; // // If we have a clang type that describes "class C", and we wanted to looked // "m_b" in it: // // With omit_empty_base_classes == false we would get an integer array back // with: // { 1, 1 } // The first index 1 is the child index for "class A" within class C // The second index 1 is the child index for "m_b" within class A // // With omit_empty_base_classes == true we would get an integer array back with: // { 0, 1 } // The first index 0 is the child index for "class A" within class C (since // class B doesn't have any members it doesn't count) // The second index 1 is the child index for "m_b" within class A size_t ClangASTContext::GetIndexOfChildMemberWithName( lldb::opaque_compiler_type_t type, const char *name, bool omit_empty_base_classes, std::vector &child_indexes) { if (type && name && name[0]) { clang::QualType qual_type(GetCanonicalQualType(type)); const clang::Type::TypeClass type_class = qual_type->getTypeClass(); switch (type_class) { case clang::Type::Record: if (GetCompleteType(type)) { const clang::RecordType *record_type = llvm::cast(qual_type.getTypePtr()); const clang::RecordDecl *record_decl = record_type->getDecl(); assert(record_decl); uint32_t child_idx = 0; const clang::CXXRecordDecl *cxx_record_decl = llvm::dyn_cast(record_decl); // Try and find a field that matches NAME clang::RecordDecl::field_iterator field, field_end; llvm::StringRef name_sref(name); for (field = record_decl->field_begin(), field_end = record_decl->field_end(); field != field_end; ++field, ++child_idx) { llvm::StringRef field_name = field->getName(); if (field_name.empty()) { CompilerType field_type(getASTContext(), field->getType()); child_indexes.push_back(child_idx); if (field_type.GetIndexOfChildMemberWithName( name, omit_empty_base_classes, child_indexes)) return child_indexes.size(); child_indexes.pop_back(); } else if (field_name.equals(name_sref)) { // We have to add on the number of base classes to this index! child_indexes.push_back( child_idx + ClangASTContext::GetNumBaseClasses( cxx_record_decl, omit_empty_base_classes)); return child_indexes.size(); } } if (cxx_record_decl) { const clang::RecordDecl *parent_record_decl = cxx_record_decl; // printf ("parent = %s\n", parent_record_decl->getNameAsCString()); // 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); clang::DeclarationName decl_name(&ident_ref); clang::CXXBasePaths paths; if (cxx_record_decl->lookupInBases( [decl_name](const clang::CXXBaseSpecifier *specifier, clang::CXXBasePath &path) { return clang::CXXRecordDecl::FindOrdinaryMember( specifier, path, decl_name); }, paths)) { clang::CXXBasePaths::const_paths_iterator path, path_end = paths.end(); for (path = paths.begin(); path != path_end; ++path) { const size_t num_path_elements = path->size(); for (size_t e = 0; e < num_path_elements; ++e) { clang::CXXBasePathElement elem = (*path)[e]; child_idx = GetIndexForRecordBase(parent_record_decl, elem.Base, omit_empty_base_classes); if (child_idx == UINT32_MAX) { child_indexes.clear(); return 0; } else { child_indexes.push_back(child_idx); parent_record_decl = llvm::cast( elem.Base->getType() ->getAs() ->getDecl()); } } for (clang::NamedDecl *path_decl : path->Decls) { child_idx = GetIndexForRecordChild( parent_record_decl, path_decl, omit_empty_base_classes); if (child_idx == UINT32_MAX) { child_indexes.clear(); return 0; } else { child_indexes.push_back(child_idx); } } } return child_indexes.size(); } } } break; case clang::Type::ObjCObject: case clang::Type::ObjCInterface: if (GetCompleteType(type)) { llvm::StringRef name_sref(name); const clang::ObjCObjectType *objc_class_type = llvm::dyn_cast(qual_type.getTypePtr()); assert(objc_class_type); if (objc_class_type) { uint32_t child_idx = 0; clang::ObjCInterfaceDecl *class_interface_decl = objc_class_type->getInterface(); if (class_interface_decl) { clang::ObjCInterfaceDecl::ivar_iterator ivar_pos, ivar_end = class_interface_decl->ivar_end(); clang::ObjCInterfaceDecl *superclass_interface_decl = class_interface_decl->getSuperClass(); for (ivar_pos = class_interface_decl->ivar_begin(); ivar_pos != ivar_end; ++ivar_pos, ++child_idx) { const clang::ObjCIvarDecl *ivar_decl = *ivar_pos; if (ivar_decl->getName().equals(name_sref)) { if ((!omit_empty_base_classes && superclass_interface_decl) || (omit_empty_base_classes && ObjCDeclHasIVars(superclass_interface_decl, true))) ++child_idx; child_indexes.push_back(child_idx); return child_indexes.size(); } } if (superclass_interface_decl) { // The super class index is always zero for ObjC classes, // so we push it onto the child indexes in case we find // an ivar in our superclass... child_indexes.push_back(0); CompilerType superclass_clang_type( getASTContext(), 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 results! return child_indexes.size(); } // We didn't find an ivar matching "name" in our // superclass, pop the superclass zero index that // we pushed on above. child_indexes.pop_back(); } } } } break; case clang::Type::ObjCObjectPointer: { CompilerType objc_object_clang_type( getASTContext(), llvm::cast(qual_type.getTypePtr()) ->getPointeeType()); return objc_object_clang_type.GetIndexOfChildMemberWithName( name, omit_empty_base_classes, child_indexes); } break; case clang::Type::ConstantArray: { // const clang::ConstantArrayType *array = // llvm::cast(parent_qual_type.getTypePtr()); // const uint64_t element_count = // array->getSize().getLimitedValue(); // // if (idx < element_count) // { // std::pair field_type_info = // ast->getTypeInfo(array->getElementType()); // // char element_name[32]; // ::snprintf (element_name, sizeof (element_name), // "%s[%u]", parent_name ? parent_name : "", idx); // // child_name.assign(element_name); // assert(field_type_info.first % 8 == 0); // child_byte_size = field_type_info.first / 8; // child_byte_offset = idx * child_byte_size; // return array->getElementType().getAsOpaquePtr(); // } } break; // case clang::Type::MemberPointerType: // { // MemberPointerType *mem_ptr_type = // llvm::cast(qual_type.getTypePtr()); // clang::QualType pointee_type = // mem_ptr_type->getPointeeType(); // // if (ClangASTContext::IsAggregateType // (pointee_type.getAsOpaquePtr())) // { // return GetIndexOfChildWithName (ast, // mem_ptr_type->getPointeeType().getAsOpaquePtr(), // name); // } // } // break; // case clang::Type::LValueReference: case clang::Type::RValueReference: { const clang::ReferenceType *reference_type = llvm::cast(qual_type.getTypePtr()); clang::QualType pointee_type(reference_type->getPointeeType()); CompilerType pointee_clang_type(getASTContext(), pointee_type); if (pointee_clang_type.IsAggregateType()) { return pointee_clang_type.GetIndexOfChildMemberWithName( name, omit_empty_base_classes, child_indexes); } } break; case clang::Type::Pointer: { CompilerType pointee_clang_type(GetPointeeType(type)); if (pointee_clang_type.IsAggregateType()) { return pointee_clang_type.GetIndexOfChildMemberWithName( name, omit_empty_base_classes, child_indexes); } } break; case clang::Type::Typedef: return CompilerType(getASTContext(), llvm::cast(qual_type) ->getDecl() ->getUnderlyingType()) .GetIndexOfChildMemberWithName(name, omit_empty_base_classes, child_indexes); case clang::Type::Auto: return CompilerType( getASTContext(), llvm::cast(qual_type)->getDeducedType()) .GetIndexOfChildMemberWithName(name, omit_empty_base_classes, child_indexes); case clang::Type::Elaborated: return CompilerType( getASTContext(), llvm::cast(qual_type)->getNamedType()) .GetIndexOfChildMemberWithName(name, omit_empty_base_classes, child_indexes); case clang::Type::Paren: return CompilerType(getASTContext(), llvm::cast(qual_type)->desugar()) .GetIndexOfChildMemberWithName(name, omit_empty_base_classes, child_indexes); default: break; } } return 0; } // Get the index of the child of "clang_type" whose name matches. This function // doesn't descend into the children, but only looks one level deep and name // matches can include base class names. uint32_t ClangASTContext::GetIndexOfChildWithName(lldb::opaque_compiler_type_t type, const char *name, bool omit_empty_base_classes) { if (type && name && name[0]) { clang::QualType qual_type(GetCanonicalQualType(type)); const clang::Type::TypeClass type_class = qual_type->getTypeClass(); switch (type_class) { case clang::Type::Record: if (GetCompleteType(type)) { const clang::RecordType *record_type = llvm::cast(qual_type.getTypePtr()); const clang::RecordDecl *record_decl = record_type->getDecl(); assert(record_decl); uint32_t child_idx = 0; const clang::CXXRecordDecl *cxx_record_decl = llvm::dyn_cast(record_decl); if (cxx_record_decl) { clang::CXXRecordDecl::base_class_const_iterator base_class, base_class_end; for (base_class = cxx_record_decl->bases_begin(), base_class_end = cxx_record_decl->bases_end(); base_class != base_class_end; ++base_class) { // Skip empty base classes clang::CXXRecordDecl *base_class_decl = llvm::cast( base_class->getType() ->getAs() ->getDecl()); if (omit_empty_base_classes && ClangASTContext::RecordHasFields(base_class_decl) == false) continue; CompilerType base_class_clang_type(getASTContext(), base_class->getType()); std::string base_class_type_name( base_class_clang_type.GetTypeName().AsCString("")); if (base_class_type_name.compare(name) == 0) return child_idx; ++child_idx; } } // Try and find a field that matches NAME clang::RecordDecl::field_iterator field, field_end; llvm::StringRef name_sref(name); for (field = record_decl->field_begin(), field_end = record_decl->field_end(); field != field_end; ++field, ++child_idx) { if (field->getName().equals(name_sref)) return child_idx; } } break; case clang::Type::ObjCObject: case clang::Type::ObjCInterface: if (GetCompleteType(type)) { llvm::StringRef name_sref(name); const clang::ObjCObjectType *objc_class_type = llvm::dyn_cast(qual_type.getTypePtr()); assert(objc_class_type); if (objc_class_type) { uint32_t child_idx = 0; clang::ObjCInterfaceDecl *class_interface_decl = objc_class_type->getInterface(); if (class_interface_decl) { clang::ObjCInterfaceDecl::ivar_iterator ivar_pos, ivar_end = class_interface_decl->ivar_end(); clang::ObjCInterfaceDecl *superclass_interface_decl = class_interface_decl->getSuperClass(); for (ivar_pos = class_interface_decl->ivar_begin(); ivar_pos != ivar_end; ++ivar_pos, ++child_idx) { const clang::ObjCIvarDecl *ivar_decl = *ivar_pos; if (ivar_decl->getName().equals(name_sref)) { if ((!omit_empty_base_classes && superclass_interface_decl) || (omit_empty_base_classes && ObjCDeclHasIVars(superclass_interface_decl, true))) ++child_idx; return child_idx; } } if (superclass_interface_decl) { if (superclass_interface_decl->getName().equals(name_sref)) return 0; } } } } break; case clang::Type::ObjCObjectPointer: { CompilerType pointee_clang_type( getASTContext(), llvm::cast(qual_type.getTypePtr()) ->getPointeeType()); return pointee_clang_type.GetIndexOfChildWithName( name, omit_empty_base_classes); } break; case clang::Type::ConstantArray: { // const clang::ConstantArrayType *array = // llvm::cast(parent_qual_type.getTypePtr()); // const uint64_t element_count = // array->getSize().getLimitedValue(); // // if (idx < element_count) // { // std::pair field_type_info = // ast->getTypeInfo(array->getElementType()); // // char element_name[32]; // ::snprintf (element_name, sizeof (element_name), // "%s[%u]", parent_name ? parent_name : "", idx); // // child_name.assign(element_name); // assert(field_type_info.first % 8 == 0); // child_byte_size = field_type_info.first / 8; // child_byte_offset = idx * child_byte_size; // return array->getElementType().getAsOpaquePtr(); // } } break; // case clang::Type::MemberPointerType: // { // MemberPointerType *mem_ptr_type = // llvm::cast(qual_type.getTypePtr()); // clang::QualType pointee_type = // mem_ptr_type->getPointeeType(); // // if (ClangASTContext::IsAggregateType // (pointee_type.getAsOpaquePtr())) // { // return GetIndexOfChildWithName (ast, // mem_ptr_type->getPointeeType().getAsOpaquePtr(), // name); // } // } // break; // case clang::Type::LValueReference: case clang::Type::RValueReference: { const clang::ReferenceType *reference_type = llvm::cast(qual_type.getTypePtr()); CompilerType pointee_type(getASTContext(), reference_type->getPointeeType()); if (pointee_type.IsAggregateType()) { return pointee_type.GetIndexOfChildWithName(name, omit_empty_base_classes); } } break; case clang::Type::Pointer: { const clang::PointerType *pointer_type = llvm::cast(qual_type.getTypePtr()); CompilerType pointee_type(getASTContext(), pointer_type->getPointeeType()); if (pointee_type.IsAggregateType()) { return pointee_type.GetIndexOfChildWithName(name, omit_empty_base_classes); } else { // if (parent_name) // { // child_name.assign(1, '*'); // child_name += parent_name; // } // // // We have a pointer to an simple type // if (idx == 0) // { // std::pair clang_type_info // = ast->getTypeInfo(pointee_type); // assert(clang_type_info.first % 8 == 0); // child_byte_size = clang_type_info.first / 8; // child_byte_offset = 0; // return pointee_type.getAsOpaquePtr(); // } } } break; case clang::Type::Auto: return CompilerType( getASTContext(), llvm::cast(qual_type)->getDeducedType()) .GetIndexOfChildWithName(name, omit_empty_base_classes); case clang::Type::Elaborated: return CompilerType( getASTContext(), llvm::cast(qual_type)->getNamedType()) .GetIndexOfChildWithName(name, omit_empty_base_classes); case clang::Type::Paren: return CompilerType(getASTContext(), llvm::cast(qual_type)->desugar()) .GetIndexOfChildWithName(name, omit_empty_base_classes); case clang::Type::Typedef: return CompilerType(getASTContext(), llvm::cast(qual_type) ->getDecl() ->getUnderlyingType()) .GetIndexOfChildWithName(name, omit_empty_base_classes); default: break; } } return UINT32_MAX; } size_t ClangASTContext::GetNumTemplateArguments(lldb::opaque_compiler_type_t type) { if (!type) return 0; clang::QualType qual_type(GetCanonicalQualType(type)); const clang::Type::TypeClass type_class = qual_type->getTypeClass(); switch (type_class) { case clang::Type::Record: if (GetCompleteType(type)) { const clang::CXXRecordDecl *cxx_record_decl = qual_type->getAsCXXRecordDecl(); if (cxx_record_decl) { const clang::ClassTemplateSpecializationDecl *template_decl = llvm::dyn_cast( cxx_record_decl); if (template_decl) return template_decl->getTemplateArgs().size(); } } break; case clang::Type::Typedef: return (CompilerType(getASTContext(), llvm::cast(qual_type) ->getDecl() ->getUnderlyingType())) .GetNumTemplateArguments(); case clang::Type::Auto: return (CompilerType( getASTContext(), llvm::cast(qual_type)->getDeducedType())) .GetNumTemplateArguments(); case clang::Type::Elaborated: return (CompilerType( getASTContext(), llvm::cast(qual_type)->getNamedType())) .GetNumTemplateArguments(); case clang::Type::Paren: return (CompilerType(getASTContext(), llvm::cast(qual_type)->desugar())) .GetNumTemplateArguments(); default: break; } return 0; } CompilerType ClangASTContext::GetTemplateArgument(lldb::opaque_compiler_type_t type, size_t arg_idx, lldb::TemplateArgumentKind &kind) { if (!type) return CompilerType(); clang::QualType qual_type(GetCanonicalQualType(type)); const clang::Type::TypeClass type_class = qual_type->getTypeClass(); switch (type_class) { case clang::Type::Record: if (GetCompleteType(type)) { const clang::CXXRecordDecl *cxx_record_decl = qual_type->getAsCXXRecordDecl(); if (cxx_record_decl) { const clang::ClassTemplateSpecializationDecl *template_decl = llvm::dyn_cast( cxx_record_decl); if (template_decl && arg_idx < template_decl->getTemplateArgs().size()) { const clang::TemplateArgument &template_arg = template_decl->getTemplateArgs()[arg_idx]; switch (template_arg.getKind()) { case clang::TemplateArgument::Null: kind = eTemplateArgumentKindNull; return CompilerType(); case clang::TemplateArgument::Type: kind = eTemplateArgumentKindType; return CompilerType(getASTContext(), template_arg.getAsType()); case clang::TemplateArgument::Declaration: kind = eTemplateArgumentKindDeclaration; return CompilerType(); case clang::TemplateArgument::Integral: kind = eTemplateArgumentKindIntegral; return CompilerType(getASTContext(), template_arg.getIntegralType()); case clang::TemplateArgument::Template: kind = eTemplateArgumentKindTemplate; return CompilerType(); case clang::TemplateArgument::TemplateExpansion: kind = eTemplateArgumentKindTemplateExpansion; return CompilerType(); case clang::TemplateArgument::Expression: kind = eTemplateArgumentKindExpression; return CompilerType(); case clang::TemplateArgument::Pack: kind = eTemplateArgumentKindPack; return CompilerType(); default: llvm_unreachable("Unhandled clang::TemplateArgument::ArgKind"); } } } } break; case clang::Type::Typedef: return (CompilerType(getASTContext(), llvm::cast(qual_type) ->getDecl() ->getUnderlyingType())) .GetTemplateArgument(arg_idx, kind); case clang::Type::Auto: return (CompilerType( getASTContext(), llvm::cast(qual_type)->getDeducedType())) .GetTemplateArgument(arg_idx, kind); case clang::Type::Elaborated: return (CompilerType( getASTContext(), llvm::cast(qual_type)->getNamedType())) .GetTemplateArgument(arg_idx, kind); case clang::Type::Paren: return (CompilerType(getASTContext(), llvm::cast(qual_type)->desugar())) .GetTemplateArgument(arg_idx, kind); default: break; } kind = eTemplateArgumentKindNull; return CompilerType(); } CompilerType ClangASTContext::GetTypeForFormatters(void *type) { if (type) return ClangUtil::RemoveFastQualifiers(CompilerType(this, type)); return CompilerType(); } clang::EnumDecl *ClangASTContext::GetAsEnumDecl(const CompilerType &type) { const clang::EnumType *enutype = llvm::dyn_cast(ClangUtil::GetCanonicalQualType(type)); if (enutype) return enutype->getDecl(); return NULL; } clang::RecordDecl *ClangASTContext::GetAsRecordDecl(const CompilerType &type) { const clang::RecordType *record_type = llvm::dyn_cast(ClangUtil::GetCanonicalQualType(type)); if (record_type) return record_type->getDecl(); return nullptr; } clang::TagDecl *ClangASTContext::GetAsTagDecl(const CompilerType &type) { clang::QualType qual_type = ClangUtil::GetCanonicalQualType(type); if (qual_type.isNull()) return nullptr; else return qual_type->getAsTagDecl(); } clang::CXXRecordDecl * ClangASTContext::GetAsCXXRecordDecl(lldb::opaque_compiler_type_t type) { return GetCanonicalQualType(type)->getAsCXXRecordDecl(); } clang::ObjCInterfaceDecl * ClangASTContext::GetAsObjCInterfaceDecl(const CompilerType &type) { const clang::ObjCObjectType *objc_class_type = llvm::dyn_cast( ClangUtil::GetCanonicalQualType(type)); if (objc_class_type) return objc_class_type->getInterface(); return nullptr; } clang::FieldDecl *ClangASTContext::AddFieldToRecordType( const CompilerType &type, const char *name, const CompilerType &field_clang_type, AccessType access, uint32_t bitfield_bit_size) { if (!type.IsValid() || !field_clang_type.IsValid()) return nullptr; ClangASTContext *ast = llvm::dyn_cast_or_null(type.GetTypeSystem()); if (!ast) return nullptr; clang::ASTContext *clang_ast = ast->getASTContext(); 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()); } clang::RecordDecl *record_decl = ast->GetAsRecordDecl(type); if (record_decl) { field = clang::FieldDecl::Create( *clang_ast, record_decl, clang::SourceLocation(), clang::SourceLocation(), name ? &clang_ast->Idents.get(name) : nullptr, // Identifier ClangUtil::GetQualType(field_clang_type), // Field type nullptr, // TInfo * bit_width, // BitWidth false, // Mutable clang::ICIS_NoInit); // HasInit if (!name) { // Determine whether this field corresponds to an anonymous // struct or union. if (const clang::TagType *TagT = field->getType()->getAs()) { if (clang::RecordDecl *Rec = llvm::dyn_cast(TagT->getDecl())) if (!Rec->getDeclName()) { Rec->setAnonymousStructOrUnion(true); field->setImplicit(); } } } if (field) { field->setAccess( ClangASTContext::ConvertAccessTypeToAccessSpecifier(access)); record_decl->addDecl(field); #ifdef LLDB_CONFIGURATION_DEBUG VerifyDecl(field); #endif } } else { clang::ObjCInterfaceDecl *class_interface_decl = ast->GetAsObjCInterfaceDecl(type); if (class_interface_decl) { const bool is_synthesized = false; field_clang_type.GetCompleteType(); field = clang::ObjCIvarDecl::Create( *clang_ast, class_interface_decl, clang::SourceLocation(), clang::SourceLocation(), name ? &clang_ast->Idents.get(name) : nullptr, // Identifier ClangUtil::GetQualType(field_clang_type), // Field type nullptr, // TypeSourceInfo * ConvertAccessTypeToObjCIvarAccessControl(access), bit_width, is_synthesized); if (field) { class_interface_decl->addDecl(field); #ifdef LLDB_CONFIGURATION_DEBUG VerifyDecl(field); #endif } } } return field; } void ClangASTContext::BuildIndirectFields(const CompilerType &type) { if (!type) return; ClangASTContext *ast = llvm::dyn_cast(type.GetTypeSystem()); if (!ast) return; clang::RecordDecl *record_decl = ast->GetAsRecordDecl(type); if (!record_decl) return; typedef llvm::SmallVector IndirectFieldVector; IndirectFieldVector indirect_fields; clang::RecordDecl::field_iterator field_pos; clang::RecordDecl::field_iterator field_end_pos = record_decl->field_end(); clang::RecordDecl::field_iterator last_field_pos = field_end_pos; for (field_pos = record_decl->field_begin(); field_pos != field_end_pos; last_field_pos = field_pos++) { if (field_pos->isAnonymousStructOrUnion()) { clang::QualType field_qual_type = field_pos->getType(); const clang::RecordType *field_record_type = field_qual_type->getAs(); if (!field_record_type) continue; clang::RecordDecl *field_record_decl = field_record_type->getDecl(); if (!field_record_decl) continue; for (clang::RecordDecl::decl_iterator di = field_record_decl->decls_begin(), de = field_record_decl->decls_end(); di != de; ++di) { if (clang::FieldDecl *nested_field_decl = llvm::dyn_cast(*di)) { clang::NamedDecl **chain = 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(), nested_field_decl->getIdentifier(), nested_field_decl->getType(), {chain, 2}); indirect_field->setImplicit(); indirect_field->setAccess(ClangASTContext::UnifyAccessSpecifiers( field_pos->getAccess(), nested_field_decl->getAccess())); indirect_fields.push_back(indirect_field); } else if (clang::IndirectFieldDecl *nested_indirect_field_decl = llvm::dyn_cast(*di)) { size_t nested_chain_size = nested_indirect_field_decl->getChainingSize(); clang::NamedDecl **chain = new (*ast->getASTContext()) clang::NamedDecl *[nested_chain_size + 1]; chain[0] = *field_pos; int chain_index = 1; for (clang::IndirectFieldDecl::chain_iterator nci = nested_indirect_field_decl->chain_begin(), nce = nested_indirect_field_decl->chain_end(); nci < nce; ++nci) { chain[chain_index] = *nci; chain_index++; } clang::IndirectFieldDecl *indirect_field = clang::IndirectFieldDecl::Create( *ast->getASTContext(), record_decl, clang::SourceLocation(), nested_indirect_field_decl->getIdentifier(), nested_indirect_field_decl->getType(), {chain, nested_chain_size + 1}); indirect_field->setImplicit(); indirect_field->setAccess(ClangASTContext::UnifyAccessSpecifiers( field_pos->getAccess(), nested_indirect_field_decl->getAccess())); indirect_fields.push_back(indirect_field); } } } } // Check the last field to see if it has an incomplete array type as its // last member and if it does, the tell the record decl about it if (last_field_pos != field_end_pos) { if (last_field_pos->getType()->isIncompleteArrayType()) record_decl->hasFlexibleArrayMember(); } for (IndirectFieldVector::iterator ifi = indirect_fields.begin(), ife = indirect_fields.end(); ifi < ife; ++ifi) { record_decl->addDecl(*ifi); } } void ClangASTContext::SetIsPacked(const CompilerType &type) { if (type) { ClangASTContext *ast = llvm::dyn_cast(type.GetTypeSystem()); if (ast) { clang::RecordDecl *record_decl = GetAsRecordDecl(type); if (!record_decl) return; record_decl->addAttr( clang::PackedAttr::CreateImplicit(*ast->getASTContext())); } } } clang::VarDecl *ClangASTContext::AddVariableToRecordType( const CompilerType &type, const char *name, const CompilerType &var_type, AccessType access) { clang::VarDecl *var_decl = nullptr; if (!type.IsValid() || !var_type.IsValid()) return nullptr; ClangASTContext *ast = llvm::dyn_cast(type.GetTypeSystem()); if (!ast) return nullptr; clang::RecordDecl *record_decl = ast->GetAsRecordDecl(type); if (record_decl) { var_decl = clang::VarDecl::Create( *ast->getASTContext(), // ASTContext & record_decl, // DeclContext * clang::SourceLocation(), // clang::SourceLocation StartLoc clang::SourceLocation(), // clang::SourceLocation IdLoc name ? &ast->getASTContext()->Idents.get(name) : nullptr, // clang::IdentifierInfo * ClangUtil::GetQualType(var_type), // Variable clang::QualType nullptr, // TypeSourceInfo * clang::SC_Static); // StorageClass if (var_decl) { var_decl->setAccess( ClangASTContext::ConvertAccessTypeToAccessSpecifier(access)); record_decl->addDecl(var_decl); #ifdef LLDB_CONFIGURATION_DEBUG VerifyDecl(var_decl); #endif } } return var_decl; } clang::CXXMethodDecl *ClangASTContext::AddMethodToCXXRecordType( lldb::opaque_compiler_type_t type, const char *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') return nullptr; clang::QualType record_qual_type(GetCanonicalQualType(type)); clang::CXXRecordDecl *cxx_record_decl = record_qual_type->getAsCXXRecordDecl(); if (cxx_record_decl == nullptr) return nullptr; clang::QualType method_qual_type(ClangUtil::GetQualType(method_clang_type)); clang::CXXMethodDecl *cxx_method_decl = nullptr; clang::DeclarationName decl_name(&getASTContext()->Idents.get(name)); const clang::FunctionType *function_type = llvm::dyn_cast(method_qual_type.getTypePtr()); if (function_type == nullptr) return nullptr; const clang::FunctionProtoType *method_function_prototype( llvm::dyn_cast(function_type)); if (!method_function_prototype) return nullptr; unsigned int num_params = method_function_prototype->getNumParams(); clang::CXXDestructorDecl *cxx_dtor_decl(nullptr); clang::CXXConstructorDecl *cxx_ctor_decl(nullptr); if (is_artificial) return nullptr; // skip everything artificial if (name[0] == '~') { cxx_dtor_decl = clang::CXXDestructorDecl::Create( *getASTContext(), cxx_record_decl, clang::SourceLocation(), clang::DeclarationNameInfo( getASTContext()->DeclarationNames.getCXXDestructorName( getASTContext()->getCanonicalType(record_qual_type)), clang::SourceLocation()), method_qual_type, nullptr, is_inline, is_artificial); 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(), clang::DeclarationNameInfo( getASTContext()->DeclarationNames.getCXXConstructorName( getASTContext()->getCanonicalType(record_qual_type)), clang::SourceLocation()), method_qual_type, nullptr, // TypeSourceInfo * is_explicit, is_inline, is_artificial, false /*is_constexpr*/); cxx_method_decl = cxx_ctor_decl; } else { clang::StorageClass SC = is_static ? clang::SC_Static : clang::SC_None; clang::OverloadedOperatorKind op_kind = clang::NUM_OVERLOADED_OPERATORS; if (IsOperator(name, op_kind)) { if (op_kind != clang::NUM_OVERLOADED_OPERATORS) { // Check the number of operator parameters. Sometimes we have // seen bad DWARF that doesn't correctly describe operators and // if we try to create a method and add it to the class, clang // will assert and crash, so we need to make sure things are // acceptable. const bool is_method = true; if (!ClangASTContext::CheckOverloadedOperatorKindParameterCount( is_method, op_kind, num_params)) return nullptr; cxx_method_decl = clang::CXXMethodDecl::Create( *getASTContext(), cxx_record_decl, clang::SourceLocation(), clang::DeclarationNameInfo( getASTContext()->DeclarationNames.getCXXOperatorName(op_kind), clang::SourceLocation()), method_qual_type, nullptr, // TypeSourceInfo * SC, is_inline, false /*is_constexpr*/, clang::SourceLocation()); } else if (num_params == 0) { // Conversion operators don't take params... cxx_method_decl = clang::CXXConversionDecl::Create( *getASTContext(), cxx_record_decl, clang::SourceLocation(), clang::DeclarationNameInfo( getASTContext()->DeclarationNames.getCXXConversionFunctionName( getASTContext()->getCanonicalType( function_type->getReturnType())), clang::SourceLocation()), method_qual_type, nullptr, // TypeSourceInfo * is_inline, is_explicit, false /*is_constexpr*/, clang::SourceLocation()); } } if (cxx_method_decl == nullptr) { cxx_method_decl = clang::CXXMethodDecl::Create( *getASTContext(), cxx_record_decl, clang::SourceLocation(), clang::DeclarationNameInfo(decl_name, clang::SourceLocation()), method_qual_type, nullptr, // TypeSourceInfo * SC, is_inline, false /*is_constexpr*/, clang::SourceLocation()); } } clang::AccessSpecifier access_specifier = ClangASTContext::ConvertAccessTypeToAccessSpecifier(access); cxx_method_decl->setAccess(access_specifier); cxx_method_decl->setVirtualAsWritten(is_virtual); if (is_attr_used) cxx_method_decl->addAttr(clang::UsedAttr::CreateImplicit(*getASTContext())); // Populate the method decl with parameter decls llvm::SmallVector params; for (unsigned param_index = 0; param_index < num_params; ++param_index) { params.push_back(clang::ParmVarDecl::Create( *getASTContext(), cxx_method_decl, clang::SourceLocation(), clang::SourceLocation(), nullptr, // anonymous method_function_prototype->getParamType(param_index), nullptr, clang::SC_None, nullptr)); } cxx_method_decl->setParams(llvm::ArrayRef(params)); cxx_record_decl->addDecl(cxx_method_decl); // Sometimes the debug info will mention a constructor (default/copy/move), // destructor, or assignment operator (copy/move) but there won't be any // version of this in the code. So we check if the function was artificially // generated and if it is trivial and this lets the compiler/backend know // that it can inline the IR for these when it needs to and we can avoid a // "missing function" error when running expressions. if (is_artificial) { if (cxx_ctor_decl && ((cxx_ctor_decl->isDefaultConstructor() && cxx_record_decl->hasTrivialDefaultConstructor()) || (cxx_ctor_decl->isCopyConstructor() && cxx_record_decl->hasTrivialCopyConstructor()) || (cxx_ctor_decl->isMoveConstructor() && cxx_record_decl->hasTrivialMoveConstructor()))) { cxx_ctor_decl->setDefaulted(); cxx_ctor_decl->setTrivial(true); } else if (cxx_dtor_decl) { if (cxx_record_decl->hasTrivialDestructor()) { cxx_dtor_decl->setDefaulted(); cxx_dtor_decl->setTrivial(true); } } else if ((cxx_method_decl->isCopyAssignmentOperator() && cxx_record_decl->hasTrivialCopyAssignment()) || (cxx_method_decl->isMoveAssignmentOperator() && cxx_record_decl->hasTrivialMoveAssignment())) { cxx_method_decl->setDefaulted(); cxx_method_decl->setTrivial(true); } } #ifdef LLDB_CONFIGURATION_DEBUG 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; } #pragma mark C++ Base Classes clang::CXXBaseSpecifier * ClangASTContext::CreateBaseClassSpecifier(lldb::opaque_compiler_type_t type, AccessType access, bool is_virtual, bool base_of_class) { if (type) return new clang::CXXBaseSpecifier( clang::SourceRange(), is_virtual, base_of_class, ClangASTContext::ConvertAccessTypeToAccessSpecifier(access), getASTContext()->getTrivialTypeSourceInfo(GetQualType(type)), clang::SourceLocation()); return nullptr; } void ClangASTContext::DeleteBaseClassSpecifiers( clang::CXXBaseSpecifier **base_classes, unsigned num_base_classes) { for (unsigned i = 0; i < num_base_classes; ++i) { delete base_classes[i]; base_classes[i] = nullptr; } } bool ClangASTContext::SetBaseClassesForClassType( lldb::opaque_compiler_type_t type, clang::CXXBaseSpecifier const *const *base_classes, unsigned num_base_classes) { if (type) { clang::CXXRecordDecl *cxx_record_decl = GetAsCXXRecordDecl(type); if (cxx_record_decl) { cxx_record_decl->setBases(base_classes, num_base_classes); return true; } } return false; } bool ClangASTContext::SetObjCSuperClass( const CompilerType &type, const CompilerType &superclass_clang_type) { ClangASTContext *ast = llvm::dyn_cast_or_null(type.GetTypeSystem()); if (!ast) return false; clang::ASTContext *clang_ast = ast->getASTContext(); if (type && superclass_clang_type.IsValid() && superclass_clang_type.GetTypeSystem() == type.GetTypeSystem()) { clang::ObjCInterfaceDecl *class_interface_decl = GetAsObjCInterfaceDecl(type); 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))); return true; } } return false; } bool ClangASTContext::AddObjCClassProperty( const CompilerType &type, const char *property_name, const CompilerType &property_clang_type, clang::ObjCIvarDecl *ivar_decl, const char *property_setter_name, const char *property_getter_name, uint32_t property_attributes, ClangASTMetadata *metadata) { if (!type || !property_clang_type.IsValid() || property_name == nullptr || property_name[0] == '\0') return false; ClangASTContext *ast = llvm::dyn_cast(type.GetTypeSystem()); if (!ast) return false; clang::ASTContext *clang_ast = ast->getASTContext(); clang::ObjCInterfaceDecl *class_interface_decl = GetAsObjCInterfaceDecl(type); if (class_interface_decl) { 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 (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)); 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); if (property_decl) { if (metadata) ClangASTContext::SetMetadata(clang_ast, property_decl, *metadata); class_interface_decl->addDecl(property_decl); clang::Selector setter_sel, getter_sel; 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); 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); if (ivar_decl) property_decl->setPropertyIvarDecl(ivar_decl); 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); const bool isInstance = (property_attributes & clang::ObjCPropertyDecl::OBJC_PR_class) == 0; 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; 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); if (getter && metadata) ClangASTContext::SetMetadata(clang_ast, getter, *metadata); if (getter) { getter->setMethodParams(*clang_ast, llvm::ArrayRef(), llvm::ArrayRef()); class_interface_decl->addDecl(getter); } } 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 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(params), llvm::ArrayRef()); class_interface_decl->addDecl(setter); } } return true; } } } return false; } bool ClangASTContext::IsObjCClassTypeAndHasIVars(const CompilerType &type, bool check_superclass) { clang::ObjCInterfaceDecl *class_interface_decl = GetAsObjCInterfaceDecl(type); if (class_interface_decl) return ObjCDeclHasIVars(class_interface_decl, check_superclass); return false; } clang::ObjCMethodDecl *ClangASTContext::AddMethodToObjCObjectType( const CompilerType &type, const char *name, // the full symbol name as seen in the symbol table // (lldb::opaque_compiler_type_t type, "-[NString // stringWithCString:]") const CompilerType &method_clang_type, lldb::AccessType access, bool is_artificial, bool is_variadic) { if (!type || !method_clang_type.IsValid()) return nullptr; clang::ObjCInterfaceDecl *class_interface_decl = GetAsObjCInterfaceDecl(type); if (class_interface_decl == nullptr) return nullptr; ClangASTContext *lldb_ast = llvm::dyn_cast(type.GetTypeSystem()); if (lldb_ast == nullptr) return nullptr; clang::ASTContext *ast = lldb_ast->getASTContext(); const char *selector_start = ::strchr(name, ' '); if (selector_start == nullptr) return nullptr; selector_start++; llvm::SmallVector selector_idents; size_t len = 0; const char *start; // printf ("name = '%s'\n", name); unsigned num_selectors_with_args = 0; for (start = selector_start; start && *start != '\0' && *start != ']'; start += len) { len = ::strcspn(start, ":]"); bool has_arg = (start[len] == ':'); if (has_arg) ++num_selectors_with_args; selector_idents.push_back(&ast->Idents.get(llvm::StringRef(start, len))); if (has_arg) len += 1; } if (selector_idents.size() == 0) return nullptr; clang::Selector method_selector = ast->Selectors.getSelector( num_selectors_with_args ? selector_idents.size() : 0, selector_idents.data()); clang::QualType method_qual_type(ClangUtil::GetQualType(method_clang_type)); // Populate the method decl with parameter decls const clang::Type *method_type(method_qual_type.getTypePtr()); if (method_type == nullptr) return nullptr; const clang::FunctionProtoType *method_function_prototype( llvm::dyn_cast(method_type)); if (!method_function_prototype) return nullptr; bool is_synthesized = false; bool is_defined = false; clang::ObjCMethodDecl::ImplementationControl imp_control = clang::ObjCMethodDecl::None; const unsigned num_args = method_function_prototype->getNumParams(); if (num_args != num_selectors_with_args) return nullptr; // some debug information is corrupt. We are not going to // deal with it. clang::ObjCMethodDecl *objc_method_decl = clang::ObjCMethodDecl::Create( *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*/); if (objc_method_decl == nullptr) return nullptr; if (num_args > 0) { llvm::SmallVector params; for (unsigned param_index = 0; param_index < num_args; ++param_index) { params.push_back(clang::ParmVarDecl::Create( *ast, objc_method_decl, clang::SourceLocation(), clang::SourceLocation(), nullptr, // anonymous method_function_prototype->getParamType(param_index), nullptr, clang::SC_Auto, nullptr)); } objc_method_decl->setMethodParams( *ast, llvm::ArrayRef(params), llvm::ArrayRef()); } class_interface_decl->addDecl(objc_method_decl); #ifdef LLDB_CONFIGURATION_DEBUG VerifyDecl(objc_method_decl); #endif 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(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(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(qual_type) ->getDecl() ->getUnderlyingType() .getAsOpaquePtr())); case clang::Type::Auto: return GetHasExternalStorage(CompilerType( type.GetTypeSystem(), llvm::cast(qual_type) ->getDeducedType() .getAsOpaquePtr())); case clang::Type::Elaborated: return GetHasExternalStorage(CompilerType( type.GetTypeSystem(), llvm::cast(qual_type) ->getNamedType() .getAsOpaquePtr())); case clang::Type::Paren: return GetHasExternalStorage(CompilerType( type.GetTypeSystem(), llvm::cast(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)); 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) { cxx_record_decl->setHasExternalLexicalStorage(has_extern); cxx_record_decl->setHasExternalVisibleStorage(has_extern); return true; } } break; case clang::Type::Enum: { clang::EnumDecl *enum_decl = llvm::cast(qual_type)->getDecl(); if (enum_decl) { enum_decl->setHasExternalLexicalStorage(has_extern); enum_decl->setHasExternalVisibleStorage(has_extern); return true; } } break; case clang::Type::ObjCObject: case clang::Type::ObjCInterface: { const clang::ObjCObjectType *objc_class_type = llvm::dyn_cast(qual_type.getTypePtr()); assert(objc_class_type); if (objc_class_type) { clang::ObjCInterfaceDecl *class_interface_decl = objc_class_type->getInterface(); if (class_interface_decl) { class_interface_decl->setHasExternalLexicalStorage(has_extern); class_interface_decl->setHasExternalVisibleStorage(has_extern); return true; } } } break; case clang::Type::Typedef: return SetHasExternalStorage(llvm::cast(qual_type) ->getDecl() ->getUnderlyingType() .getAsOpaquePtr(), has_extern); case clang::Type::Auto: return SetHasExternalStorage(llvm::cast(qual_type) ->getDeducedType() .getAsOpaquePtr(), has_extern); case clang::Type::Elaborated: return SetHasExternalStorage(llvm::cast(qual_type) ->getNamedType() .getAsOpaquePtr(), has_extern); case clang::Type::Paren: return SetHasExternalStorage( llvm::cast(qual_type)->desugar().getAsOpaquePtr(), has_extern); default: break; } return false; } #pragma mark TagDecl bool ClangASTContext::StartTagDeclarationDefinition(const CompilerType &type) { clang::QualType qual_type(ClangUtil::GetQualType(type)); if (!qual_type.isNull()) { const clang::TagType *tag_type = qual_type->getAs(); if (tag_type) { clang::TagDecl *tag_decl = tag_type->getDecl(); if (tag_decl) { tag_decl->startDefinition(); return true; } } const clang::ObjCObjectType *object_type = qual_type->getAs(); if (object_type) { clang::ObjCInterfaceDecl *interface_decl = object_type->getInterface(); if (interface_decl) { interface_decl->startDefinition(); return true; } } } return false; } 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(); if (tag_type) { clang::TagDecl *tag_decl = tag_type->getDecl(); if (tag_decl) { clang::CXXRecordDecl *cxx_record_decl = llvm::dyn_cast_or_null(tag_decl); 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; } } } const clang::EnumType *enutype = qual_type->getAs(); if (enutype) { clang::EnumDecl *enum_decl = enutype->getDecl(); if (enum_decl) { if (!enum_decl->isCompleteDefinition()) { ClangASTContext *lldb_ast = llvm::dyn_cast(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; } } } return false; } bool ClangASTContext::AddEnumerationValueToEnumerationType( lldb::opaque_compiler_type_t type, const CompilerType &enumerator_clang_type, const Declaration &decl, const char *name, int64_t enum_value, uint32_t enum_value_bit_size) { if (type && enumerator_clang_type.IsValid() && name && name[0]) { clang::QualType enum_qual_type(GetCanonicalQualType(type)); bool is_signed = false; enumerator_clang_type.IsIntegerType(is_signed); const clang::Type *clang_type = enum_qual_type.getTypePtr(); if (clang_type) { const clang::EnumType *enutype = llvm::dyn_cast(clang_type); if (enutype) { llvm::APSInt enum_llvm_apsint(enum_value_bit_size, is_signed); enum_llvm_apsint = enum_value; clang::EnumConstantDecl *enumerator_decl = clang::EnumConstantDecl::Create( *getASTContext(), enutype->getDecl(), clang::SourceLocation(), name ? &getASTContext()->Idents.get(name) : nullptr, // Identifier ClangUtil::GetQualType(enumerator_clang_type), nullptr, enum_llvm_apsint); if (enumerator_decl) { enutype->getDecl()->addDecl(enumerator_decl); #ifdef LLDB_CONFIGURATION_DEBUG VerifyDecl(enumerator_decl); #endif return true; } } } } return false; } CompilerType ClangASTContext::GetEnumerationIntegerType(lldb::opaque_compiler_type_t type) { clang::QualType enum_qual_type(GetCanonicalQualType(type)); const clang::Type *clang_type = enum_qual_type.getTypePtr(); if (clang_type) { const clang::EnumType *enutype = llvm::dyn_cast(clang_type); if (enutype) { clang::EnumDecl *enum_decl = enutype->getDecl(); if (enum_decl) return CompilerType(getASTContext(), enum_decl->getIntegerType()); } } return CompilerType(); } CompilerType ClangASTContext::CreateMemberPointerType(const CompilerType &type, const CompilerType &pointee_type) { if (type && pointee_type.IsValid() && type.GetTypeSystem() == pointee_type.GetTypeSystem()) { ClangASTContext *ast = llvm::dyn_cast(type.GetTypeSystem()); if (!ast) return CompilerType(); return CompilerType(ast->getASTContext(), 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::Error 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 void ClangASTContext::DumpValue( lldb::opaque_compiler_type_t type, ExecutionContext *exe_ctx, Stream *s, lldb::Format format, const 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) { if (!type) return; clang::QualType qual_type(GetQualType(type)); switch (qual_type->getTypeClass()) { case clang::Type::Record: if (GetCompleteType(type)) { const clang::RecordType *record_type = llvm::cast(qual_type.getTypePtr()); const clang::RecordDecl *record_decl = record_type->getDecl(); assert(record_decl); uint32_t field_bit_offset = 0; uint32_t field_byte_offset = 0; const clang::ASTRecordLayout &record_layout = getASTContext()->getASTRecordLayout(record_decl); uint32_t child_idx = 0; const clang::CXXRecordDecl *cxx_record_decl = llvm::dyn_cast(record_decl); if (cxx_record_decl) { // We might have base classes to print out first clang::CXXRecordDecl::base_class_const_iterator base_class, base_class_end; for (base_class = cxx_record_decl->bases_begin(), base_class_end = cxx_record_decl->bases_end(); base_class != base_class_end; ++base_class) { const clang::CXXRecordDecl *base_class_decl = llvm::cast( base_class->getType()->getAs()->getDecl()); // Skip empty base classes if (verbose == false && ClangASTContext::RecordHasFields(base_class_decl) == false) continue; if (base_class->isVirtual()) field_bit_offset = record_layout.getVBaseClassOffset(base_class_decl) .getQuantity() * 8; else field_bit_offset = record_layout.getBaseClassOffset(base_class_decl) .getQuantity() * 8; field_byte_offset = field_bit_offset / 8; assert(field_bit_offset % 8 == 0); if (child_idx == 0) s->PutChar('{'); else s->PutChar(','); clang::QualType base_class_qual_type = base_class->getType(); std::string base_class_type_name(base_class_qual_type.getAsString()); // Indent and print the base class type name s->Format("\n{0}{1}", llvm::fmt_repeat(" ", depth + DEPTH_INCREMENT), base_class_type_name); clang::TypeInfo base_class_type_info = getASTContext()->getTypeInfo(base_class_qual_type); // Dump the value of the member CompilerType base_clang_type(getASTContext(), base_class_qual_type); base_clang_type.DumpValue( exe_ctx, s, // Stream to dump to base_clang_type .GetFormat(), // The format with which to display the member data, // Data buffer containing all bytes for this type data_byte_offset + field_byte_offset, // Offset into "data" where // to grab value from base_class_type_info.Width / 8, // Size of this type in bytes 0, // Bitfield bit size 0, // Bitfield bit offset show_types, // Boolean indicating if we should show the variable // types show_summary, // Boolean indicating if we should show a summary // for the current type verbose, // Verbose output? depth + DEPTH_INCREMENT); // Scope depth for any types that have // children ++child_idx; } } uint32_t field_idx = 0; clang::RecordDecl::field_iterator field, field_end; for (field = record_decl->field_begin(), field_end = record_decl->field_end(); field != field_end; ++field, ++field_idx, ++child_idx) { // Print the starting squiggly bracket (if this is the // first member) or comma (for member 2 and beyond) for // the struct/union/class member. if (child_idx == 0) s->PutChar('{'); else s->PutChar(','); // Indent s->Printf("\n%*s", depth + DEPTH_INCREMENT, ""); clang::QualType field_type = field->getType(); // Print the member type if requested // 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); assert(field_idx < record_layout.getFieldCount()); // Figure out the field offset within the current struct/union/class // type field_bit_offset = record_layout.getFieldOffset(field_idx); 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)) field_bitfield_bit_offset = field_bit_offset % 8; if (show_types) { std::string field_type_name(field_type.getAsString()); if (field_bitfield_bit_size > 0) s->Printf("(%s:%u) ", field_type_name.c_str(), field_bitfield_bit_size); else s->Printf("(%s) ", field_type_name.c_str()); } // Print the member name and equal sign s->Printf("%s = ", field->getNameAsString().c_str()); // Dump the value of the member CompilerType field_clang_type(getASTContext(), field_type); field_clang_type.DumpValue( exe_ctx, s, // Stream to dump to field_clang_type .GetFormat(), // The format with which to display the member data, // Data buffer containing all bytes for this type data_byte_offset + field_byte_offset, // Offset into "data" where to // grab value from field_type_info.Width / 8, // Size of this type in bytes field_bitfield_bit_size, // Bitfield bit size field_bitfield_bit_offset, // Bitfield bit offset show_types, // Boolean indicating if we should show the variable // types show_summary, // Boolean indicating if we should show a summary for // the current type verbose, // Verbose output? depth + DEPTH_INCREMENT); // Scope depth for any types that have // children } // Indent the trailing squiggly bracket if (child_idx > 0) s->Printf("\n%*s}", depth, ""); } return; case clang::Type::Enum: if (GetCompleteType(type)) { const clang::EnumType *enutype = llvm::cast(qual_type.getTypePtr()); const clang::EnumDecl *enum_decl = enutype->getDecl(); assert(enum_decl); clang::EnumDecl::enumerator_iterator enum_pos, enum_end_pos; lldb::offset_t offset = data_byte_offset; const int64_t enum_value = data.GetMaxU64Bitfield( &offset, data_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() == enum_value) { s->Printf("%s", enum_pos->getNameAsString().c_str()); return; } } // 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_value); } return; case clang::Type::ConstantArray: { const clang::ConstantArrayType *array = llvm::cast(qual_type.getTypePtr()); bool is_array_of_characters = false; clang::QualType element_qual_type = array->getElementType(); const clang::Type *canonical_type = element_qual_type->getCanonicalTypeInternal().getTypePtr(); if (canonical_type) is_array_of_characters = canonical_type->isCharType(); const uint64_t element_count = array->getSize().getLimitedValue(); clang::TypeInfo field_type_info = getASTContext()->getTypeInfo(element_qual_type); uint32_t element_idx = 0; uint32_t element_offset = 0; uint64_t element_byte_size = field_type_info.Width / 8; uint32_t element_stride = element_byte_size; if (is_array_of_characters) { s->PutChar('"'); DumpDataExtractor(data, s, data_byte_offset, lldb::eFormatChar, element_byte_size, element_count, UINT32_MAX, LLDB_INVALID_ADDRESS, 0, 0); s->PutChar('"'); return; } else { CompilerType element_clang_type(getASTContext(), element_qual_type); lldb::Format element_format = element_clang_type.GetFormat(); for (element_idx = 0; element_idx < element_count; ++element_idx) { // Print the starting squiggly bracket (if this is the // first member) or comman (for member 2 and beyong) for // the struct/union/class member. if (element_idx == 0) s->PutChar('{'); else s->PutChar(','); // Indent and print the index s->Printf("\n%*s[%u] ", depth + DEPTH_INCREMENT, "", element_idx); // Figure out the field offset within the current struct/union/class // type element_offset = element_idx * element_stride; // Dump the value of the member element_clang_type.DumpValue( exe_ctx, s, // Stream to dump to element_format, // The format with which to display the element data, // Data buffer containing all bytes for this type data_byte_offset + element_offset, // Offset into "data" where to grab value from element_byte_size, // Size of this type in bytes 0, // Bitfield bit size 0, // Bitfield bit offset show_types, // Boolean indicating if we should show the variable // types show_summary, // Boolean indicating if we should show a summary for // the current type verbose, // Verbose output? depth + DEPTH_INCREMENT); // Scope depth for any types that have // children } // Indent the trailing squiggly bracket if (element_idx > 0) s->Printf("\n%*s}", depth, ""); } } return; case clang::Type::Typedef: { clang::QualType typedef_qual_type = llvm::cast(qual_type) ->getDecl() ->getUnderlyingType(); CompilerType typedef_clang_type(getASTContext(), typedef_qual_type); lldb::Format typedef_format = typedef_clang_type.GetFormat(); clang::TypeInfo typedef_type_info = getASTContext()->getTypeInfo(typedef_qual_type); uint64_t typedef_byte_size = typedef_type_info.Width / 8; return typedef_clang_type.DumpValue( exe_ctx, s, // Stream to dump to typedef_format, // The format with which to display the element data, // Data buffer containing all bytes for this type data_byte_offset, // Offset into "data" where to grab value from typedef_byte_size, // Size of this type in bytes bitfield_bit_size, // Bitfield bit size bitfield_bit_offset, // Bitfield bit offset show_types, // Boolean indicating if we should show the variable types show_summary, // Boolean indicating if we should show a summary for the // current type verbose, // Verbose output? depth); // Scope depth for any types that have children } break; case clang::Type::Auto: { clang::QualType elaborated_qual_type = llvm::cast(qual_type)->getDeducedType(); CompilerType elaborated_clang_type(getASTContext(), elaborated_qual_type); lldb::Format elaborated_format = elaborated_clang_type.GetFormat(); clang::TypeInfo elaborated_type_info = getASTContext()->getTypeInfo(elaborated_qual_type); uint64_t elaborated_byte_size = elaborated_type_info.Width / 8; return elaborated_clang_type.DumpValue( exe_ctx, s, // Stream to dump to elaborated_format, // The format with which to display the element data, // Data buffer containing all bytes for this type data_byte_offset, // Offset into "data" where to grab value from elaborated_byte_size, // Size of this type in bytes bitfield_bit_size, // Bitfield bit size bitfield_bit_offset, // Bitfield bit offset show_types, // Boolean indicating if we should show the variable types show_summary, // Boolean indicating if we should show a summary for the // current type verbose, // Verbose output? depth); // Scope depth for any types that have children } break; case clang::Type::Elaborated: { clang::QualType elaborated_qual_type = llvm::cast(qual_type)->getNamedType(); CompilerType elaborated_clang_type(getASTContext(), elaborated_qual_type); lldb::Format elaborated_format = elaborated_clang_type.GetFormat(); clang::TypeInfo elaborated_type_info = getASTContext()->getTypeInfo(elaborated_qual_type); uint64_t elaborated_byte_size = elaborated_type_info.Width / 8; return elaborated_clang_type.DumpValue( exe_ctx, s, // Stream to dump to elaborated_format, // The format with which to display the element data, // Data buffer containing all bytes for this type data_byte_offset, // Offset into "data" where to grab value from elaborated_byte_size, // Size of this type in bytes bitfield_bit_size, // Bitfield bit size bitfield_bit_offset, // Bitfield bit offset show_types, // Boolean indicating if we should show the variable types show_summary, // Boolean indicating if we should show a summary for the // current type verbose, // Verbose output? depth); // Scope depth for any types that have children } break; case clang::Type::Paren: { clang::QualType desugar_qual_type = llvm::cast(qual_type)->desugar(); CompilerType desugar_clang_type(getASTContext(), desugar_qual_type); lldb::Format desugar_format = desugar_clang_type.GetFormat(); clang::TypeInfo desugar_type_info = getASTContext()->getTypeInfo(desugar_qual_type); uint64_t desugar_byte_size = desugar_type_info.Width / 8; return desugar_clang_type.DumpValue( exe_ctx, s, // Stream to dump to desugar_format, // The format with which to display the element data, // Data buffer containing all bytes for this type data_byte_offset, // Offset into "data" where to grab value from desugar_byte_size, // Size of this type in bytes bitfield_bit_size, // Bitfield bit size bitfield_bit_offset, // Bitfield bit offset show_types, // Boolean indicating if we should show the variable types show_summary, // Boolean indicating if we should show a summary for the // current type verbose, // Verbose output? depth); // Scope depth for any types that have children } break; default: // We are down to a scalar type that we just need to display. DumpDataExtractor(data, s, data_byte_offset, format, data_byte_size, 1, UINT32_MAX, LLDB_INVALID_ADDRESS, bitfield_bit_size, bitfield_bit_offset); if (show_summary) DumpSummary(type, exe_ctx, s, data, data_byte_offset, data_byte_size); break; } } 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, ExecutionContextScope *exe_scope) { if (!type) return false; if (IsAggregateType(type)) { return false; } else { clang::QualType qual_type(GetQualType(type)); const clang::Type::TypeClass type_class = qual_type->getTypeClass(); switch (type_class) { case clang::Type::Typedef: { clang::QualType typedef_qual_type = llvm::cast(qual_type) ->getDecl() ->getUnderlyingType(); CompilerType typedef_clang_type(getASTContext(), typedef_qual_type); if (format == eFormatDefault) format = typedef_clang_type.GetFormat(); clang::TypeInfo typedef_type_info = getASTContext()->getTypeInfo(typedef_qual_type); uint64_t typedef_byte_size = typedef_type_info.Width / 8; return typedef_clang_type.DumpTypeValue( s, format, // The format with which to display the element data, // Data buffer containing all bytes for this type byte_offset, // Offset into "data" where to grab value from typedef_byte_size, // Size of this type in bytes bitfield_bit_size, // Size in bits of a bitfield value, if zero don't // treat as a bitfield bitfield_bit_offset, // Offset in bits of a bitfield value if // bitfield_bit_size != 0 exe_scope); } break; case clang::Type::Enum: // 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(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; } // format was not enum, just fall through and dump the value as // requested.... LLVM_FALLTHROUGH; default: // We are down to a scalar type that we just need to display. { uint32_t item_count = 1; // A few formats, we might need to modify our size and count for // depending // on how we are trying to display the value... switch (format) { default: case eFormatBoolean: case eFormatBinary: case eFormatComplex: case eFormatCString: // NULL terminated C strings case eFormatDecimal: case eFormatEnum: case eFormatHex: case eFormatHexUppercase: case eFormatFloat: case eFormatOctal: case eFormatOSType: case eFormatUnsigned: case eFormatPointer: case eFormatVectorOfChar: case eFormatVectorOfSInt8: case eFormatVectorOfUInt8: case eFormatVectorOfSInt16: case eFormatVectorOfUInt16: case eFormatVectorOfSInt32: case eFormatVectorOfUInt32: case eFormatVectorOfSInt64: case eFormatVectorOfUInt64: case eFormatVectorOfFloat32: case eFormatVectorOfFloat64: case eFormatVectorOfUInt128: break; case eFormatChar: case eFormatCharPrintable: case eFormatCharArray: case eFormatBytes: case eFormatBytesWithASCII: item_count = byte_size; byte_size = 1; break; case eFormatUnicode16: item_count = byte_size / 2; byte_size = 2; break; case eFormatUnicode32: item_count = byte_size / 4; byte_size = 4; break; } return DumpDataExtractor(data, s, byte_offset, format, byte_size, item_count, UINT32_MAX, LLDB_INVALID_ADDRESS, bitfield_bit_size, bitfield_bit_offset, exe_scope); } break; } } return 0; } void ClangASTContext::DumpSummary(lldb::opaque_compiler_type_t type, ExecutionContext *exe_ctx, Stream *s, const lldb_private::DataExtractor &data, lldb::offset_t data_byte_offset, size_t data_byte_size) { uint32_t length = 0; if (IsCStringType(type, length)) { if (exe_ctx) { Process *process = exe_ctx->GetProcessPtr(); if (process) { lldb::offset_t offset = data_byte_offset; lldb::addr_t pointer_address = data.GetMaxU64(&offset, data_byte_size); std::vector buf; if (length > 0) buf.resize(length); else buf.resize(256); DataExtractor cstr_data(&buf.front(), buf.size(), process->GetByteOrder(), 4); buf.back() = '\0'; size_t bytes_read; size_t total_cstr_len = 0; Error error; while ((bytes_read = process->ReadMemory(pointer_address, &buf.front(), buf.size(), error)) > 0) { const size_t len = strlen((const char *)&buf.front()); if (len == 0) break; if (total_cstr_len == 0) s->PutCString(" \""); DumpDataExtractor(cstr_data, s, 0, lldb::eFormatChar, 1, len, UINT32_MAX, LLDB_INVALID_ADDRESS, 0, 0); total_cstr_len += len; if (len < buf.size()) break; pointer_address += total_cstr_len; } if (total_cstr_len > 0) s->PutChar('"'); } } } } void ClangASTContext::DumpTypeDescription(lldb::opaque_compiler_type_t type) { StreamFile s(stdout, false); DumpTypeDescription(type, &s); ClangASTMetadata *metadata = ClangASTContext::GetMetadata(getASTContext(), type); if (metadata) { metadata->Dump(&s); } } void ClangASTContext::DumpTypeDescription(lldb::opaque_compiler_type_t type, Stream *s) { if (type) { clang::QualType qual_type(GetQualType(type)); llvm::SmallVector buf; llvm::raw_svector_ostream llvm_ostrm(buf); const clang::Type::TypeClass type_class = qual_type->getTypeClass(); switch (type_class) { case clang::Type::ObjCObject: case clang::Type::ObjCInterface: { GetCompleteType(type); const clang::ObjCObjectType *objc_class_type = llvm::dyn_cast(qual_type.getTypePtr()); assert(objc_class_type); if (objc_class_type) { clang::ObjCInterfaceDecl *class_interface_decl = objc_class_type->getInterface(); if (class_interface_decl) { clang::PrintingPolicy policy = getASTContext()->getPrintingPolicy(); class_interface_decl->print(llvm_ostrm, policy, s->GetIndentLevel()); } } } break; case clang::Type::Typedef: { const clang::TypedefType *typedef_type = qual_type->getAs(); if (typedef_type) { const clang::TypedefNameDecl *typedef_decl = typedef_type->getDecl(); std::string clang_typedef_name( typedef_decl->getQualifiedNameAsString()); if (!clang_typedef_name.empty()) { s->PutCString("typedef "); s->PutCString(clang_typedef_name); } } } break; case clang::Type::Auto: CompilerType(getASTContext(), llvm::cast(qual_type)->getDeducedType()) .DumpTypeDescription(s); return; case clang::Type::Elaborated: CompilerType(getASTContext(), llvm::cast(qual_type)->getNamedType()) .DumpTypeDescription(s); return; case clang::Type::Paren: CompilerType(getASTContext(), llvm::cast(qual_type)->desugar()) .DumpTypeDescription(s); return; case clang::Type::Record: { GetCompleteType(type); const clang::RecordType *record_type = llvm::cast(qual_type.getTypePtr()); const clang::RecordDecl *record_decl = record_type->getDecl(); const clang::CXXRecordDecl *cxx_record_decl = llvm::dyn_cast(record_decl); if (cxx_record_decl) cxx_record_decl->print(llvm_ostrm, getASTContext()->getPrintingPolicy(), s->GetIndentLevel()); else record_decl->print(llvm_ostrm, getASTContext()->getPrintingPolicy(), s->GetIndentLevel()); } break; default: { const clang::TagType *tag_type = llvm::dyn_cast(qual_type.getTypePtr()); if (tag_type) { clang::TagDecl *tag_decl = tag_type->getDecl(); if (tag_decl) tag_decl->print(llvm_ostrm, 0); } else { std::string clang_type_name(qual_type.getAsString()); if (!clang_type_name.empty()) s->PutCString(clang_type_name); } } } if (buf.size() > 0) { s->Write(buf.data(), buf.size()); } } } void ClangASTContext::DumpTypeName(const CompilerType &type) { if (ClangUtil::IsClangType(type)) { clang::QualType qual_type( ClangUtil::GetCanonicalQualType(ClangUtil::RemoveFastQualifiers(type))); const clang::Type::TypeClass type_class = qual_type->getTypeClass(); switch (type_class) { case clang::Type::Record: { const clang::CXXRecordDecl *cxx_record_decl = qual_type->getAsCXXRecordDecl(); if (cxx_record_decl) printf("class %s", cxx_record_decl->getName().str().c_str()); } break; case clang::Type::Enum: { clang::EnumDecl *enum_decl = llvm::cast(qual_type)->getDecl(); if (enum_decl) { printf("enum %s", enum_decl->getName().str().c_str()); } } break; case clang::Type::ObjCObject: case clang::Type::ObjCInterface: { const clang::ObjCObjectType *objc_class_type = llvm::dyn_cast(qual_type); if (objc_class_type) { clang::ObjCInterfaceDecl *class_interface_decl = objc_class_type->getInterface(); // 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) printf("@class %s", class_interface_decl->getName().str().c_str()); } } break; case clang::Type::Typedef: printf("typedef %s", llvm::cast(qual_type) ->getDecl() ->getName() .str() .c_str()); break; case clang::Type::Auto: printf("auto "); return DumpTypeName(CompilerType(type.GetTypeSystem(), llvm::cast(qual_type) ->getDeducedType() .getAsOpaquePtr())); case clang::Type::Elaborated: printf("elaborated "); return DumpTypeName(CompilerType( type.GetTypeSystem(), llvm::cast(qual_type) ->getNamedType() .getAsOpaquePtr())); case clang::Type::Paren: printf("paren "); return DumpTypeName(CompilerType( type.GetTypeSystem(), llvm::cast(qual_type)->desugar().getAsOpaquePtr())); default: printf("ClangASTContext::DumpTypeName() type_class = %u", type_class); break; } } } clang::ClassTemplateDecl *ClangASTContext::ParseClassTemplateDecl( clang::DeclContext *decl_ctx, lldb::AccessType access_type, const char *parent_name, int tag_decl_kind, const ClangASTContext::TemplateParameterInfos &template_param_infos) { if (template_param_infos.IsValid()) { std::string template_basename(parent_name); template_basename.erase(template_basename.find('<')); return CreateClassTemplateDecl(decl_ctx, access_type, template_basename.c_str(), tag_decl_kind, template_param_infos); } return NULL; } void ClangASTContext::CompleteTagDecl(void *baton, clang::TagDecl *decl) { ClangASTContext *ast = (ClangASTContext *)baton; SymbolFile *sym_file = ast->GetSymbolFile(); if (sym_file) { CompilerType clang_type = GetTypeForDecl(decl); if (clang_type) sym_file->CompleteType(clang_type); } } void ClangASTContext::CompleteObjCInterfaceDecl( void *baton, clang::ObjCInterfaceDecl *decl) { ClangASTContext *ast = (ClangASTContext *)baton; SymbolFile *sym_file = ast->GetSymbolFile(); if (sym_file) { CompilerType clang_type = GetTypeForDecl(decl); if (clang_type) sym_file->CompleteType(clang_type); } } DWARFASTParser *ClangASTContext::GetDWARFParser() { if (!m_dwarf_ast_parser_ap) m_dwarf_ast_parser_ap.reset(new DWARFASTParserClang(*this)); return m_dwarf_ast_parser_ap.get(); } PDBASTParser *ClangASTContext::GetPDBParser() { if (!m_pdb_ast_parser_ap) m_pdb_ast_parser_ap.reset(new PDBASTParser(*this)); return m_pdb_ast_parser_ap.get(); } bool ClangASTContext::LayoutRecordType( void *baton, const clang::RecordDecl *record_decl, uint64_t &bit_size, uint64_t &alignment, llvm::DenseMap &field_offsets, llvm::DenseMap &base_offsets, llvm::DenseMap &vbase_offsets) { ClangASTContext *ast = (ClangASTContext *)baton; DWARFASTParserClang *dwarf_ast_parser = (DWARFASTParserClang *)ast->GetDWARFParser(); return dwarf_ast_parser->GetClangASTImporter().LayoutRecordType( record_decl, bit_size, alignment, field_offsets, base_offsets, vbase_offsets); } //---------------------------------------------------------------------- // CompilerDecl override functions //---------------------------------------------------------------------- ConstString ClangASTContext::DeclGetName(void *opaque_decl) { if (opaque_decl) { clang::NamedDecl *nd = llvm::dyn_cast((clang::Decl *)opaque_decl); if (nd != nullptr) return ConstString(nd->getDeclName().getAsString()); } return ConstString(); } ConstString ClangASTContext::DeclGetMangledName(void *opaque_decl) { if (opaque_decl) { clang::NamedDecl *nd = llvm::dyn_cast((clang::Decl *)opaque_decl); if (nd != nullptr && !llvm::isa(nd)) { clang::MangleContext *mc = getMangleContext(); if (mc && mc->shouldMangleCXXName(nd)) { llvm::SmallVector buf; llvm::raw_svector_ostream llvm_ostrm(buf); if (llvm::isa(nd)) { mc->mangleCXXCtor(llvm::dyn_cast(nd), Ctor_Complete, llvm_ostrm); } else if (llvm::isa(nd)) { mc->mangleCXXDtor(llvm::dyn_cast(nd), Dtor_Complete, llvm_ostrm); } else { mc->mangleName(nd, llvm_ostrm); } if (buf.size() > 0) return ConstString(buf.data(), buf.size()); } } } return ConstString(); } CompilerDeclContext ClangASTContext::DeclGetDeclContext(void *opaque_decl) { if (opaque_decl) return CompilerDeclContext(this, ((clang::Decl *)opaque_decl)->getDeclContext()); else return CompilerDeclContext(); } CompilerType ClangASTContext::DeclGetFunctionReturnType(void *opaque_decl) { if (clang::FunctionDecl *func_decl = llvm::dyn_cast((clang::Decl *)opaque_decl)) return CompilerType(this, func_decl->getReturnType().getAsOpaquePtr()); if (clang::ObjCMethodDecl *objc_method = llvm::dyn_cast((clang::Decl *)opaque_decl)) return CompilerType(this, objc_method->getReturnType().getAsOpaquePtr()); else return CompilerType(); } size_t ClangASTContext::DeclGetFunctionNumArguments(void *opaque_decl) { if (clang::FunctionDecl *func_decl = llvm::dyn_cast((clang::Decl *)opaque_decl)) return func_decl->param_size(); if (clang::ObjCMethodDecl *objc_method = llvm::dyn_cast((clang::Decl *)opaque_decl)) return objc_method->param_size(); else return 0; } CompilerType ClangASTContext::DeclGetFunctionArgumentType(void *opaque_decl, size_t idx) { if (clang::FunctionDecl *func_decl = llvm::dyn_cast((clang::Decl *)opaque_decl)) { if (idx < func_decl->param_size()) { ParmVarDecl *var_decl = func_decl->getParamDecl(idx); if (var_decl) return CompilerType(this, var_decl->getOriginalType().getAsOpaquePtr()); } } else if (clang::ObjCMethodDecl *objc_method = llvm::dyn_cast( (clang::Decl *)opaque_decl)) { if (idx < objc_method->param_size()) return CompilerType( this, objc_method->parameters()[idx]->getOriginalType().getAsOpaquePtr()); } return CompilerType(); } //---------------------------------------------------------------------- // CompilerDeclContext functions //---------------------------------------------------------------------- std::vector ClangASTContext::DeclContextFindDeclByName( void *opaque_decl_ctx, ConstString name, const bool ignore_using_decls) { std::vector found_decls; if (opaque_decl_ctx) { DeclContext *root_decl_ctx = (DeclContext *)opaque_decl_ctx; std::set searched; std::multimap search_queue; SymbolFile *symbol_file = GetSymbolFile(); for (clang::DeclContext *decl_context = root_decl_ctx; decl_context != nullptr && found_decls.empty(); decl_context = decl_context->getParent()) { search_queue.insert(std::make_pair(decl_context, decl_context)); for (auto it = search_queue.find(decl_context); it != search_queue.end(); it++) { if (!searched.insert(it->second).second) continue; symbol_file->ParseDeclsForContext( CompilerDeclContext(this, it->second)); for (clang::Decl *child : it->second->decls()) { if (clang::UsingDirectiveDecl *ud = llvm::dyn_cast(child)) { if (ignore_using_decls) continue; clang::DeclContext *from = ud->getCommonAncestor(); if (searched.find(ud->getNominatedNamespace()) == searched.end()) search_queue.insert( std::make_pair(from, ud->getNominatedNamespace())); } else if (clang::UsingDecl *ud = llvm::dyn_cast(child)) { if (ignore_using_decls) continue; for (clang::UsingShadowDecl *usd : ud->shadows()) { clang::Decl *target = usd->getTargetDecl(); if (clang::NamedDecl *nd = llvm::dyn_cast(target)) { IdentifierInfo *ii = nd->getIdentifier(); if (ii != nullptr && ii->getName().equals(name.AsCString(nullptr))) found_decls.push_back(CompilerDecl(this, nd)); } } } else if (clang::NamedDecl *nd = llvm::dyn_cast(child)) { IdentifierInfo *ii = nd->getIdentifier(); if (ii != nullptr && ii->getName().equals(name.AsCString(nullptr))) found_decls.push_back(CompilerDecl(this, nd)); } } } } } return found_decls; } // Look for child_decl_ctx's lookup scope in frame_decl_ctx and its parents, // and return the number of levels it took to find it, or // LLDB_INVALID_DECL_LEVEL // if not found. If the decl was imported via a using declaration, its name // and/or // type, if set, will be used to check that the decl found in the scope is a // match. // // The optional name is required by languages (like C++) to handle using // declarations // like: // // void poo(); // namespace ns { // void foo(); // void goo(); // } // void bar() { // using ns::foo; // // CountDeclLevels returns 0 for 'foo', 1 for 'poo', and // // LLDB_INVALID_DECL_LEVEL for 'goo'. // } // // The optional type is useful in the case that there's a specific overload // that we're looking for that might otherwise be shadowed, like: // // void foo(int); // namespace ns { // void foo(); // } // void bar() { // using ns::foo; // // CountDeclLevels returns 0 for { 'foo', void() }, // // 1 for { 'foo', void(int) }, and // // LLDB_INVALID_DECL_LEVEL for { 'foo', void(int, int) }. // } // // NOTE: Because file statics are at the TranslationUnit along with globals, a // function at file scope will return the same level as a function at global // scope. // Ideally we'd like to treat the file scope as an additional scope just below // the // global scope. More work needs to be done to recognise that, if the decl // we're // trying to look up is static, we should compare its source file with that of // the // current scope and return a lower number for it. uint32_t ClangASTContext::CountDeclLevels(clang::DeclContext *frame_decl_ctx, clang::DeclContext *child_decl_ctx, ConstString *child_name, CompilerType *child_type) { if (frame_decl_ctx) { std::set searched; std::multimap search_queue; SymbolFile *symbol_file = GetSymbolFile(); // Get the lookup scope for the decl we're trying to find. clang::DeclContext *parent_decl_ctx = child_decl_ctx->getParent(); // Look for it in our scope's decl context and its parents. uint32_t level = 0; for (clang::DeclContext *decl_ctx = frame_decl_ctx; decl_ctx != nullptr; decl_ctx = decl_ctx->getParent()) { if (!decl_ctx->isLookupContext()) continue; if (decl_ctx == parent_decl_ctx) // Found it! return level; search_queue.insert(std::make_pair(decl_ctx, decl_ctx)); for (auto it = search_queue.find(decl_ctx); it != search_queue.end(); it++) { if (searched.find(it->second) != searched.end()) continue; // Currently DWARF has one shared translation unit for all Decls at top // level, so this // would erroneously find using statements anywhere. So don't look at // the top-level // translation unit. // TODO fix this and add a testcase that depends on it. if (llvm::isa(it->second)) continue; searched.insert(it->second); symbol_file->ParseDeclsForContext( CompilerDeclContext(this, it->second)); for (clang::Decl *child : it->second->decls()) { if (clang::UsingDirectiveDecl *ud = llvm::dyn_cast(child)) { clang::DeclContext *ns = ud->getNominatedNamespace(); if (ns == parent_decl_ctx) // Found it! return level; clang::DeclContext *from = ud->getCommonAncestor(); if (searched.find(ns) == searched.end()) search_queue.insert(std::make_pair(from, ns)); } else if (child_name) { if (clang::UsingDecl *ud = llvm::dyn_cast(child)) { for (clang::UsingShadowDecl *usd : ud->shadows()) { clang::Decl *target = usd->getTargetDecl(); clang::NamedDecl *nd = llvm::dyn_cast(target); if (!nd) continue; // Check names. IdentifierInfo *ii = nd->getIdentifier(); if (ii == nullptr || !ii->getName().equals(child_name->AsCString(nullptr))) continue; // Check types, if one was provided. if (child_type) { CompilerType clang_type = ClangASTContext::GetTypeForDecl(nd); if (!AreTypesSame(clang_type, *child_type, /*ignore_qualifiers=*/true)) continue; } // Found it! return level; } } } } } ++level; } } 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 = llvm::dyn_cast((clang::DeclContext *)opaque_decl_ctx); if (named_decl) return ConstString(named_decl->getName()); } return ConstString(); } ConstString ClangASTContext::DeclContextGetScopeQualifiedName(void *opaque_decl_ctx) { if (opaque_decl_ctx) { clang::NamedDecl *named_decl = llvm::dyn_cast((clang::DeclContext *)opaque_decl_ctx); if (named_decl) return ConstString( llvm::StringRef(named_decl->getQualifiedNameAsString())); } return ConstString(); } bool ClangASTContext::DeclContextIsClassMethod( void *opaque_decl_ctx, lldb::LanguageType *language_ptr, bool *is_instance_method_ptr, ConstString *language_object_name_ptr) { if (opaque_decl_ctx) { clang::DeclContext *decl_ctx = (clang::DeclContext *)opaque_decl_ctx; if (ObjCMethodDecl *objc_method = llvm::dyn_cast(decl_ctx)) { if (is_instance_method_ptr) *is_instance_method_ptr = objc_method->isInstanceMethod(); if (language_ptr) *language_ptr = eLanguageTypeObjC; if (language_object_name_ptr) language_object_name_ptr->SetCString("self"); return true; } else if (CXXMethodDecl *cxx_method = llvm::dyn_cast(decl_ctx)) { if (is_instance_method_ptr) *is_instance_method_ptr = cxx_method->isInstance(); if (language_ptr) *language_ptr = eLanguageTypeC_plus_plus; if (language_object_name_ptr) language_object_name_ptr->SetCString("this"); return true; } else if (clang::FunctionDecl *function_decl = llvm::dyn_cast(decl_ctx)) { ClangASTMetadata *metadata = GetMetadata(&decl_ctx->getParentASTContext(), function_decl); if (metadata && metadata->HasObjectPtr()) { if (is_instance_method_ptr) *is_instance_method_ptr = true; if (language_ptr) *language_ptr = eLanguageTypeObjC; if (language_object_name_ptr) language_object_name_ptr->SetCString(metadata->GetObjectPtrName()); return true; } } } return false; } clang::DeclContext * ClangASTContext::DeclContextGetAsDeclContext(const CompilerDeclContext &dc) { if (dc.IsClang()) return (clang::DeclContext *)dc.GetOpaqueDeclContext(); return nullptr; } ObjCMethodDecl * ClangASTContext::DeclContextGetAsObjCMethodDecl(const CompilerDeclContext &dc) { if (dc.IsClang()) return llvm::dyn_cast( (clang::DeclContext *)dc.GetOpaqueDeclContext()); return nullptr; } CXXMethodDecl * ClangASTContext::DeclContextGetAsCXXMethodDecl(const CompilerDeclContext &dc) { if (dc.IsClang()) return llvm::dyn_cast( (clang::DeclContext *)dc.GetOpaqueDeclContext()); return nullptr; } clang::FunctionDecl * ClangASTContext::DeclContextGetAsFunctionDecl(const CompilerDeclContext &dc) { if (dc.IsClang()) return llvm::dyn_cast( (clang::DeclContext *)dc.GetOpaqueDeclContext()); return nullptr; } clang::NamespaceDecl * ClangASTContext::DeclContextGetAsNamespaceDecl(const CompilerDeclContext &dc) { if (dc.IsClang()) return llvm::dyn_cast( (clang::DeclContext *)dc.GetOpaqueDeclContext()); return nullptr; } ClangASTMetadata * ClangASTContext::DeclContextGetMetaData(const CompilerDeclContext &dc, const void *object) { clang::ASTContext *ast = DeclContextGetClangASTContext(dc); if (ast) return ClangASTContext::GetMetadata(ast, object); return nullptr; } clang::ASTContext * ClangASTContext::DeclContextGetClangASTContext(const CompilerDeclContext &dc) { ClangASTContext *ast = llvm::dyn_cast_or_null(dc.GetTypeSystem()); if (ast) 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) {} UserExpression *ClangASTContextForExpressions::GetUserExpression( llvm::StringRef expr, llvm::StringRef prefix, lldb::LanguageType language, Expression::ResultType desired_type, const EvaluateExpressionOptions &options) { TargetSP target_sp = m_target_wp.lock(); if (!target_sp) return nullptr; return new ClangUserExpression(*target_sp.get(), expr, prefix, language, desired_type, options); } FunctionCaller *ClangASTContextForExpressions::GetFunctionCaller( const CompilerType &return_type, const Address &function_address, const ValueList &arg_value_list, const char *name) { TargetSP target_sp = m_target_wp.lock(); if (!target_sp) return nullptr; Process *process = target_sp->GetProcessSP().get(); if (!process) return nullptr; return new ClangFunctionCaller(*process, return_type, function_address, arg_value_list, name); } UtilityFunction * ClangASTContextForExpressions::GetUtilityFunction(const char *text, const char *name) { TargetSP target_sp = m_target_wp.lock(); if (!target_sp) return nullptr; return new ClangUtilityFunction(*target_sp.get(), text, name); } PersistentExpressionState * ClangASTContextForExpressions::GetPersistentExpressionState() { return m_persistent_variables.get(); } Index: vendor/lldb/dist/source/Symbol/GoASTContext.cpp =================================================================== --- vendor/lldb/dist/source/Symbol/GoASTContext.cpp (revision 317691) +++ vendor/lldb/dist/source/Symbol/GoASTContext.cpp (revision 317692) @@ -1,1448 +1,1447 @@ //===-- GoASTContext.cpp ----------------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #include #include #include #include "lldb/Core/DumpDataExtractor.h" #include "lldb/Core/Module.h" #include "lldb/Core/PluginManager.h" #include "lldb/Core/StreamFile.h" #include "lldb/Core/UniqueCStringMap.h" #include "lldb/Core/ValueObject.h" #include "lldb/Symbol/CompilerType.h" #include "lldb/Symbol/GoASTContext.h" #include "lldb/Symbol/ObjectFile.h" #include "lldb/Symbol/SymbolFile.h" #include "lldb/Symbol/Type.h" #include "lldb/Target/ExecutionContext.h" #include "lldb/Target/Target.h" #include "llvm/Support/Threading.h" #include "Plugins/ExpressionParser/Go/GoUserExpression.h" #include "Plugins/SymbolFile/DWARF/DWARFASTParserGo.h" using namespace lldb; namespace lldb_private { class GoArray; class GoFunction; class GoStruct; class GoType { public: enum { KIND_BOOL = 1, KIND_INT = 2, KIND_INT8 = 3, KIND_INT16 = 4, KIND_INT32 = 5, KIND_INT64 = 6, KIND_UINT = 7, KIND_UINT8 = 8, KIND_UINT16 = 9, KIND_UINT32 = 10, KIND_UINT64 = 11, KIND_UINTPTR = 12, KIND_FLOAT32 = 13, KIND_FLOAT64 = 14, KIND_COMPLEX64 = 15, KIND_COMPLEX128 = 16, KIND_ARRAY = 17, KIND_CHAN = 18, KIND_FUNC = 19, KIND_INTERFACE = 20, KIND_MAP = 21, KIND_PTR = 22, KIND_SLICE = 23, KIND_STRING = 24, KIND_STRUCT = 25, KIND_UNSAFEPOINTER = 26, KIND_LLDB_VOID, // Extension for LLDB, not used by go runtime. KIND_MASK = (1 << 5) - 1, KIND_DIRECT_IFACE = 1 << 5 }; GoType(int kind, const ConstString &name) : m_kind(kind & KIND_MASK), m_name(name) { if (m_kind == KIND_FUNC) m_kind = KIND_FUNC; } virtual ~GoType() {} int GetGoKind() const { return m_kind; } const ConstString &GetName() const { return m_name; } virtual CompilerType GetElementType() const { return CompilerType(); } bool IsTypedef() const { switch (m_kind) { case KIND_CHAN: case KIND_MAP: case KIND_INTERFACE: return true; default: return false; } } GoArray *GetArray(); GoFunction *GetFunction(); GoStruct *GetStruct(); private: int m_kind; ConstString m_name; GoType(const GoType &) = delete; const GoType &operator=(const GoType &) = delete; }; class GoElem : public GoType { public: GoElem(int kind, const ConstString &name, const CompilerType &elem) : GoType(kind, name), m_elem(elem) {} virtual CompilerType GetElementType() const { return m_elem; } private: // TODO: should we store this differently? CompilerType m_elem; GoElem(const GoElem &) = delete; const GoElem &operator=(const GoElem &) = delete; }; class GoArray : public GoElem { public: GoArray(const ConstString &name, uint64_t length, const CompilerType &elem) : GoElem(KIND_ARRAY, name, elem), m_length(length) {} uint64_t GetLength() const { return m_length; } private: uint64_t m_length; GoArray(const GoArray &) = delete; const GoArray &operator=(const GoArray &) = delete; }; class GoFunction : public GoType { public: GoFunction(const ConstString &name, bool is_variadic) : GoType(KIND_FUNC, name), m_is_variadic(is_variadic) {} bool IsVariadic() const { return m_is_variadic; } private: bool m_is_variadic; GoFunction(const GoFunction &) = delete; const GoFunction &operator=(const GoFunction &) = delete; }; class GoStruct : public GoType { public: struct Field { Field(const ConstString &name, const CompilerType &type, uint64_t offset) : m_name(name), m_type(type), m_byte_offset(offset) {} ConstString m_name; CompilerType m_type; uint64_t m_byte_offset; }; GoStruct(int kind, const ConstString &name, int64_t byte_size) : GoType(kind == 0 ? KIND_STRUCT : kind, name), m_is_complete(false), m_byte_size(byte_size) {} uint32_t GetNumFields() const { return m_fields.size(); } const Field *GetField(uint32_t i) const { if (i < m_fields.size()) return &m_fields[i]; return nullptr; } void AddField(const ConstString &name, const CompilerType &type, uint64_t offset) { m_fields.push_back(Field(name, type, offset)); } bool IsComplete() const { return m_is_complete; } void SetComplete() { m_is_complete = true; } int64_t GetByteSize() const { return m_byte_size; } private: bool m_is_complete; int64_t m_byte_size; std::vector m_fields; GoStruct(const GoStruct &) = delete; const GoStruct &operator=(const GoStruct &) = delete; }; GoArray *GoType::GetArray() { if (m_kind == KIND_ARRAY) { return static_cast(this); } return nullptr; } GoFunction *GoType::GetFunction() { if (m_kind == KIND_FUNC) { return static_cast(this); } return nullptr; } GoStruct *GoType::GetStruct() { switch (m_kind) { case KIND_STRING: case KIND_STRUCT: case KIND_SLICE: return static_cast(this); } return nullptr; } } // namespace lldb_private using namespace lldb_private; GoASTContext::GoASTContext() : TypeSystem(eKindGo), m_pointer_byte_size(0), m_int_byte_size(0), m_types(new TypeMap) {} GoASTContext::~GoASTContext() {} //------------------------------------------------------------------ // PluginInterface functions //------------------------------------------------------------------ ConstString GoASTContext::GetPluginNameStatic() { return ConstString("go"); } ConstString GoASTContext::GetPluginName() { return GoASTContext::GetPluginNameStatic(); } uint32_t GoASTContext::GetPluginVersion() { return 1; } lldb::TypeSystemSP GoASTContext::CreateInstance(lldb::LanguageType language, Module *module, Target *target) { if (language == eLanguageTypeGo) { ArchSpec arch; std::shared_ptr go_ast_sp; if (module) { arch = module->GetArchitecture(); go_ast_sp = std::shared_ptr(new GoASTContext); } else if (target) { arch = target->GetArchitecture(); go_ast_sp = std::shared_ptr( new GoASTContextForExpr(target->shared_from_this())); } if (arch.IsValid()) { go_ast_sp->SetAddressByteSize(arch.GetAddressByteSize()); return go_ast_sp; } } return lldb::TypeSystemSP(); } void GoASTContext::EnumerateSupportedLanguages( std::set &languages_for_types, std::set &languages_for_expressions) { static std::vector s_supported_languages_for_types( {lldb::eLanguageTypeGo}); static std::vector s_supported_languages_for_expressions( {}); 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()); } void GoASTContext::Initialize() { PluginManager::RegisterPlugin(GetPluginNameStatic(), "AST context plug-in", CreateInstance, EnumerateSupportedLanguages); } void GoASTContext::Terminate() { PluginManager::UnregisterPlugin(CreateInstance); } //---------------------------------------------------------------------- // Tests //---------------------------------------------------------------------- bool GoASTContext::IsArrayType(lldb::opaque_compiler_type_t type, CompilerType *element_type, uint64_t *size, bool *is_incomplete) { if (element_type) element_type->Clear(); if (size) *size = 0; if (is_incomplete) *is_incomplete = false; GoArray *array = static_cast(type)->GetArray(); if (array) { if (size) *size = array->GetLength(); if (element_type) *element_type = array->GetElementType(); return true; } return false; } bool GoASTContext::IsVectorType(lldb::opaque_compiler_type_t type, CompilerType *element_type, uint64_t *size) { if (element_type) element_type->Clear(); if (size) *size = 0; return false; } bool GoASTContext::IsAggregateType(lldb::opaque_compiler_type_t type) { int kind = static_cast(type)->GetGoKind(); if (kind < GoType::KIND_ARRAY) return false; if (kind == GoType::KIND_PTR) return false; if (kind == GoType::KIND_CHAN) return false; if (kind == GoType::KIND_MAP) return false; if (kind == GoType::KIND_STRING) return false; if (kind == GoType::KIND_UNSAFEPOINTER) return false; return true; } bool GoASTContext::IsBeingDefined(lldb::opaque_compiler_type_t type) { return false; } bool GoASTContext::IsCharType(lldb::opaque_compiler_type_t type) { // Go's DWARF doesn't distinguish between rune and int32. return false; } bool GoASTContext::IsCompleteType(lldb::opaque_compiler_type_t type) { if (!type) return false; GoType *t = static_cast(type); if (GoStruct *s = t->GetStruct()) return s->IsComplete(); if (t->IsTypedef() || t->GetGoKind() == GoType::KIND_PTR) return t->GetElementType().IsCompleteType(); return true; } bool GoASTContext::IsConst(lldb::opaque_compiler_type_t type) { return false; } bool GoASTContext::IsCStringType(lldb::opaque_compiler_type_t type, uint32_t &length) { return false; } bool GoASTContext::IsDefined(lldb::opaque_compiler_type_t type) { return type != nullptr; } bool GoASTContext::IsFloatingPointType(lldb::opaque_compiler_type_t type, uint32_t &count, bool &is_complex) { int kind = static_cast(type)->GetGoKind(); if (kind >= GoType::KIND_FLOAT32 && kind <= GoType::KIND_COMPLEX128) { if (kind >= GoType::KIND_COMPLEX64) { is_complex = true; count = 2; } else { is_complex = false; count = 1; } return true; } count = 0; is_complex = false; return false; } bool GoASTContext::IsFunctionType(lldb::opaque_compiler_type_t type, bool *is_variadic_ptr) { GoFunction *func = static_cast(type)->GetFunction(); if (func) { if (is_variadic_ptr) *is_variadic_ptr = func->IsVariadic(); return true; } if (is_variadic_ptr) *is_variadic_ptr = false; return false; } uint32_t GoASTContext::IsHomogeneousAggregate(lldb::opaque_compiler_type_t type, CompilerType *base_type_ptr) { return false; } size_t GoASTContext::GetNumberOfFunctionArguments(lldb::opaque_compiler_type_t type) { return 0; } CompilerType GoASTContext::GetFunctionArgumentAtIndex(lldb::opaque_compiler_type_t type, const size_t index) { return CompilerType(); } bool GoASTContext::IsFunctionPointerType(lldb::opaque_compiler_type_t type) { return IsFunctionType(type); } bool GoASTContext::IsBlockPointerType(lldb::opaque_compiler_type_t type, CompilerType *function_pointer_type_ptr) { return false; } bool GoASTContext::IsIntegerType(lldb::opaque_compiler_type_t type, bool &is_signed) { is_signed = false; // TODO: Is bool an integer? if (type) { int kind = static_cast(type)->GetGoKind(); if (kind <= GoType::KIND_UINTPTR) { is_signed = (kind != GoType::KIND_BOOL) & (kind <= GoType::KIND_INT64); return true; } } return false; } bool GoASTContext::IsPolymorphicClass(lldb::opaque_compiler_type_t type) { return false; } bool GoASTContext::IsPossibleDynamicType( lldb::opaque_compiler_type_t type, CompilerType *target_type, // Can pass NULL bool check_cplusplus, bool check_objc) { if (target_type) target_type->Clear(); if (type) return static_cast(type)->GetGoKind() == GoType::KIND_INTERFACE; return false; } bool GoASTContext::IsRuntimeGeneratedType(lldb::opaque_compiler_type_t type) { return false; } bool GoASTContext::IsPointerType(lldb::opaque_compiler_type_t type, CompilerType *pointee_type) { if (!type) return false; GoType *t = static_cast(type); if (pointee_type) { *pointee_type = t->GetElementType(); } switch (t->GetGoKind()) { case GoType::KIND_PTR: case GoType::KIND_UNSAFEPOINTER: case GoType::KIND_CHAN: case GoType::KIND_MAP: // TODO: is function a pointer? return true; default: return false; } } bool GoASTContext::IsPointerOrReferenceType(lldb::opaque_compiler_type_t type, CompilerType *pointee_type) { return IsPointerType(type, pointee_type); } bool GoASTContext::IsReferenceType(lldb::opaque_compiler_type_t type, CompilerType *pointee_type, bool *is_rvalue) { return false; } bool GoASTContext::IsScalarType(lldb::opaque_compiler_type_t type) { return !IsAggregateType(type); } bool GoASTContext::IsTypedefType(lldb::opaque_compiler_type_t type) { if (type) return static_cast(type)->IsTypedef(); return false; } bool GoASTContext::IsVoidType(lldb::opaque_compiler_type_t type) { if (!type) return false; return static_cast(type)->GetGoKind() == GoType::KIND_LLDB_VOID; } bool GoASTContext::SupportsLanguage(lldb::LanguageType language) { return language == eLanguageTypeGo; } //---------------------------------------------------------------------- // Type Completion //---------------------------------------------------------------------- bool GoASTContext::GetCompleteType(lldb::opaque_compiler_type_t type) { if (!type) return false; GoType *t = static_cast(type); if (t->IsTypedef() || t->GetGoKind() == GoType::KIND_PTR || t->GetArray()) return t->GetElementType().GetCompleteType(); if (GoStruct *s = t->GetStruct()) { if (s->IsComplete()) return true; CompilerType compiler_type(this, s); SymbolFile *symbols = GetSymbolFile(); return symbols && symbols->CompleteType(compiler_type); } return true; } //---------------------------------------------------------------------- // AST related queries //---------------------------------------------------------------------- uint32_t GoASTContext::GetPointerByteSize() { return m_pointer_byte_size; } //---------------------------------------------------------------------- // Accessors //---------------------------------------------------------------------- ConstString GoASTContext::GetTypeName(lldb::opaque_compiler_type_t type) { if (type) return static_cast(type)->GetName(); return ConstString(); } uint32_t GoASTContext::GetTypeInfo(lldb::opaque_compiler_type_t type, CompilerType *pointee_or_element_compiler_type) { if (pointee_or_element_compiler_type) pointee_or_element_compiler_type->Clear(); if (!type) return 0; GoType *t = static_cast(type); if (pointee_or_element_compiler_type) *pointee_or_element_compiler_type = t->GetElementType(); int kind = t->GetGoKind(); if (kind == GoType::KIND_ARRAY) return eTypeHasChildren | eTypeIsArray; if (kind < GoType::KIND_ARRAY) { uint32_t builtin_type_flags = eTypeIsBuiltIn | eTypeHasValue; if (kind < GoType::KIND_FLOAT32) { builtin_type_flags |= eTypeIsInteger | eTypeIsScalar; if (kind >= GoType::KIND_INT && kind <= GoType::KIND_INT64) builtin_type_flags |= eTypeIsSigned; } else { builtin_type_flags |= eTypeIsFloat; if (kind < GoType::KIND_COMPLEX64) builtin_type_flags |= eTypeIsComplex; else builtin_type_flags |= eTypeIsScalar; } return builtin_type_flags; } if (kind == GoType::KIND_STRING) return eTypeHasValue | eTypeIsBuiltIn; if (kind == GoType::KIND_FUNC) return eTypeIsFuncPrototype | eTypeHasValue; if (IsPointerType(type)) return eTypeIsPointer | eTypeHasValue | eTypeHasChildren; if (kind == GoType::KIND_LLDB_VOID) return 0; return eTypeHasChildren | eTypeIsStructUnion; } lldb::TypeClass GoASTContext::GetTypeClass(lldb::opaque_compiler_type_t type) { if (!type) return eTypeClassInvalid; int kind = static_cast(type)->GetGoKind(); if (kind == GoType::KIND_FUNC) return eTypeClassFunction; if (IsPointerType(type)) return eTypeClassPointer; if (kind < GoType::KIND_COMPLEX64) return eTypeClassBuiltin; if (kind <= GoType::KIND_COMPLEX128) return eTypeClassComplexFloat; if (kind == GoType::KIND_LLDB_VOID) return eTypeClassInvalid; return eTypeClassStruct; } lldb::BasicType GoASTContext::GetBasicTypeEnumeration(lldb::opaque_compiler_type_t type) { ConstString name = GetTypeName(type); if (name) { typedef UniqueCStringMap TypeNameToBasicTypeMap; static TypeNameToBasicTypeMap g_type_map; static llvm::once_flag g_once_flag; llvm::call_once(g_once_flag, []() { // "void" - g_type_map.Append(ConstString("void").GetStringRef(), eBasicTypeVoid); + g_type_map.Append(ConstString("void"), eBasicTypeVoid); // "int" - g_type_map.Append(ConstString("int").GetStringRef(), eBasicTypeInt); - g_type_map.Append(ConstString("uint").GetStringRef(), - eBasicTypeUnsignedInt); + g_type_map.Append(ConstString("int"), eBasicTypeInt); + g_type_map.Append(ConstString("uint"), eBasicTypeUnsignedInt); // Miscellaneous - g_type_map.Append(ConstString("bool").GetStringRef(), eBasicTypeBool); + g_type_map.Append(ConstString("bool"), eBasicTypeBool); // Others. Should these map to C types? - g_type_map.Append(ConstString("byte").GetStringRef(), eBasicTypeOther); - g_type_map.Append(ConstString("uint8").GetStringRef(), eBasicTypeOther); - g_type_map.Append(ConstString("uint16").GetStringRef(), eBasicTypeOther); - g_type_map.Append(ConstString("uint32").GetStringRef(), eBasicTypeOther); - g_type_map.Append(ConstString("uint64").GetStringRef(), eBasicTypeOther); - g_type_map.Append(ConstString("int8").GetStringRef(), eBasicTypeOther); - g_type_map.Append(ConstString("int16").GetStringRef(), eBasicTypeOther); - g_type_map.Append(ConstString("int32").GetStringRef(), eBasicTypeOther); - g_type_map.Append(ConstString("int64").GetStringRef(), eBasicTypeOther); - g_type_map.Append(ConstString("float32").GetStringRef(), eBasicTypeOther); - g_type_map.Append(ConstString("float64").GetStringRef(), eBasicTypeOther); - g_type_map.Append(ConstString("uintptr").GetStringRef(), eBasicTypeOther); + g_type_map.Append(ConstString("byte"), eBasicTypeOther); + g_type_map.Append(ConstString("uint8"), eBasicTypeOther); + g_type_map.Append(ConstString("uint16"), eBasicTypeOther); + g_type_map.Append(ConstString("uint32"), eBasicTypeOther); + g_type_map.Append(ConstString("uint64"), eBasicTypeOther); + g_type_map.Append(ConstString("int8"), eBasicTypeOther); + g_type_map.Append(ConstString("int16"), eBasicTypeOther); + g_type_map.Append(ConstString("int32"), eBasicTypeOther); + g_type_map.Append(ConstString("int64"), eBasicTypeOther); + g_type_map.Append(ConstString("float32"), eBasicTypeOther); + g_type_map.Append(ConstString("float64"), eBasicTypeOther); + g_type_map.Append(ConstString("uintptr"), eBasicTypeOther); g_type_map.Sort(); }); - return g_type_map.Find(name.GetStringRef(), eBasicTypeInvalid); + return g_type_map.Find(name, eBasicTypeInvalid); } return eBasicTypeInvalid; } lldb::LanguageType GoASTContext::GetMinimumLanguage(lldb::opaque_compiler_type_t type) { return lldb::eLanguageTypeGo; } unsigned GoASTContext::GetTypeQualifiers(lldb::opaque_compiler_type_t type) { return 0; } //---------------------------------------------------------------------- // Creating related types //---------------------------------------------------------------------- CompilerType GoASTContext::GetArrayElementType(lldb::opaque_compiler_type_t type, uint64_t *stride) { GoArray *array = static_cast(type)->GetArray(); if (array) { if (stride) { *stride = array->GetElementType().GetByteSize(nullptr); } return array->GetElementType(); } return CompilerType(); } CompilerType GoASTContext::GetCanonicalType(lldb::opaque_compiler_type_t type) { GoType *t = static_cast(type); if (t->IsTypedef()) return t->GetElementType(); return CompilerType(this, type); } CompilerType GoASTContext::GetFullyUnqualifiedType(lldb::opaque_compiler_type_t type) { return CompilerType(this, type); } // Returns -1 if this isn't a function of if the function doesn't have a // prototype // Returns a value >= 0 if there is a prototype. int GoASTContext::GetFunctionArgumentCount(lldb::opaque_compiler_type_t type) { return GetNumberOfFunctionArguments(type); } CompilerType GoASTContext::GetFunctionArgumentTypeAtIndex(lldb::opaque_compiler_type_t type, size_t idx) { return GetFunctionArgumentAtIndex(type, idx); } CompilerType GoASTContext::GetFunctionReturnType(lldb::opaque_compiler_type_t type) { CompilerType result; if (type) { GoType *t = static_cast(type); if (t->GetGoKind() == GoType::KIND_FUNC) result = t->GetElementType(); } return result; } size_t GoASTContext::GetNumMemberFunctions(lldb::opaque_compiler_type_t type) { return 0; } TypeMemberFunctionImpl GoASTContext::GetMemberFunctionAtIndex(lldb::opaque_compiler_type_t type, size_t idx) { return TypeMemberFunctionImpl(); } CompilerType GoASTContext::GetNonReferenceType(lldb::opaque_compiler_type_t type) { return CompilerType(this, type); } CompilerType GoASTContext::GetPointeeType(lldb::opaque_compiler_type_t type) { if (!type) return CompilerType(); return static_cast(type)->GetElementType(); } CompilerType GoASTContext::GetPointerType(lldb::opaque_compiler_type_t type) { if (!type) return CompilerType(); ConstString type_name = GetTypeName(type); ConstString pointer_name(std::string("*") + type_name.GetCString()); GoType *pointer = (*m_types)[pointer_name].get(); if (pointer == nullptr) { pointer = new GoElem(GoType::KIND_PTR, pointer_name, CompilerType(this, type)); (*m_types)[pointer_name].reset(pointer); } return CompilerType(this, pointer); } // If the current object represents a typedef type, get the underlying type CompilerType GoASTContext::GetTypedefedType(lldb::opaque_compiler_type_t type) { if (IsTypedefType(type)) return static_cast(type)->GetElementType(); return CompilerType(); } //---------------------------------------------------------------------- // Create related types using the current type's AST //---------------------------------------------------------------------- CompilerType GoASTContext::GetBasicTypeFromAST(lldb::BasicType basic_type) { return CompilerType(); } CompilerType GoASTContext::GetBuiltinTypeForEncodingAndBitSize(lldb::Encoding encoding, size_t bit_size) { return CompilerType(); } //---------------------------------------------------------------------- // Exploring the type //---------------------------------------------------------------------- uint64_t GoASTContext::GetBitSize(lldb::opaque_compiler_type_t type, ExecutionContextScope *exe_scope) { if (!type) return 0; if (!GetCompleteType(type)) return 0; GoType *t = static_cast(type); GoArray *array = nullptr; switch (t->GetGoKind()) { case GoType::KIND_BOOL: case GoType::KIND_INT8: case GoType::KIND_UINT8: return 8; case GoType::KIND_INT16: case GoType::KIND_UINT16: return 16; case GoType::KIND_INT32: case GoType::KIND_UINT32: case GoType::KIND_FLOAT32: return 32; case GoType::KIND_INT64: case GoType::KIND_UINT64: case GoType::KIND_FLOAT64: case GoType::KIND_COMPLEX64: return 64; case GoType::KIND_COMPLEX128: return 128; case GoType::KIND_INT: case GoType::KIND_UINT: return m_int_byte_size * 8; case GoType::KIND_UINTPTR: case GoType::KIND_FUNC: // I assume this is a pointer? case GoType::KIND_CHAN: case GoType::KIND_PTR: case GoType::KIND_UNSAFEPOINTER: case GoType::KIND_MAP: return m_pointer_byte_size * 8; case GoType::KIND_ARRAY: array = t->GetArray(); return array->GetLength() * array->GetElementType().GetBitSize(exe_scope); case GoType::KIND_INTERFACE: return t->GetElementType().GetBitSize(exe_scope); case GoType::KIND_SLICE: case GoType::KIND_STRING: case GoType::KIND_STRUCT: return t->GetStruct()->GetByteSize() * 8; default: assert(false); } return 0; } lldb::Encoding GoASTContext::GetEncoding(lldb::opaque_compiler_type_t type, uint64_t &count) { count = 1; bool is_signed; if (IsIntegerType(type, is_signed)) return is_signed ? lldb::eEncodingSint : eEncodingUint; bool is_complex; uint32_t complex_count; if (IsFloatingPointType(type, complex_count, is_complex)) { count = complex_count; return eEncodingIEEE754; } if (IsPointerType(type)) return eEncodingUint; return eEncodingInvalid; } lldb::Format GoASTContext::GetFormat(lldb::opaque_compiler_type_t type) { if (!type) return eFormatDefault; switch (static_cast(type)->GetGoKind()) { case GoType::KIND_BOOL: return eFormatBoolean; case GoType::KIND_INT: case GoType::KIND_INT8: case GoType::KIND_INT16: case GoType::KIND_INT32: case GoType::KIND_INT64: return eFormatDecimal; case GoType::KIND_UINT: case GoType::KIND_UINT8: case GoType::KIND_UINT16: case GoType::KIND_UINT32: case GoType::KIND_UINT64: return eFormatUnsigned; case GoType::KIND_FLOAT32: case GoType::KIND_FLOAT64: return eFormatFloat; case GoType::KIND_COMPLEX64: case GoType::KIND_COMPLEX128: return eFormatComplexFloat; case GoType::KIND_UINTPTR: case GoType::KIND_CHAN: case GoType::KIND_PTR: case GoType::KIND_MAP: case GoType::KIND_UNSAFEPOINTER: return eFormatHex; case GoType::KIND_STRING: return eFormatCString; case GoType::KIND_ARRAY: case GoType::KIND_INTERFACE: case GoType::KIND_SLICE: case GoType::KIND_STRUCT: default: // Don't know how to display this. return eFormatBytes; } } size_t GoASTContext::GetTypeBitAlign(lldb::opaque_compiler_type_t type) { return 0; } uint32_t GoASTContext::GetNumChildren(lldb::opaque_compiler_type_t type, bool omit_empty_base_classes) { if (!type || !GetCompleteType(type)) return 0; GoType *t = static_cast(type); if (t->GetGoKind() == GoType::KIND_PTR) { CompilerType elem = t->GetElementType(); if (elem.IsAggregateType()) return elem.GetNumChildren(omit_empty_base_classes); return 1; } else if (GoArray *array = t->GetArray()) { return array->GetLength(); } else if (t->IsTypedef()) { return t->GetElementType().GetNumChildren(omit_empty_base_classes); } return GetNumFields(type); } uint32_t GoASTContext::GetNumFields(lldb::opaque_compiler_type_t type) { if (!type || !GetCompleteType(type)) return 0; GoType *t = static_cast(type); if (t->IsTypedef()) return t->GetElementType().GetNumFields(); GoStruct *s = t->GetStruct(); if (s) return s->GetNumFields(); return 0; } CompilerType GoASTContext::GetFieldAtIndex(lldb::opaque_compiler_type_t type, size_t idx, std::string &name, uint64_t *bit_offset_ptr, uint32_t *bitfield_bit_size_ptr, bool *is_bitfield_ptr) { if (bit_offset_ptr) *bit_offset_ptr = 0; if (bitfield_bit_size_ptr) *bitfield_bit_size_ptr = 0; if (is_bitfield_ptr) *is_bitfield_ptr = false; if (!type || !GetCompleteType(type)) return CompilerType(); GoType *t = static_cast(type); if (t->IsTypedef()) return t->GetElementType().GetFieldAtIndex( idx, name, bit_offset_ptr, bitfield_bit_size_ptr, is_bitfield_ptr); GoStruct *s = t->GetStruct(); if (s) { const auto *field = s->GetField(idx); if (field) { name = field->m_name.GetStringRef(); if (bit_offset_ptr) *bit_offset_ptr = field->m_byte_offset * 8; return field->m_type; } } return CompilerType(); } CompilerType GoASTContext::GetChildCompilerTypeAtIndex( lldb::opaque_compiler_type_t type, ExecutionContext *exe_ctx, size_t idx, bool transparent_pointers, bool omit_empty_base_classes, bool ignore_array_bounds, std::string &child_name, uint32_t &child_byte_size, int32_t &child_byte_offset, uint32_t &child_bitfield_bit_size, uint32_t &child_bitfield_bit_offset, bool &child_is_base_class, bool &child_is_deref_of_parent, ValueObject *valobj, uint64_t &language_flags) { child_name.clear(); child_byte_size = 0; child_byte_offset = 0; child_bitfield_bit_size = 0; child_bitfield_bit_offset = 0; child_is_base_class = false; child_is_deref_of_parent = false; language_flags = 0; if (!type || !GetCompleteType(type)) return CompilerType(); GoType *t = static_cast(type); if (t->GetStruct()) { uint64_t bit_offset; CompilerType ret = GetFieldAtIndex(type, idx, child_name, &bit_offset, nullptr, nullptr); child_byte_size = ret.GetByteSize( exe_ctx ? exe_ctx->GetBestExecutionContextScope() : nullptr); child_byte_offset = bit_offset / 8; return ret; } else if (t->GetGoKind() == GoType::KIND_PTR) { CompilerType pointee = t->GetElementType(); if (!pointee.IsValid() || pointee.IsVoidType()) return CompilerType(); if (transparent_pointers && pointee.IsAggregateType()) { bool tmp_child_is_deref_of_parent = false; return pointee.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, tmp_child_is_deref_of_parent, valobj, language_flags); } else { child_is_deref_of_parent = true; const char *parent_name = valobj ? valobj->GetName().GetCString() : NULL; if (parent_name) { child_name.assign(1, '*'); child_name += parent_name; } // We have a pointer to an simple type if (idx == 0 && pointee.GetCompleteType()) { child_byte_size = pointee.GetByteSize( exe_ctx ? exe_ctx->GetBestExecutionContextScope() : NULL); child_byte_offset = 0; return pointee; } } } else if (GoArray *a = t->GetArray()) { if (ignore_array_bounds || idx < a->GetLength()) { CompilerType element_type = a->GetElementType(); if (element_type.GetCompleteType()) { char element_name[64]; ::snprintf(element_name, sizeof(element_name), "[%zu]", idx); child_name.assign(element_name); child_byte_size = element_type.GetByteSize( exe_ctx ? exe_ctx->GetBestExecutionContextScope() : NULL); child_byte_offset = (int32_t)idx * (int32_t)child_byte_size; return element_type; } } } else if (t->IsTypedef()) { return t->GetElementType().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); } return CompilerType(); } // Lookup a child given a name. This function will match base class names // and member member names in "clang_type" only, not descendants. uint32_t GoASTContext::GetIndexOfChildWithName(lldb::opaque_compiler_type_t type, const char *name, bool omit_empty_base_classes) { if (!type || !GetCompleteType(type)) return UINT_MAX; GoType *t = static_cast(type); GoStruct *s = t->GetStruct(); if (s) { for (uint32_t i = 0; i < s->GetNumFields(); ++i) { const GoStruct::Field *f = s->GetField(i); if (f->m_name.GetStringRef() == name) return i; } } else if (t->GetGoKind() == GoType::KIND_PTR || t->IsTypedef()) { return t->GetElementType().GetIndexOfChildWithName(name, omit_empty_base_classes); } return UINT_MAX; } // Lookup a child member given a name. This function will match member names // only and will descend into "clang_type" children in search for the first // member in this class, or any base class that matches "name". // TODO: Return all matches for a given name by returning a // vector> // so we catch all names that match a given child name, not just the first. size_t GoASTContext::GetIndexOfChildMemberWithName( lldb::opaque_compiler_type_t type, const char *name, bool omit_empty_base_classes, std::vector &child_indexes) { uint32_t index = GetIndexOfChildWithName(type, name, omit_empty_base_classes); if (index == UINT_MAX) return 0; child_indexes.push_back(index); return 1; } // Converts "s" to a floating point value and place resulting floating // point bytes in the "dst" buffer. size_t GoASTContext::ConvertStringToFloatValue(lldb::opaque_compiler_type_t type, const char *s, uint8_t *dst, size_t dst_size) { assert(false); return 0; } //---------------------------------------------------------------------- // Dumping types //---------------------------------------------------------------------- #define DEPTH_INCREMENT 2 void GoASTContext::DumpValue(lldb::opaque_compiler_type_t type, ExecutionContext *exe_ctx, Stream *s, lldb::Format format, const 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) { if (IsTypedefType(type)) type = GetTypedefedType(type).GetOpaqueQualType(); if (!type) return; GoType *t = static_cast(type); if (GoStruct *st = t->GetStruct()) { if (GetCompleteType(type)) { uint32_t field_idx = 0; for (auto *field = st->GetField(field_idx); field != nullptr; field_idx++) { // Print the starting squiggly bracket (if this is the // first member) or comma (for member 2 and beyond) for // the struct/union/class member. if (field_idx == 0) s->PutChar('{'); else s->PutChar(','); // Indent s->Printf("\n%*s", depth + DEPTH_INCREMENT, ""); // Print the member type if requested if (show_types) { ConstString field_type_name = field->m_type.GetTypeName(); s->Printf("(%s) ", field_type_name.AsCString()); } // Print the member name and equal sign s->Printf("%s = ", field->m_name.AsCString()); // Dump the value of the member CompilerType field_type = field->m_type; field_type.DumpValue( exe_ctx, s, // Stream to dump to field_type .GetFormat(), // The format with which to display the member data, // Data buffer containing all bytes for this type data_byte_offset + field->m_byte_offset, // Offset into "data" where // to grab value from field->m_type.GetByteSize( exe_ctx->GetBestExecutionContextScope()), // Size of this type // in bytes 0, // Bitfield bit size 0, // Bitfield bit offset show_types, // Boolean indicating if we should show the variable // types show_summary, // Boolean indicating if we should show a summary for // the current type verbose, // Verbose output? depth + DEPTH_INCREMENT); // Scope depth for any types that have // children } // Indent the trailing squiggly bracket if (field_idx > 0) s->Printf("\n%*s}", depth, ""); } } if (GoArray *a = t->GetArray()) { CompilerType element_clang_type = a->GetElementType(); lldb::Format element_format = element_clang_type.GetFormat(); uint32_t element_byte_size = element_clang_type.GetByteSize(exe_ctx->GetBestExecutionContextScope()); uint64_t element_idx; for (element_idx = 0; element_idx < a->GetLength(); ++element_idx) { // Print the starting squiggly bracket (if this is the // first member) or comman (for member 2 and beyong) for // the struct/union/class member. if (element_idx == 0) s->PutChar('{'); else s->PutChar(','); // Indent and print the index s->Printf("\n%*s[%" PRIu64 "] ", depth + DEPTH_INCREMENT, "", element_idx); // Figure out the field offset within the current struct/union/class type uint64_t element_offset = element_idx * element_byte_size; // Dump the value of the member element_clang_type.DumpValue( exe_ctx, s, // Stream to dump to element_format, // The format with which to display the element data, // Data buffer containing all bytes for this type data_byte_offset + element_offset, // Offset into "data" where to grab value from element_byte_size, // Size of this type in bytes 0, // Bitfield bit size 0, // Bitfield bit offset show_types, // Boolean indicating if we should show the variable types show_summary, // Boolean indicating if we should show a summary for // the current type verbose, // Verbose output? depth + DEPTH_INCREMENT); // Scope depth for any types that have children } // Indent the trailing squiggly bracket if (element_idx > 0) s->Printf("\n%*s}", depth, ""); } if (show_summary) DumpSummary(type, exe_ctx, s, data, data_byte_offset, data_byte_size); } bool GoASTContext::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, ExecutionContextScope *exe_scope) { if (!type) return false; if (IsAggregateType(type)) { return false; } else { GoType *t = static_cast(type); if (t->IsTypedef()) { CompilerType typedef_compiler_type = t->GetElementType(); if (format == eFormatDefault) format = typedef_compiler_type.GetFormat(); uint64_t typedef_byte_size = typedef_compiler_type.GetByteSize(exe_scope); return typedef_compiler_type.DumpTypeValue( s, format, // The format with which to display the element data, // Data buffer containing all bytes for this type byte_offset, // Offset into "data" where to grab value from typedef_byte_size, // Size of this type in bytes bitfield_bit_size, // Size in bits of a bitfield value, if zero don't // treat as a bitfield bitfield_bit_offset, // Offset in bits of a bitfield value if // bitfield_bit_size != 0 exe_scope); } uint32_t item_count = 1; // A few formats, we might need to modify our size and count for depending // on how we are trying to display the value... switch (format) { default: case eFormatBoolean: case eFormatBinary: case eFormatComplex: case eFormatCString: // NULL terminated C strings case eFormatDecimal: case eFormatEnum: case eFormatHex: case eFormatHexUppercase: case eFormatFloat: case eFormatOctal: case eFormatOSType: case eFormatUnsigned: case eFormatPointer: case eFormatVectorOfChar: case eFormatVectorOfSInt8: case eFormatVectorOfUInt8: case eFormatVectorOfSInt16: case eFormatVectorOfUInt16: case eFormatVectorOfSInt32: case eFormatVectorOfUInt32: case eFormatVectorOfSInt64: case eFormatVectorOfUInt64: case eFormatVectorOfFloat32: case eFormatVectorOfFloat64: case eFormatVectorOfUInt128: break; case eFormatChar: case eFormatCharPrintable: case eFormatCharArray: case eFormatBytes: case eFormatBytesWithASCII: item_count = byte_size; byte_size = 1; break; case eFormatUnicode16: item_count = byte_size / 2; byte_size = 2; break; case eFormatUnicode32: item_count = byte_size / 4; byte_size = 4; break; } return DumpDataExtractor(data, s, byte_offset, format, byte_size, item_count, UINT32_MAX, LLDB_INVALID_ADDRESS, bitfield_bit_size, bitfield_bit_offset, exe_scope); } return 0; } void GoASTContext::DumpSummary(lldb::opaque_compiler_type_t type, ExecutionContext *exe_ctx, Stream *s, const DataExtractor &data, lldb::offset_t data_offset, size_t data_byte_size) { if (type && GoType::KIND_STRING == static_cast(type)->GetGoKind()) { // TODO(ribrdb): read length and data } } void GoASTContext::DumpTypeDescription(lldb::opaque_compiler_type_t type) { // Dump to stdout StreamFile s(stdout, false); DumpTypeDescription(type, &s); } void GoASTContext::DumpTypeDescription(lldb::opaque_compiler_type_t type, Stream *s) { if (!type) return; ConstString name = GetTypeName(type); GoType *t = static_cast(type); if (GoStruct *st = t->GetStruct()) { if (GetCompleteType(type)) { if (NULL == strchr(name.AsCString(), '{')) s->Printf("type %s ", name.AsCString()); s->PutCString("struct {"); if (st->GetNumFields() == 0) { s->PutChar('}'); return; } s->IndentMore(); uint32_t field_idx = 0; for (auto *field = st->GetField(field_idx); field != nullptr; field_idx++) { s->PutChar('\n'); s->Indent(); s->Printf("%s %s", field->m_name.AsCString(), field->m_type.GetTypeName().AsCString()); } s->IndentLess(); s->PutChar('\n'); s->Indent("}"); return; } } s->PutCString(name.AsCString()); } CompilerType GoASTContext::CreateArrayType(const ConstString &name, const CompilerType &element_type, uint64_t length) { GoType *type = new GoArray(name, length, element_type); (*m_types)[name].reset(type); return CompilerType(this, type); } CompilerType GoASTContext::CreateBaseType(int go_kind, const lldb_private::ConstString &name, uint64_t byte_size) { if (go_kind == GoType::KIND_UINT || go_kind == GoType::KIND_INT) m_int_byte_size = byte_size; GoType *type = new GoType(go_kind, name); (*m_types)[name].reset(type); return CompilerType(this, type); } CompilerType GoASTContext::CreateTypedefType(int kind, const ConstString &name, CompilerType impl) { GoType *type = new GoElem(kind, name, impl); (*m_types)[name].reset(type); return CompilerType(this, type); } CompilerType GoASTContext::CreateVoidType(const lldb_private::ConstString &name) { GoType *type = new GoType(GoType::KIND_LLDB_VOID, name); (*m_types)[name].reset(type); return CompilerType(this, type); } CompilerType GoASTContext::CreateStructType(int kind, const lldb_private::ConstString &name, uint32_t byte_size) { GoType *type = new GoStruct(kind, name, byte_size); (*m_types)[name].reset(type); return CompilerType(this, type); } void GoASTContext::AddFieldToStruct( const lldb_private::CompilerType &struct_type, const lldb_private::ConstString &name, const lldb_private::CompilerType &field_type, uint32_t byte_offset) { if (!struct_type) return; GoASTContext *ast = llvm::dyn_cast_or_null(struct_type.GetTypeSystem()); if (!ast) return; GoType *type = static_cast(struct_type.GetOpaqueQualType()); if (GoStruct *s = type->GetStruct()) s->AddField(name, field_type, byte_offset); } void GoASTContext::CompleteStructType( const lldb_private::CompilerType &struct_type) { if (!struct_type) return; GoASTContext *ast = llvm::dyn_cast_or_null(struct_type.GetTypeSystem()); if (!ast) return; GoType *type = static_cast(struct_type.GetOpaqueQualType()); if (GoStruct *s = type->GetStruct()) s->SetComplete(); } CompilerType GoASTContext::CreateFunctionType(const lldb_private::ConstString &name, CompilerType *params, size_t params_count, bool is_variadic) { GoType *type = new GoFunction(name, is_variadic); (*m_types)[name].reset(type); return CompilerType(this, type); } bool GoASTContext::IsGoString(const lldb_private::CompilerType &type) { if (!type.IsValid() || !llvm::dyn_cast_or_null(type.GetTypeSystem())) return false; return GoType::KIND_STRING == static_cast(type.GetOpaqueQualType())->GetGoKind(); } bool GoASTContext::IsGoSlice(const lldb_private::CompilerType &type) { if (!type.IsValid() || !llvm::dyn_cast_or_null(type.GetTypeSystem())) return false; return GoType::KIND_SLICE == static_cast(type.GetOpaqueQualType())->GetGoKind(); } bool GoASTContext::IsGoInterface(const lldb_private::CompilerType &type) { if (!type.IsValid() || !llvm::dyn_cast_or_null(type.GetTypeSystem())) return false; return GoType::KIND_INTERFACE == static_cast(type.GetOpaqueQualType())->GetGoKind(); } bool GoASTContext::IsPointerKind(uint8_t kind) { return (kind & GoType::KIND_MASK) == GoType::KIND_PTR; } bool GoASTContext::IsDirectIface(uint8_t kind) { return (kind & GoType::KIND_DIRECT_IFACE) == GoType::KIND_DIRECT_IFACE; } DWARFASTParser *GoASTContext::GetDWARFParser() { if (!m_dwarf_ast_parser_ap) m_dwarf_ast_parser_ap.reset(new DWARFASTParserGo(*this)); return m_dwarf_ast_parser_ap.get(); } UserExpression *GoASTContextForExpr::GetUserExpression( llvm::StringRef expr, llvm::StringRef prefix, lldb::LanguageType language, Expression::ResultType desired_type, const EvaluateExpressionOptions &options) { TargetSP target = m_target_wp.lock(); if (target) return new GoUserExpression(*target, expr, prefix, language, desired_type, options); return nullptr; } Index: vendor/lldb/dist/source/Symbol/SymbolFile.cpp =================================================================== --- vendor/lldb/dist/source/Symbol/SymbolFile.cpp (revision 317691) +++ vendor/lldb/dist/source/Symbol/SymbolFile.cpp (revision 317692) @@ -1,152 +1,156 @@ //===-- SymbolFile.cpp ------------------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #include "lldb/Symbol/SymbolFile.h" #include "lldb/Core/Module.h" #include "lldb/Core/PluginManager.h" #include "lldb/Symbol/ObjectFile.h" #include "lldb/Symbol/TypeMap.h" #include "lldb/Symbol/TypeSystem.h" #include "lldb/Symbol/VariableList.h" #include "lldb/Utility/Log.h" #include "lldb/Utility/StreamString.h" #include "lldb/lldb-private.h" using namespace lldb_private; +void SymbolFile::PreloadSymbols() { + // No-op for most implementations. +} + SymbolFile *SymbolFile::FindPlugin(ObjectFile *obj_file) { std::unique_ptr best_symfile_ap; if (obj_file != 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()); if (module_sp) { // Default to the main module section list. ObjectFile *module_obj_file = module_sp->GetObjectFile(); if (module_obj_file != obj_file) { // Make sure the main object file's sections are created module_obj_file->GetSectionList(); obj_file->CreateSections(*module_sp->GetUnifiedSectionList()); } } // TODO: Load any plug-ins in the appropriate plug-in search paths and // iterate over all of them to find the best one for the job. uint32_t best_symfile_abilities = 0; SymbolFileCreateInstance create_callback; for (uint32_t idx = 0; (create_callback = PluginManager::GetSymbolFileCreateCallbackAtIndex( idx)) != nullptr; ++idx) { std::unique_ptr curr_symfile_ap(create_callback(obj_file)); if (curr_symfile_ap.get()) { const uint32_t sym_file_abilities = curr_symfile_ap->GetAbilities(); if (sym_file_abilities > best_symfile_abilities) { best_symfile_abilities = sym_file_abilities; best_symfile_ap.reset(curr_symfile_ap.release()); // If any symbol file parser has all of the abilities, then // we should just stop looking. if ((kAllAbilities & sym_file_abilities) == kAllAbilities) break; } } } if (best_symfile_ap.get()) { // Let the winning symbol file parser initialize itself more // completely now that it has been chosen best_symfile_ap->InitializeObject(); } } return best_symfile_ap.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; } uint32_t SymbolFile::ResolveSymbolContext(const FileSpec &file_spec, uint32_t line, bool check_inlines, uint32_t resolve_scope, SymbolContextList &sc_list) { return 0; } uint32_t SymbolFile::FindGlobalVariables( const ConstString &name, const CompilerDeclContext *parent_decl_ctx, bool append, uint32_t max_matches, VariableList &variables) { if (!append) variables.Clear(); return 0; } uint32_t SymbolFile::FindGlobalVariables(const RegularExpression ®ex, bool append, uint32_t max_matches, VariableList &variables) { if (!append) variables.Clear(); return 0; } uint32_t SymbolFile::FindFunctions(const ConstString &name, const CompilerDeclContext *parent_decl_ctx, uint32_t name_type_mask, bool include_inlines, bool append, SymbolContextList &sc_list) { if (!append) sc_list.Clear(); return 0; } uint32_t SymbolFile::FindFunctions(const RegularExpression ®ex, bool include_inlines, bool append, SymbolContextList &sc_list) { if (!append) sc_list.Clear(); return 0; } void SymbolFile::GetMangledNamesForFunction( const std::string &scope_qualified_name, std::vector &mangled_names) { return; } uint32_t SymbolFile::FindTypes( const SymbolContext &sc, const ConstString &name, const CompilerDeclContext *parent_decl_ctx, bool append, uint32_t max_matches, llvm::DenseSet &searched_symbol_files, TypeMap &types) { if (!append) types.Clear(); return 0; } size_t SymbolFile::FindTypes(const std::vector &context, bool append, TypeMap &types) { if (!append) types.Clear(); return 0; } Index: vendor/lldb/dist/source/Symbol/Symtab.cpp =================================================================== --- vendor/lldb/dist/source/Symbol/Symtab.cpp (revision 317691) +++ vendor/lldb/dist/source/Symbol/Symtab.cpp (revision 317692) @@ -1,1169 +1,1169 @@ //===-- Symtab.cpp ----------------------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #include #include #include "Plugins/Language/CPlusPlus/CPlusPlusLanguage.h" #include "Plugins/Language/ObjC/ObjCLanguage.h" #include "lldb/Core/Module.h" #include "lldb/Core/Section.h" #include "lldb/Core/STLUtils.h" #include "lldb/Core/Timer.h" #include "lldb/Symbol/ObjectFile.h" #include "lldb/Symbol/Symbol.h" #include "lldb/Symbol/SymbolContext.h" #include "lldb/Symbol/Symtab.h" #include "lldb/Utility/RegularExpression.h" #include "lldb/Utility/Stream.h" using namespace lldb; using namespace lldb_private; Symtab::Symtab(ObjectFile *objfile) : m_objfile(objfile), m_symbols(), m_file_addr_to_index(), m_name_to_index(), m_mutex(), m_file_addr_to_index_computed(false), m_name_indexes_computed(false) {} Symtab::~Symtab() {} void Symtab::Reserve(size_t count) { // Clients should grab the mutex from this symbol table and lock it manually // when calling this function to avoid performance issues. m_symbols.reserve(count); } Symbol *Symtab::Resize(size_t count) { // Clients should grab the mutex from this symbol table and lock it manually // when calling this function to avoid performance issues. m_symbols.resize(count); return m_symbols.empty() ? nullptr : &m_symbols[0]; } uint32_t Symtab::AddSymbol(const Symbol &symbol) { // Clients should grab the mutex from this symbol table and lock it manually // when calling this function to avoid performance issues. uint32_t symbol_idx = m_symbols.size(); m_name_to_index.Clear(); m_file_addr_to_index.Clear(); m_symbols.push_back(symbol); m_file_addr_to_index_computed = false; m_name_indexes_computed = false; return symbol_idx; } size_t Symtab::GetNumSymbols() const { std::lock_guard guard(m_mutex); return m_symbols.size(); } void Symtab::SectionFileAddressesChanged() { m_name_to_index.Clear(); m_file_addr_to_index_computed = false; } void Symtab::Dump(Stream *s, Target *target, SortOrder sort_order) { std::lock_guard guard(m_mutex); // s->Printf("%.*p: ", (int)sizeof(void*) * 2, this); s->Indent(); const FileSpec &file_spec = m_objfile->GetFileSpec(); const char *object_name = nullptr; if (m_objfile->GetModule()) object_name = m_objfile->GetModule()->GetObjectName().GetCString(); if (file_spec) s->Printf("Symtab, file = %s%s%s%s, num_symbols = %" PRIu64, file_spec.GetPath().c_str(), object_name ? "(" : "", object_name ? object_name : "", object_name ? ")" : "", (uint64_t)m_symbols.size()); else s->Printf("Symtab, num_symbols = %" PRIu64 "", (uint64_t)m_symbols.size()); if (!m_symbols.empty()) { switch (sort_order) { case eSortOrderNone: { s->PutCString(":\n"); DumpSymbolHeader(s); const_iterator begin = m_symbols.begin(); 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)); } } break; case eSortOrderByName: { // Although we maintain a lookup by exact name map, the table // isn't sorted by name. So we must make the ordered symbol list // up ourselves. s->PutCString(" (sorted by name):\n"); DumpSymbolHeader(s); typedef std::multimap CStringToSymbol; CStringToSymbol name_map; for (const_iterator pos = m_symbols.begin(), end = m_symbols.end(); pos != end; ++pos) { const char *name = pos->GetName().AsCString(); if (name && name[0]) name_map.insert(std::make_pair(name, &(*pos))); } for (CStringToSymbol::const_iterator pos = name_map.begin(), end = name_map.end(); pos != end; ++pos) { s->Indent(); pos->second->Dump(s, target, pos->second - &m_symbols[0]); } } break; case eSortOrderByAddress: s->PutCString(" (sorted by address):\n"); DumpSymbolHeader(s); if (!m_file_addr_to_index_computed) InitAddressIndexes(); const size_t num_entries = m_file_addr_to_index.GetSize(); 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); } break; } } } void Symtab::Dump(Stream *s, Target *target, std::vector &indexes) const { std::lock_guard guard(m_mutex); const size_t num_symbols = GetNumSymbols(); // s->Printf("%.*p: ", (int)sizeof(void*) * 2, this); s->Indent(); s->Printf("Symtab %" PRIu64 " symbol indexes (%" PRIu64 " symbols total):\n", (uint64_t)indexes.size(), (uint64_t)m_symbols.size()); s->IndentMore(); if (!indexes.empty()) { std::vector::const_iterator pos; std::vector::const_iterator end = indexes.end(); DumpSymbolHeader(s); for (pos = indexes.begin(); pos != end; ++pos) { size_t idx = *pos; if (idx < num_symbols) { s->Indent(); m_symbols[idx].Dump(s, target, idx); } } } s->IndentLess(); } void Symtab::DumpSymbolHeader(Stream *s) { s->Indent(" Debug symbol\n"); s->Indent(" |Synthetic symbol\n"); s->Indent(" ||Externally Visible\n"); s->Indent(" |||\n"); s->Indent("Index UserID DSX Type File Address/Value Load " "Address Size Flags Name\n"); s->Indent("------- ------ --- --------------- ------------------ " "------------------ ------------------ ---------- " "----------------------------------\n"); } static int CompareSymbolID(const void *key, const void *p) { const user_id_t match_uid = *(const user_id_t *)key; const user_id_t symbol_uid = ((const Symbol *)p)->GetID(); if (match_uid < symbol_uid) return -1; if (match_uid > symbol_uid) return 1; return 0; } Symbol *Symtab::FindSymbolByID(lldb::user_id_t symbol_uid) const { std::lock_guard guard(m_mutex); Symbol *symbol = (Symbol *)::bsearch(&symbol_uid, &m_symbols[0], m_symbols.size(), sizeof(m_symbols[0]), CompareSymbolID); return symbol; } Symbol *Symtab::SymbolAtIndex(size_t idx) { // Clients should grab the mutex from this symbol table and lock it manually // when calling this function to avoid performance issues. if (idx < m_symbols.size()) return &m_symbols[idx]; return nullptr; } const Symbol *Symtab::SymbolAtIndex(size_t idx) const { // Clients should grab the mutex from this symbol table and lock it manually // when calling this function to avoid performance issues. if (idx < m_symbols.size()) return &m_symbols[idx]; return nullptr; } //---------------------------------------------------------------------- // InitNameIndexes //---------------------------------------------------------------------- void Symtab::InitNameIndexes() { // Protected function, no need to lock mutex... if (!m_name_indexes_computed) { m_name_indexes_computed = true; Timer scoped_timer(LLVM_PRETTY_FUNCTION, "%s", LLVM_PRETTY_FUNCTION); // Create the name index vector to be able to quickly search by name const size_t num_symbols = m_symbols.size(); #if 1 m_name_to_index.Reserve(num_symbols); #else // TODO: benchmark this to see if we save any memory. Otherwise we // will always keep the memory reserved in the vector unless we pull // some STL swap magic and then recopy... uint32_t actual_count = 0; for (const_iterator pos = m_symbols.begin(), end = m_symbols.end(); pos != end; ++pos) { const Mangled &mangled = pos->GetMangled(); if (mangled.GetMangledName()) ++actual_count; if (mangled.GetDemangledName()) ++actual_count; } m_name_to_index.Reserve(actual_count); #endif NameToIndexMap::Entry entry; // The "const char *" in "class_contexts" must come from a // ConstString::GetCString() std::set class_contexts; UniqueCStringMap mangled_name_to_index; std::vector symbol_contexts(num_symbols, nullptr); for (entry.value = 0; entry.value < num_symbols; ++entry.value) { const Symbol *symbol = &m_symbols[entry.value]; // Don't let trampolines get into the lookup by name map // If we ever need the trampoline symbols to be searchable by name // we can remove this and then possibly add a new bool to any of the // Symtab functions that lookup symbols by name to indicate if they // want trampolines. if (symbol->IsTrampoline()) continue; const Mangled &mangled = symbol->GetMangled(); - entry.cstring = mangled.GetMangledName().GetStringRef(); - if (!entry.cstring.empty()) { + entry.cstring = mangled.GetMangledName(); + if (entry.cstring) { m_name_to_index.Append(entry); if (symbol->ContainsLinkerAnnotations()) { // If the symbol has linker annotations, also add the version without // the annotations. entry.cstring = ConstString(m_objfile->StripLinkerSymbolAnnotations( - entry.cstring)) - .GetStringRef(); + entry.cstring.GetStringRef())); m_name_to_index.Append(entry); } const SymbolType symbol_type = symbol->GetType(); if (symbol_type == eSymbolTypeCode || symbol_type == eSymbolTypeResolver) { - if (entry.cstring[0] == '_' && entry.cstring[1] == 'Z' && - (entry.cstring[2] != 'T' && // avoid virtual table, VTT structure, - // typeinfo structure, and typeinfo - // name - entry.cstring[2] != 'G' && // avoid guard variables - entry.cstring[2] != 'Z')) // named local entities (if we + llvm::StringRef entry_ref(entry.cstring.GetStringRef()); + if (entry_ref[0] == '_' && entry_ref[1] == 'Z' && + (entry_ref[2] != 'T' && // avoid virtual table, VTT structure, + // typeinfo structure, and typeinfo + // name + entry_ref[2] != 'G' && // avoid guard variables + entry_ref[2] != 'Z')) // named local entities (if we // eventually handle eSymbolTypeData, // we will want this back) { CPlusPlusLanguage::MethodName cxx_method( mangled.GetDemangledName(lldb::eLanguageTypeC_plus_plus)); - entry.cstring = - ConstString(cxx_method.GetBasename()).GetStringRef(); - if (!entry.cstring.empty()) { + entry.cstring = ConstString(cxx_method.GetBasename()); + if (entry.cstring) { // ConstString objects permanently store the string in the pool so // calling // GetCString() on the value gets us a const char * that will // never go away const char *const_context = ConstString(cxx_method.GetContext()).GetCString(); - if (entry.cstring[0] == '~' || + entry_ref = entry.cstring.GetStringRef(); + if (entry_ref[0] == '~' || !cxx_method.GetQualifiers().empty()) { // The first character of the demangled basename is '~' which // means we have a class destructor. We can use this information // to help us know what is a class and what isn't. if (class_contexts.find(const_context) == class_contexts.end()) class_contexts.insert(const_context); m_method_to_index.Append(entry); } else { if (const_context && const_context[0]) { if (class_contexts.find(const_context) != class_contexts.end()) { // The current decl context is in our "class_contexts" which // means // this is a method on a class m_method_to_index.Append(entry); } else { // We don't know if this is a function basename or a method, // so put it into a temporary collection so once we are done // we can look in class_contexts to see if each entry is a // class // or just a function and will put any remaining items into // m_method_to_index or m_basename_to_index as needed mangled_name_to_index.Append(entry); symbol_contexts[entry.value] = const_context; } } else { // No context for this function so this has to be a basename m_basename_to_index.Append(entry); // If there is no context (no namespaces or class scopes that // come before the function name) then this also could be a // fullname. if (cxx_method.GetContext().empty()) m_name_to_index.Append(entry); } } } } } } - entry.cstring = - mangled.GetDemangledName(symbol->GetLanguage()).GetStringRef(); - if (!entry.cstring.empty()) { + entry.cstring = mangled.GetDemangledName(symbol->GetLanguage()); + if (entry.cstring) { m_name_to_index.Append(entry); if (symbol->ContainsLinkerAnnotations()) { // If the symbol has linker annotations, also add the version without // the annotations. entry.cstring = ConstString(m_objfile->StripLinkerSymbolAnnotations( - entry.cstring)) - .GetStringRef(); + entry.cstring.GetStringRef())); m_name_to_index.Append(entry); } } // If the demangled name turns out to be an ObjC name, and // is a category name, add the version without categories to the index // too. - ObjCLanguage::MethodName objc_method(entry.cstring, true); + ObjCLanguage::MethodName objc_method(entry.cstring.GetStringRef(), true); if (objc_method.IsValid(true)) { - entry.cstring = objc_method.GetSelector().GetStringRef(); + entry.cstring = objc_method.GetSelector(); m_selector_to_index.Append(entry); ConstString objc_method_no_category( objc_method.GetFullNameWithoutCategory(true)); if (objc_method_no_category) { - entry.cstring = objc_method_no_category.GetStringRef(); + entry.cstring = objc_method_no_category; m_name_to_index.Append(entry); } } } size_t count; if (!mangled_name_to_index.IsEmpty()) { count = mangled_name_to_index.GetSize(); for (size_t i = 0; i < count; ++i) { if (mangled_name_to_index.GetValueAtIndex(i, entry.value)) { entry.cstring = mangled_name_to_index.GetCStringAtIndex(i); if (symbol_contexts[entry.value] && class_contexts.find(symbol_contexts[entry.value]) != class_contexts.end()) { m_method_to_index.Append(entry); } else { // If we got here, we have something that had a context (was inside // a namespace or class) // yet we don't know if the entry m_method_to_index.Append(entry); m_basename_to_index.Append(entry); } } } } m_name_to_index.Sort(); m_name_to_index.SizeToFit(); m_selector_to_index.Sort(); m_selector_to_index.SizeToFit(); m_basename_to_index.Sort(); m_basename_to_index.SizeToFit(); m_method_to_index.Sort(); m_method_to_index.SizeToFit(); // static StreamFile a ("/tmp/a.txt"); // // count = m_basename_to_index.GetSize(); // if (count) // { // for (size_t i=0; i guard(m_mutex); + InitNameIndexes(); +} + void Symtab::AppendSymbolNamesToMap(const IndexCollection &indexes, bool add_demangled, bool add_mangled, NameToIndexMap &name_to_index_map) const { if (add_demangled || add_mangled) { Timer scoped_timer(LLVM_PRETTY_FUNCTION, "%s", LLVM_PRETTY_FUNCTION); std::lock_guard guard(m_mutex); // Create the name index vector to be able to quickly search by name NameToIndexMap::Entry entry; const size_t num_indexes = indexes.size(); for (size_t i = 0; i < num_indexes; ++i) { entry.value = indexes[i]; assert(i < m_symbols.size()); const Symbol *symbol = &m_symbols[entry.value]; const Mangled &mangled = symbol->GetMangled(); if (add_demangled) { - entry.cstring = - mangled.GetDemangledName(symbol->GetLanguage()).GetStringRef(); - if (!entry.cstring.empty()) + entry.cstring = mangled.GetDemangledName(symbol->GetLanguage()); + if (entry.cstring) name_to_index_map.Append(entry); } if (add_mangled) { - entry.cstring = mangled.GetMangledName().GetStringRef(); - if (!entry.cstring.empty()) + entry.cstring = mangled.GetMangledName(); + if (entry.cstring) name_to_index_map.Append(entry); } } } } uint32_t Symtab::AppendSymbolIndexesWithType(SymbolType symbol_type, std::vector &indexes, uint32_t start_idx, uint32_t end_index) const { std::lock_guard guard(m_mutex); uint32_t prev_size = indexes.size(); const uint32_t count = std::min(m_symbols.size(), end_index); for (uint32_t i = start_idx; i < count; ++i) { if (symbol_type == eSymbolTypeAny || m_symbols[i].GetType() == symbol_type) indexes.push_back(i); } return indexes.size() - prev_size; } uint32_t Symtab::AppendSymbolIndexesWithTypeAndFlagsValue( SymbolType symbol_type, uint32_t flags_value, std::vector &indexes, uint32_t start_idx, uint32_t end_index) const { std::lock_guard guard(m_mutex); uint32_t prev_size = indexes.size(); const uint32_t count = std::min(m_symbols.size(), end_index); for (uint32_t i = start_idx; i < count; ++i) { if ((symbol_type == eSymbolTypeAny || m_symbols[i].GetType() == symbol_type) && m_symbols[i].GetFlags() == flags_value) indexes.push_back(i); } return indexes.size() - prev_size; } uint32_t Symtab::AppendSymbolIndexesWithType(SymbolType symbol_type, Debug symbol_debug_type, Visibility symbol_visibility, std::vector &indexes, uint32_t start_idx, uint32_t end_index) const { std::lock_guard guard(m_mutex); uint32_t prev_size = indexes.size(); const uint32_t count = std::min(m_symbols.size(), end_index); for (uint32_t i = start_idx; i < count; ++i) { if (symbol_type == eSymbolTypeAny || m_symbols[i].GetType() == symbol_type) { if (CheckSymbolAtIndex(i, symbol_debug_type, symbol_visibility)) indexes.push_back(i); } } return indexes.size() - prev_size; } uint32_t Symtab::GetIndexForSymbol(const Symbol *symbol) const { if (!m_symbols.empty()) { const Symbol *first_symbol = &m_symbols[0]; if (symbol >= first_symbol && symbol < first_symbol + m_symbols.size()) return symbol - first_symbol; } return UINT32_MAX; } struct SymbolSortInfo { const bool sort_by_load_addr; const Symbol *symbols; }; namespace { struct SymbolIndexComparator { const std::vector &symbols; std::vector &addr_cache; // Getting from the symbol to the Address to the File Address involves some // work. // Since there are potentially many symbols here, and we're using this for // sorting so // we're going to be computing the address many times, cache that in // addr_cache. // The array passed in has to be the same size as the symbols array passed // into the // member variable symbols, and should be initialized with // LLDB_INVALID_ADDRESS. // NOTE: You have to make addr_cache externally and pass it in because // std::stable_sort // makes copies of the comparator it is initially passed in, and you end up // spending // huge amounts of time copying this array... SymbolIndexComparator(const std::vector &s, std::vector &a) : symbols(s), addr_cache(a) { assert(symbols.size() == addr_cache.size()); } bool operator()(uint32_t index_a, uint32_t index_b) { addr_t value_a = addr_cache[index_a]; if (value_a == LLDB_INVALID_ADDRESS) { value_a = symbols[index_a].GetAddressRef().GetFileAddress(); addr_cache[index_a] = value_a; } addr_t value_b = addr_cache[index_b]; if (value_b == LLDB_INVALID_ADDRESS) { value_b = symbols[index_b].GetAddressRef().GetFileAddress(); addr_cache[index_b] = value_b; } if (value_a == value_b) { // The if the values are equal, use the original symbol user ID lldb::user_id_t uid_a = symbols[index_a].GetID(); lldb::user_id_t uid_b = symbols[index_b].GetID(); if (uid_a < uid_b) return true; if (uid_a > uid_b) return false; return false; } else if (value_a < value_b) return true; return false; } }; } void Symtab::SortSymbolIndexesByValue(std::vector &indexes, bool remove_duplicates) const { std::lock_guard guard(m_mutex); Timer scoped_timer(LLVM_PRETTY_FUNCTION, LLVM_PRETTY_FUNCTION); // No need to sort if we have zero or one items... if (indexes.size() <= 1) return; // Sort the indexes in place using std::stable_sort. // NOTE: The use of std::stable_sort instead of std::sort here is strictly for // performance, // not correctness. The indexes vector tends to be "close" to sorted, which // the // stable sort handles better. std::vector addr_cache(m_symbols.size(), LLDB_INVALID_ADDRESS); SymbolIndexComparator comparator(m_symbols, addr_cache); std::stable_sort(indexes.begin(), indexes.end(), comparator); // Remove any duplicates if requested if (remove_duplicates) std::unique(indexes.begin(), indexes.end()); } uint32_t Symtab::AppendSymbolIndexesWithName(const ConstString &symbol_name, std::vector &indexes) { std::lock_guard guard(m_mutex); Timer scoped_timer(LLVM_PRETTY_FUNCTION, "%s", LLVM_PRETTY_FUNCTION); if (symbol_name) { if (!m_name_indexes_computed) InitNameIndexes(); - return m_name_to_index.GetValues(symbol_name.GetStringRef(), indexes); + return m_name_to_index.GetValues(symbol_name, indexes); } return 0; } uint32_t Symtab::AppendSymbolIndexesWithName(const ConstString &symbol_name, Debug symbol_debug_type, Visibility symbol_visibility, std::vector &indexes) { std::lock_guard guard(m_mutex); Timer scoped_timer(LLVM_PRETTY_FUNCTION, "%s", LLVM_PRETTY_FUNCTION); if (symbol_name) { const size_t old_size = indexes.size(); if (!m_name_indexes_computed) InitNameIndexes(); std::vector all_name_indexes; const size_t name_match_count = - m_name_to_index.GetValues(symbol_name.GetStringRef(), all_name_indexes); + m_name_to_index.GetValues(symbol_name, all_name_indexes); for (size_t i = 0; i < name_match_count; ++i) { if (CheckSymbolAtIndex(all_name_indexes[i], symbol_debug_type, symbol_visibility)) indexes.push_back(all_name_indexes[i]); } return indexes.size() - old_size; } return 0; } uint32_t Symtab::AppendSymbolIndexesWithNameAndType(const ConstString &symbol_name, SymbolType symbol_type, std::vector &indexes) { std::lock_guard guard(m_mutex); if (AppendSymbolIndexesWithName(symbol_name, indexes) > 0) { std::vector::iterator pos = indexes.begin(); while (pos != indexes.end()) { if (symbol_type == eSymbolTypeAny || m_symbols[*pos].GetType() == symbol_type) ++pos; else pos = indexes.erase(pos); } } return indexes.size(); } uint32_t Symtab::AppendSymbolIndexesWithNameAndType( const ConstString &symbol_name, SymbolType symbol_type, Debug symbol_debug_type, Visibility symbol_visibility, std::vector &indexes) { std::lock_guard guard(m_mutex); if (AppendSymbolIndexesWithName(symbol_name, symbol_debug_type, symbol_visibility, indexes) > 0) { std::vector::iterator pos = indexes.begin(); while (pos != indexes.end()) { if (symbol_type == eSymbolTypeAny || m_symbols[*pos].GetType() == symbol_type) ++pos; else pos = indexes.erase(pos); } } return indexes.size(); } uint32_t Symtab::AppendSymbolIndexesMatchingRegExAndType( const RegularExpression ®exp, SymbolType symbol_type, std::vector &indexes) { std::lock_guard guard(m_mutex); uint32_t prev_size = indexes.size(); uint32_t sym_end = m_symbols.size(); for (uint32_t i = 0; i < sym_end; i++) { if (symbol_type == eSymbolTypeAny || m_symbols[i].GetType() == symbol_type) { const char *name = m_symbols[i].GetName().AsCString(); if (name) { if (regexp.Execute(name)) indexes.push_back(i); } } } return indexes.size() - prev_size; } uint32_t Symtab::AppendSymbolIndexesMatchingRegExAndType( const RegularExpression ®exp, SymbolType symbol_type, Debug symbol_debug_type, Visibility symbol_visibility, std::vector &indexes) { std::lock_guard guard(m_mutex); uint32_t prev_size = indexes.size(); uint32_t sym_end = m_symbols.size(); for (uint32_t i = 0; i < sym_end; i++) { if (symbol_type == eSymbolTypeAny || m_symbols[i].GetType() == symbol_type) { if (CheckSymbolAtIndex(i, symbol_debug_type, symbol_visibility) == false) continue; const char *name = m_symbols[i].GetName().AsCString(); if (name) { if (regexp.Execute(name)) indexes.push_back(i); } } } return indexes.size() - prev_size; } Symbol *Symtab::FindSymbolWithType(SymbolType symbol_type, Debug symbol_debug_type, Visibility symbol_visibility, uint32_t &start_idx) { std::lock_guard guard(m_mutex); const size_t count = m_symbols.size(); for (size_t idx = start_idx; idx < count; ++idx) { if (symbol_type == eSymbolTypeAny || m_symbols[idx].GetType() == symbol_type) { if (CheckSymbolAtIndex(idx, symbol_debug_type, symbol_visibility)) { start_idx = idx; return &m_symbols[idx]; } } } return nullptr; } size_t Symtab::FindAllSymbolsWithNameAndType(const ConstString &name, SymbolType symbol_type, std::vector &symbol_indexes) { std::lock_guard guard(m_mutex); Timer scoped_timer(LLVM_PRETTY_FUNCTION, "%s", LLVM_PRETTY_FUNCTION); // Initialize all of the lookup by name indexes before converting NAME // to a uniqued string NAME_STR below. if (!m_name_indexes_computed) InitNameIndexes(); if (name) { // The string table did have a string that matched, but we need // to check 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( const ConstString &name, SymbolType symbol_type, Debug symbol_debug_type, Visibility symbol_visibility, std::vector &symbol_indexes) { std::lock_guard guard(m_mutex); Timer scoped_timer(LLVM_PRETTY_FUNCTION, "%s", LLVM_PRETTY_FUNCTION); // Initialize all of the lookup by name indexes before converting NAME // to a uniqued string NAME_STR below. if (!m_name_indexes_computed) InitNameIndexes(); if (name) { // The string table did have a string that matched, but we need // to check the symbols and match the symbol_type if any was given. AppendSymbolIndexesWithNameAndType(name, symbol_type, symbol_debug_type, symbol_visibility, symbol_indexes); } return symbol_indexes.size(); } size_t Symtab::FindAllSymbolsMatchingRexExAndType( const RegularExpression ®ex, SymbolType symbol_type, Debug symbol_debug_type, Visibility symbol_visibility, std::vector &symbol_indexes) { std::lock_guard guard(m_mutex); AppendSymbolIndexesMatchingRegExAndType(regex, symbol_type, symbol_debug_type, symbol_visibility, symbol_indexes); return symbol_indexes.size(); } Symbol *Symtab::FindFirstSymbolWithNameAndType(const ConstString &name, SymbolType symbol_type, Debug symbol_debug_type, Visibility symbol_visibility) { std::lock_guard guard(m_mutex); Timer scoped_timer(LLVM_PRETTY_FUNCTION, "%s", LLVM_PRETTY_FUNCTION); if (!m_name_indexes_computed) InitNameIndexes(); if (name) { std::vector matching_indexes; // The string table did have a string that matched, but we need // to check the symbols and match the symbol_type if any was given. if (AppendSymbolIndexesWithNameAndType(name, symbol_type, symbol_debug_type, symbol_visibility, matching_indexes)) { std::vector::const_iterator pos, end = matching_indexes.end(); for (pos = matching_indexes.begin(); pos != end; ++pos) { Symbol *symbol = SymbolAtIndex(*pos); if (symbol->Compare(name, symbol_type)) return symbol; } } } return nullptr; } typedef struct { const Symtab *symtab; const addr_t file_addr; Symbol *match_symbol; const uint32_t *match_index_ptr; addr_t match_offset; } SymbolSearchInfo; // Add all the section file start address & size to the RangeVector, // recusively adding any children sections. static void AddSectionsToRangeMap(SectionList *sectlist, RangeVector §ion_ranges) { const int num_sections = sectlist->GetNumSections(0); for (int i = 0; i < num_sections; i++) { SectionSP sect_sp = sectlist->GetSectionAtIndex(i); if (sect_sp) { SectionList &child_sectlist = sect_sp->GetChildren(); // If this section has children, add the children to the RangeVector. // Else add this section to the RangeVector. if (child_sectlist.GetNumSections(0) > 0) { AddSectionsToRangeMap(&child_sectlist, section_ranges); } else { size_t size = sect_sp->GetByteSize(); if (size > 0) { addr_t base_addr = sect_sp->GetFileAddress(); RangeVector::Entry entry; entry.SetRangeBase(base_addr); entry.SetByteSize(size); section_ranges.Append(entry); } } } } } void Symtab::InitAddressIndexes() { // Protected function, no need to lock mutex... if (!m_file_addr_to_index_computed && !m_symbols.empty()) { m_file_addr_to_index_computed = true; FileRangeToIndexMap::Entry entry; const_iterator begin = m_symbols.begin(); const_iterator end = m_symbols.end(); for (const_iterator pos = m_symbols.begin(); pos != end; ++pos) { if (pos->ValueIsAddress()) { entry.SetRangeBase(pos->GetAddressRef().GetFileAddress()); entry.SetByteSize(pos->GetByteSize()); entry.data = std::distance(begin, pos); m_file_addr_to_index.Append(entry); } } const size_t num_entries = m_file_addr_to_index.GetSize(); if (num_entries > 0) { m_file_addr_to_index.Sort(); // Create a RangeVector with the start & size of all the sections for // this objfile. We'll need to check this for any FileRangeToIndexMap // entries with an uninitialized size, which could potentially be a // large number so reconstituting the weak pointer is busywork when it // is invariant information. SectionList *sectlist = m_objfile->GetSectionList(); RangeVector section_ranges; if (sectlist) { AddSectionsToRangeMap(sectlist, section_ranges); section_ranges.Sort(); } // Iterate through the FileRangeToIndexMap and fill in the size for any // entries that didn't already have a size from the Symbol (e.g. if we // have a plain linker symbol with an address only, instead of debug info // where we get an address and a size and a type, etc.) for (size_t i = 0; i < num_entries; i++) { FileRangeToIndexMap::Entry *entry = m_file_addr_to_index.GetMutableEntryAtIndex(i); if (entry->GetByteSize() == 0) { addr_t curr_base_addr = entry->GetRangeBase(); const RangeVector::Entry *containing_section = section_ranges.FindEntryThatContains(curr_base_addr); // Use the end of the section as the default max size of the symbol addr_t sym_size = 0; if (containing_section) { sym_size = containing_section->GetByteSize() - (entry->GetRangeBase() - containing_section->GetRangeBase()); } for (size_t j = i; j < num_entries; j++) { FileRangeToIndexMap::Entry *next_entry = m_file_addr_to_index.GetMutableEntryAtIndex(j); addr_t next_base_addr = next_entry->GetRangeBase(); if (next_base_addr > curr_base_addr) { addr_t size_to_next_symbol = next_base_addr - curr_base_addr; // Take the difference between this symbol and the next one as its // size, // if it is less than the size of the section. if (sym_size == 0 || size_to_next_symbol < sym_size) { sym_size = size_to_next_symbol; } break; } } if (sym_size > 0) { entry->SetByteSize(sym_size); Symbol &symbol = m_symbols[entry->data]; symbol.SetByteSize(sym_size); symbol.SetSizeIsSynthesized(true); } } } // Sort again in case the range size changes the ordering m_file_addr_to_index.Sort(); } } } void Symtab::CalculateSymbolSizes() { std::lock_guard guard(m_mutex); if (!m_symbols.empty()) { if (!m_file_addr_to_index_computed) InitAddressIndexes(); const size_t num_entries = m_file_addr_to_index.GetSize(); for (size_t i = 0; i < num_entries; ++i) { // The entries in the m_file_addr_to_index have calculated the sizes // already // so we will use this size if we need to. const FileRangeToIndexMap::Entry &entry = m_file_addr_to_index.GetEntryRef(i); Symbol &symbol = m_symbols[entry.data]; // If the symbol size is already valid, no need to do anything if (symbol.GetByteSizeIsValid()) continue; const addr_t range_size = entry.GetByteSize(); if (range_size > 0) { symbol.SetByteSize(range_size); symbol.SetSizeIsSynthesized(true); } } } } Symbol *Symtab::FindSymbolAtFileAddress(addr_t file_addr) { std::lock_guard guard(m_mutex); if (!m_file_addr_to_index_computed) InitAddressIndexes(); const FileRangeToIndexMap::Entry *entry = m_file_addr_to_index.FindEntryStartsAt(file_addr); if (entry) { Symbol *symbol = SymbolAtIndex(entry->data); if (symbol->GetFileAddress() == file_addr) return symbol; } return nullptr; } Symbol *Symtab::FindSymbolContainingFileAddress(addr_t file_addr) { std::lock_guard guard(m_mutex); if (!m_file_addr_to_index_computed) InitAddressIndexes(); const FileRangeToIndexMap::Entry *entry = m_file_addr_to_index.FindEntryThatContains(file_addr); if (entry) { Symbol *symbol = SymbolAtIndex(entry->data); if (symbol->ContainsFileAddress(file_addr)) return symbol; } return nullptr; } void Symtab::ForEachSymbolContainingFileAddress( addr_t file_addr, std::function const &callback) { std::lock_guard guard(m_mutex); if (!m_file_addr_to_index_computed) InitAddressIndexes(); std::vector all_addr_indexes; // Get all symbols with file_addr const size_t addr_match_count = m_file_addr_to_index.FindEntryIndexesThatContain(file_addr, all_addr_indexes); for (size_t i = 0; i < addr_match_count; ++i) { Symbol *symbol = SymbolAtIndex(all_addr_indexes[i]); if (symbol->ContainsFileAddress(file_addr)) { if (!callback(symbol)) break; } } } void Symtab::SymbolIndicesToSymbolContextList( std::vector &symbol_indexes, SymbolContextList &sc_list) { // No need to protect this call using m_mutex all other method calls are // already thread safe. const bool merge_symbol_into_function = true; size_t num_indices = symbol_indexes.size(); if (num_indices > 0) { SymbolContext sc; sc.module_sp = m_objfile->GetModule(); for (size_t i = 0; i < num_indices; i++) { sc.symbol = SymbolAtIndex(symbol_indexes[i]); if (sc.symbol) sc_list.AppendIfUnique(sc, merge_symbol_into_function); } } } size_t Symtab::FindFunctionSymbols(const ConstString &name, uint32_t name_type_mask, SymbolContextList &sc_list) { size_t count = 0; std::vector symbol_indexes; - llvm::StringRef name_cstr = name.GetStringRef(); - // eFunctionNameTypeAuto should be pre-resolved by a call to // Module::LookupInfo::LookupInfo() assert((name_type_mask & eFunctionNameTypeAuto) == 0); if (name_type_mask & (eFunctionNameTypeBase | eFunctionNameTypeFull)) { std::vector temp_symbol_indexes; FindAllSymbolsWithNameAndType(name, eSymbolTypeAny, temp_symbol_indexes); unsigned temp_symbol_indexes_size = temp_symbol_indexes.size(); if (temp_symbol_indexes_size > 0) { std::lock_guard guard(m_mutex); for (unsigned i = 0; i < temp_symbol_indexes_size; i++) { SymbolContext sym_ctx; sym_ctx.symbol = SymbolAtIndex(temp_symbol_indexes[i]); if (sym_ctx.symbol) { switch (sym_ctx.symbol->GetType()) { case eSymbolTypeCode: case eSymbolTypeResolver: case eSymbolTypeReExported: symbol_indexes.push_back(temp_symbol_indexes[i]); break; default: break; } } } } } if (name_type_mask & eFunctionNameTypeBase) { // From mangled names we can't tell what is a basename and what // is a method name, so we just treat them the same if (!m_name_indexes_computed) InitNameIndexes(); if (!m_basename_to_index.IsEmpty()) { const UniqueCStringMap::Entry *match; - for (match = m_basename_to_index.FindFirstValueForName(name_cstr); + for (match = m_basename_to_index.FindFirstValueForName(name); match != nullptr; match = m_basename_to_index.FindNextValueForName(match)) { symbol_indexes.push_back(match->value); } } } if (name_type_mask & eFunctionNameTypeMethod) { if (!m_name_indexes_computed) InitNameIndexes(); if (!m_method_to_index.IsEmpty()) { const UniqueCStringMap::Entry *match; - for (match = m_method_to_index.FindFirstValueForName(name_cstr); + for (match = m_method_to_index.FindFirstValueForName(name); match != nullptr; match = m_method_to_index.FindNextValueForName(match)) { symbol_indexes.push_back(match->value); } } } if (name_type_mask & eFunctionNameTypeSelector) { if (!m_name_indexes_computed) InitNameIndexes(); if (!m_selector_to_index.IsEmpty()) { const UniqueCStringMap::Entry *match; - for (match = m_selector_to_index.FindFirstValueForName(name_cstr); + for (match = m_selector_to_index.FindFirstValueForName(name); match != nullptr; match = m_selector_to_index.FindNextValueForName(match)) { symbol_indexes.push_back(match->value); } } } if (!symbol_indexes.empty()) { std::sort(symbol_indexes.begin(), symbol_indexes.end()); 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 { uint32_t child_idx = GetIndexForSymbol(child_symbol); if (child_idx != UINT32_MAX && child_idx > 0) { for (uint32_t idx = child_idx - 1; idx != UINT32_MAX; --idx) { const Symbol *symbol = SymbolAtIndex(idx); const uint32_t sibling_idx = symbol->GetSiblingIndex(); if (sibling_idx != UINT32_MAX && sibling_idx > child_idx) return symbol; } } return NULL; } Index: vendor/lldb/dist/source/Target/Target.cpp =================================================================== --- vendor/lldb/dist/source/Target/Target.cpp (revision 317691) +++ vendor/lldb/dist/source/Target/Target.cpp (revision 317692) @@ -1,4115 +1,4134 @@ //===-- Target.cpp ----------------------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // C Includes // C++ Includes #include // Other libraries and framework includes // Project includes #include "Plugins/ExpressionParser/Clang/ClangASTSource.h" #include "Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.h" #include "Plugins/ExpressionParser/Clang/ClangPersistentVariables.h" #include "lldb/Breakpoint/BreakpointIDList.h" #include "lldb/Breakpoint/BreakpointResolver.h" #include "lldb/Breakpoint/BreakpointResolverAddress.h" #include "lldb/Breakpoint/BreakpointResolverFileLine.h" #include "lldb/Breakpoint/BreakpointResolverFileRegex.h" #include "lldb/Breakpoint/BreakpointResolverName.h" #include "lldb/Breakpoint/Watchpoint.h" #include "lldb/Core/Debugger.h" #include "lldb/Core/Event.h" #include "lldb/Core/Module.h" #include "lldb/Core/ModuleSpec.h" #include "lldb/Core/Section.h" #include "lldb/Core/SourceManager.h" #include "lldb/Core/State.h" #include "lldb/Core/StreamFile.h" #include "lldb/Core/Timer.h" #include "lldb/Core/ValueObject.h" #include "lldb/Expression/REPL.h" #include "lldb/Expression/UserExpression.h" #include "lldb/Host/Host.h" #include "lldb/Interpreter/CommandInterpreter.h" #include "lldb/Interpreter/CommandReturnObject.h" #include "lldb/Interpreter/OptionGroupWatchpoint.h" #include "lldb/Interpreter/OptionValues.h" #include "lldb/Interpreter/Property.h" #include "lldb/Symbol/ClangASTContext.h" #include "lldb/Symbol/Function.h" #include "lldb/Symbol/ObjectFile.h" #include "lldb/Symbol/Symbol.h" #include "lldb/Target/Language.h" #include "lldb/Target/LanguageRuntime.h" #include "lldb/Target/ObjCLanguageRuntime.h" #include "lldb/Target/Process.h" #include "lldb/Target/SectionLoadList.h" #include "lldb/Target/StackFrame.h" #include "lldb/Target/SystemRuntime.h" #include "lldb/Target/Target.h" #include "lldb/Target/Thread.h" #include "lldb/Target/ThreadSpec.h" #include "lldb/Utility/FileSpec.h" #include "lldb/Utility/LLDBAssert.h" #include "lldb/Utility/Log.h" #include "lldb/Utility/StreamString.h" using namespace lldb; using namespace lldb_private; constexpr std::chrono::milliseconds EvaluateExpressionOptions::default_timeout; ConstString &Target::GetStaticBroadcasterClass() { static ConstString class_name("lldb.target"); return class_name; } Target::Target(Debugger &debugger, const ArchSpec &target_arch, const lldb::PlatformSP &platform_sp, bool is_dummy_target) : TargetProperties(this), Broadcaster(debugger.GetBroadcasterManager(), Target::GetStaticBroadcasterClass().AsCString()), ExecutionContextScope(), m_debugger(debugger), m_platform_sp(platform_sp), m_mutex(), m_arch(target_arch), m_images(this), m_section_load_history(), m_breakpoint_list(false), m_internal_breakpoint_list(true), m_watchpoint_list(), m_process_sp(), m_search_filter_sp(), m_image_search_paths(ImageSearchPathsChanged, this), m_ast_importer_sp(), m_source_manager_ap(), m_stop_hooks(), m_stop_hook_next_id(0), m_valid(true), m_suppress_stop_hooks(false), m_is_dummy_target(is_dummy_target) { SetEventName(eBroadcastBitBreakpointChanged, "breakpoint-changed"); SetEventName(eBroadcastBitModulesLoaded, "modules-loaded"); SetEventName(eBroadcastBitModulesUnloaded, "modules-unloaded"); SetEventName(eBroadcastBitWatchpointChanged, "watchpoint-changed"); SetEventName(eBroadcastBitSymbolsLoaded, "symbols-loaded"); CheckInWithManager(); Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_OBJECT)); if (log) log->Printf("%p Target::Target()", static_cast(this)); if (m_arch.IsValid()) { LogIfAnyCategoriesSet( LIBLLDB_LOG_TARGET, "Target::Target created with architecture %s (%s)", m_arch.GetArchitectureName(), m_arch.GetTriple().getTriple().c_str()); } } Target::~Target() { Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_OBJECT)); if (log) log->Printf("%p Target::~Target()", static_cast(this)); DeleteCurrentProcess(); } void Target::PrimeFromDummyTarget(Target *target) { if (!target) return; m_stop_hooks = target->m_stop_hooks; for (BreakpointSP breakpoint_sp : target->m_breakpoint_list.Breakpoints()) { if (breakpoint_sp->IsInternal()) continue; BreakpointSP new_bp(new Breakpoint(*this, *breakpoint_sp.get())); AddBreakpoint(new_bp, false); } } void Target::Dump(Stream *s, lldb::DescriptionLevel description_level) { // s->Printf("%.*p: ", (int)sizeof(void*) * 2, this); if (description_level != lldb::eDescriptionLevelBrief) { s->Indent(); s->PutCString("Target\n"); s->IndentMore(); m_images.Dump(s); m_breakpoint_list.Dump(s); m_internal_breakpoint_list.Dump(s); s->IndentLess(); } else { Module *exe_module = GetExecutableModulePointer(); if (exe_module) s->PutCString(exe_module->GetFileSpec().GetFilename().GetCString()); else s->PutCString("No executable module."); } } void Target::CleanupProcess() { // Do any cleanup of the target we need to do between process instances. // NB It is better to do this before destroying the process in case the // clean up needs some help from the process. m_breakpoint_list.ClearAllBreakpointSites(); m_internal_breakpoint_list.ClearAllBreakpointSites(); // Disable watchpoints just on the debugger side. std::unique_lock lock; this->GetWatchpointList().GetListMutex(lock); DisableAllWatchpoints(false); ClearAllWatchpointHitCounts(); ClearAllWatchpointHistoricValues(); } void Target::DeleteCurrentProcess() { if (m_process_sp) { m_section_load_history.Clear(); if (m_process_sp->IsAlive()) m_process_sp->Destroy(false); m_process_sp->Finalize(); CleanupProcess(); m_process_sp.reset(); } } const lldb::ProcessSP &Target::CreateProcess(ListenerSP listener_sp, llvm::StringRef plugin_name, const FileSpec *crash_file) { DeleteCurrentProcess(); m_process_sp = Process::FindPlugin(shared_from_this(), plugin_name, listener_sp, crash_file); return m_process_sp; } const lldb::ProcessSP &Target::GetProcessSP() const { return m_process_sp; } lldb::REPLSP Target::GetREPL(Error &err, lldb::LanguageType language, const char *repl_options, bool can_create) { if (language == eLanguageTypeUnknown) { std::set repl_languages; Language::GetLanguagesSupportingREPLs(repl_languages); if (repl_languages.size() == 1) { language = *repl_languages.begin(); } else if (repl_languages.size() == 0) { err.SetErrorStringWithFormat( "LLDB isn't configured with REPL support for any languages."); return REPLSP(); } else { err.SetErrorStringWithFormat( "Multiple possible REPL languages. Please specify a language."); return REPLSP(); } } REPLMap::iterator pos = m_repl_map.find(language); if (pos != m_repl_map.end()) { return pos->second; } if (!can_create) { err.SetErrorStringWithFormat( "Couldn't find an existing REPL for %s, and can't create a new one", Language::GetNameForLanguageType(language)); return lldb::REPLSP(); } Debugger *const debugger = nullptr; lldb::REPLSP ret = REPL::Create(err, language, debugger, this, repl_options); if (ret) { m_repl_map[language] = ret; return m_repl_map[language]; } if (err.Success()) { err.SetErrorStringWithFormat("Couldn't create a REPL for %s", Language::GetNameForLanguageType(language)); } return lldb::REPLSP(); } void Target::SetREPL(lldb::LanguageType language, lldb::REPLSP repl_sp) { lldbassert(!m_repl_map.count(language)); m_repl_map[language] = repl_sp; } void Target::Destroy() { std::lock_guard guard(m_mutex); m_valid = false; DeleteCurrentProcess(); m_platform_sp.reset(); m_arch.Clear(); ClearModules(true); m_section_load_history.Clear(); const bool notify = false; m_breakpoint_list.RemoveAll(notify); m_internal_breakpoint_list.RemoveAll(notify); m_last_created_breakpoint.reset(); m_last_created_watchpoint.reset(); m_search_filter_sp.reset(); m_image_search_paths.Clear(notify); m_stop_hooks.clear(); m_stop_hook_next_id = 0; m_suppress_stop_hooks = false; } BreakpointList &Target::GetBreakpointList(bool internal) { if (internal) return m_internal_breakpoint_list; else return m_breakpoint_list; } const BreakpointList &Target::GetBreakpointList(bool internal) const { if (internal) return m_internal_breakpoint_list; else return m_breakpoint_list; } BreakpointSP Target::GetBreakpointByID(break_id_t break_id) { BreakpointSP bp_sp; if (LLDB_BREAK_ID_IS_INTERNAL(break_id)) bp_sp = m_internal_breakpoint_list.FindBreakpointByID(break_id); else bp_sp = m_breakpoint_list.FindBreakpointByID(break_id); return bp_sp; } BreakpointSP Target::CreateSourceRegexBreakpoint( const FileSpecList *containingModules, const FileSpecList *source_file_spec_list, const std::unordered_set &function_names, 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, !static_cast(move_to_nearest_code))); return CreateBreakpoint(filter_sp, resolver_sp, internal, hardware, true); } BreakpointSP Target::CreateBreakpoint(const FileSpecList *containingModules, const FileSpec &file, uint32_t line_no, lldb::addr_t offset, LazyBool check_inlines, LazyBool skip_prologue, bool internal, bool hardware, LazyBool move_to_nearest_code) { FileSpec remapped_file; ConstString remapped_path; if (GetSourcePathMap().ReverseRemapPath(ConstString(file.GetPath().c_str()), remapped_path)) remapped_file.SetFile(remapped_path.AsCString(), true); else remapped_file = file; if (check_inlines == eLazyBoolCalculate) { const InlineStrategy inline_strategy = GetInlineStrategy(); switch (inline_strategy) { case eInlineBreakpointsNever: check_inlines = eLazyBoolNo; break; case eInlineBreakpointsHeaders: if (remapped_file.IsSourceImplementationFile()) check_inlines = eLazyBoolNo; else check_inlines = eLazyBoolYes; break; case eInlineBreakpointsAlways: check_inlines = eLazyBoolYes; break; } } SearchFilterSP filter_sp; if (check_inlines == eLazyBoolNo) { // Not checking for inlines, we are looking only for matching compile units FileSpecList compile_unit_list; compile_unit_list.Append(remapped_file); filter_sp = GetSearchFilterForModuleAndCUList(containingModules, &compile_unit_list); } else { filter_sp = GetSearchFilterForModuleList(containingModules); } if (skip_prologue == eLazyBoolCalculate) skip_prologue = GetSkipPrologue() ? eLazyBoolYes : eLazyBoolNo; if (move_to_nearest_code == eLazyBoolCalculate) move_to_nearest_code = GetMoveToNearestCode() ? eLazyBoolYes : eLazyBoolNo; BreakpointResolverSP resolver_sp(new BreakpointResolverFileLine( nullptr, remapped_file, line_no, offset, check_inlines, skip_prologue, !static_cast(move_to_nearest_code))); return CreateBreakpoint(filter_sp, resolver_sp, internal, hardware, true); } BreakpointSP Target::CreateBreakpoint(lldb::addr_t addr, bool internal, bool hardware) { Address so_addr; // Check for any reason we want to move this breakpoint to other address. addr = GetBreakableLoadAddress(addr); // Attempt to resolve our load address if possible, though it is ok if // it doesn't resolve to section/offset. // Try and resolve as a load address if possible GetSectionLoadList().ResolveLoadAddress(addr, so_addr); if (!so_addr.IsValid()) { // The address didn't resolve, so just set this as an absolute address so_addr.SetOffset(addr); } BreakpointSP bp_sp(CreateBreakpoint(so_addr, internal, hardware)); return bp_sp; } BreakpointSP Target::CreateBreakpoint(const Address &addr, bool internal, bool hardware) { SearchFilterSP filter_sp( new SearchFilterForUnconstrainedSearches(shared_from_this())); BreakpointResolverSP resolver_sp( new BreakpointResolverAddress(nullptr, addr)); return CreateBreakpoint(filter_sp, resolver_sp, internal, hardware, false); } lldb::BreakpointSP Target::CreateAddressInModuleBreakpoint(lldb::addr_t file_addr, bool internal, const FileSpec *file_spec, bool request_hardware) { SearchFilterSP filter_sp( new SearchFilterForUnconstrainedSearches(shared_from_this())); BreakpointResolverSP resolver_sp( new BreakpointResolverAddress(nullptr, file_addr, file_spec)); return CreateBreakpoint(filter_sp, resolver_sp, internal, request_hardware, false); } BreakpointSP Target::CreateBreakpoint(const FileSpecList *containingModules, const FileSpecList *containingSourceFiles, const char *func_name, uint32_t func_name_type_mask, LanguageType language, lldb::addr_t offset, LazyBool skip_prologue, bool internal, bool hardware) { BreakpointSP bp_sp; if (func_name) { SearchFilterSP filter_sp(GetSearchFilterForModuleAndCUList( containingModules, containingSourceFiles)); if (skip_prologue == eLazyBoolCalculate) skip_prologue = GetSkipPrologue() ? eLazyBoolYes : eLazyBoolNo; if (language == lldb::eLanguageTypeUnknown) language = GetLanguage(); BreakpointResolverSP resolver_sp(new BreakpointResolverName( nullptr, func_name, func_name_type_mask, language, Breakpoint::Exact, offset, skip_prologue)); bp_sp = CreateBreakpoint(filter_sp, resolver_sp, internal, hardware, true); } return bp_sp; } lldb::BreakpointSP Target::CreateBreakpoint(const FileSpecList *containingModules, const FileSpecList *containingSourceFiles, const std::vector &func_names, uint32_t func_name_type_mask, LanguageType language, lldb::addr_t offset, LazyBool skip_prologue, bool internal, bool hardware) { BreakpointSP bp_sp; size_t num_names = func_names.size(); if (num_names > 0) { SearchFilterSP filter_sp(GetSearchFilterForModuleAndCUList( containingModules, containingSourceFiles)); if (skip_prologue == eLazyBoolCalculate) skip_prologue = GetSkipPrologue() ? eLazyBoolYes : eLazyBoolNo; if (language == lldb::eLanguageTypeUnknown) language = GetLanguage(); BreakpointResolverSP resolver_sp( new BreakpointResolverName(nullptr, func_names, func_name_type_mask, language, offset, skip_prologue)); bp_sp = CreateBreakpoint(filter_sp, resolver_sp, internal, hardware, true); } return bp_sp; } BreakpointSP Target::CreateBreakpoint( const FileSpecList *containingModules, const FileSpecList *containingSourceFiles, const char *func_names[], size_t num_names, uint32_t func_name_type_mask, LanguageType language, lldb::addr_t offset, LazyBool skip_prologue, bool internal, bool hardware) { BreakpointSP bp_sp; if (num_names > 0) { SearchFilterSP filter_sp(GetSearchFilterForModuleAndCUList( containingModules, containingSourceFiles)); if (skip_prologue == eLazyBoolCalculate) { if (offset == 0) skip_prologue = GetSkipPrologue() ? eLazyBoolYes : eLazyBoolNo; else skip_prologue = eLazyBoolNo; } if (language == lldb::eLanguageTypeUnknown) language = GetLanguage(); BreakpointResolverSP resolver_sp(new BreakpointResolverName( nullptr, func_names, num_names, func_name_type_mask, language, offset, skip_prologue)); resolver_sp->SetOffset(offset); bp_sp = CreateBreakpoint(filter_sp, resolver_sp, internal, hardware, true); } return bp_sp; } SearchFilterSP Target::GetSearchFilterForModule(const FileSpec *containingModule) { SearchFilterSP filter_sp; if (containingModule != nullptr) { // TODO: We should look into sharing module based search filters // across many breakpoints like we do for the simple target based one filter_sp.reset( new SearchFilterByModule(shared_from_this(), *containingModule)); } else { if (!m_search_filter_sp) m_search_filter_sp.reset( new SearchFilterForUnconstrainedSearches(shared_from_this())); filter_sp = m_search_filter_sp; } return filter_sp; } SearchFilterSP Target::GetSearchFilterForModuleList(const FileSpecList *containingModules) { SearchFilterSP filter_sp; if (containingModules && containingModules->GetSize() != 0) { // TODO: We should look into sharing module based search filters // across many breakpoints like we do for the simple target based one filter_sp.reset( new SearchFilterByModuleList(shared_from_this(), *containingModules)); } else { if (!m_search_filter_sp) m_search_filter_sp.reset( new SearchFilterForUnconstrainedSearches(shared_from_this())); filter_sp = m_search_filter_sp; } return filter_sp; } SearchFilterSP Target::GetSearchFilterForModuleAndCUList( const FileSpecList *containingModules, const FileSpecList *containingSourceFiles) { if (containingSourceFiles == nullptr || containingSourceFiles->GetSize() == 0) return GetSearchFilterForModuleList(containingModules); SearchFilterSP filter_sp; if (containingModules == nullptr) { // We could make a special "CU List only SearchFilter". Better yet was if // these could be composable, // but that will take a little reworking. filter_sp.reset(new SearchFilterByModuleListAndCU( shared_from_this(), FileSpecList(), *containingSourceFiles)); } else { filter_sp.reset(new SearchFilterByModuleListAndCU( shared_from_this(), *containingModules, *containingSourceFiles)); } return filter_sp; } BreakpointSP Target::CreateFuncRegexBreakpoint( const FileSpecList *containingModules, const FileSpecList *containingSourceFiles, RegularExpression &func_regex, lldb::LanguageType requested_language, LazyBool skip_prologue, bool internal, bool hardware) { SearchFilterSP filter_sp(GetSearchFilterForModuleAndCUList( containingModules, containingSourceFiles)); bool skip = (skip_prologue == eLazyBoolCalculate) ? GetSkipPrologue() : static_cast(skip_prologue); BreakpointResolverSP resolver_sp(new BreakpointResolverName( nullptr, func_regex, requested_language, 0, skip)); return CreateBreakpoint(filter_sp, resolver_sp, internal, hardware, true); } lldb::BreakpointSP Target::CreateExceptionBreakpoint(enum lldb::LanguageType language, bool catch_bp, bool throw_bp, bool internal, Args *additional_args, Error *error) { BreakpointSP exc_bkpt_sp = LanguageRuntime::CreateExceptionBreakpoint( *this, language, catch_bp, throw_bp, internal); if (exc_bkpt_sp && additional_args) { Breakpoint::BreakpointPreconditionSP precondition_sp = exc_bkpt_sp->GetPrecondition(); if (precondition_sp && additional_args) { if (error) *error = precondition_sp->ConfigurePrecondition(*additional_args); else precondition_sp->ConfigurePrecondition(*additional_args); } } return exc_bkpt_sp; } BreakpointSP Target::CreateBreakpoint(SearchFilterSP &filter_sp, BreakpointResolverSP &resolver_sp, bool internal, bool request_hardware, bool resolve_indirect_symbols) { BreakpointSP bp_sp; if (filter_sp && resolver_sp) { bp_sp.reset(new Breakpoint(*this, filter_sp, resolver_sp, request_hardware, resolve_indirect_symbols)); resolver_sp->SetBreakpoint(bp_sp.get()); AddBreakpoint(bp_sp, internal); } return bp_sp; } void Target::AddBreakpoint(lldb::BreakpointSP bp_sp, bool internal) { if (!bp_sp) return; if (internal) m_internal_breakpoint_list.Add(bp_sp, false); else m_breakpoint_list.Add(bp_sp, true); Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_BREAKPOINTS)); 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()); } bp_sp->ResolveBreakpoint(); if (!internal) { m_last_created_breakpoint = bp_sp; } } bool Target::ProcessIsValid() { return (m_process_sp && m_process_sp->IsAlive()); } static bool CheckIfWatchpointsExhausted(Target *target, Error &error) { uint32_t num_supported_hardware_watchpoints; Error rc = target->GetProcessSP()->GetWatchpointSupportInfo( num_supported_hardware_watchpoints); if (num_supported_hardware_watchpoints == 0) { error.SetErrorStringWithFormat( "Target supports (%u) hardware watchpoint slots.\n", num_supported_hardware_watchpoints); return false; } return true; } // See also Watchpoint::SetWatchpointType(uint32_t type) and // the OptionGroupWatchpoint::WatchType enum type. WatchpointSP Target::CreateWatchpoint(lldb::addr_t addr, size_t size, const CompilerType *type, uint32_t kind, Error &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); WatchpointSP wp_sp; if (!ProcessIsValid()) { error.SetErrorString("process is not alive"); return wp_sp; } if (addr == LLDB_INVALID_ADDRESS || size == 0) { if (size == 0) error.SetErrorString("cannot set a watchpoint with watch_size of 0"); else error.SetErrorStringWithFormat("invalid watch address: %" PRIu64, addr); return wp_sp; } if (!LLDB_WATCH_TYPE_IS_VALID(kind)) { error.SetErrorStringWithFormat("invalid watchpoint type: %d", kind); } if (!CheckIfWatchpointsExhausted(this, error)) return wp_sp; // Currently we only support one watchpoint per address, with total number // of watchpoints limited by the hardware which the inferior is running on. // Grab the list mutex while doing operations. const bool notify = false; // Don't notify about all the state changes we do // on creating the watchpoint. std::unique_lock lock; this->GetWatchpointList().GetListMutex(lock); WatchpointSP matched_sp = m_watchpoint_list.FindByAddress(addr); if (matched_sp) { size_t old_size = matched_sp->GetByteSize(); uint32_t old_type = (matched_sp->WatchpointRead() ? LLDB_WATCH_TYPE_READ : 0) | (matched_sp->WatchpointWrite() ? LLDB_WATCH_TYPE_WRITE : 0); // Return the existing watchpoint if both size and type match. if (size == old_size && kind == old_type) { wp_sp = matched_sp; wp_sp->SetEnabled(false, notify); } else { // Nil the matched watchpoint; we will be creating a new one. m_process_sp->DisableWatchpoint(matched_sp.get(), notify); m_watchpoint_list.Remove(matched_sp->GetID(), true); } } if (!wp_sp) { wp_sp.reset(new Watchpoint(*this, addr, size, type)); wp_sp->SetWatchpointType(kind, notify); m_watchpoint_list.Add(wp_sp, true); } 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()); if (error.Fail()) { // Enabling the watchpoint on the device side failed. // Remove the said watchpoint from the list maintained by the target // instance. m_watchpoint_list.Remove(wp_sp->GetID(), true); // See if we could provide more helpful error message. if (!OptionGroupWatchpoint::IsWatchSizeSupported(size)) error.SetErrorStringWithFormat( "watch size of %" PRIu64 " is not supported", (uint64_t)size); wp_sp.reset(); } else m_last_created_watchpoint = wp_sp; return wp_sp; } 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"); m_breakpoint_list.RemoveAll(true); if (internal_also) m_internal_breakpoint_list.RemoveAll(false); m_last_created_breakpoint.reset(); } 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"); m_breakpoint_list.SetEnabledAll(false); if (internal_also) m_internal_breakpoint_list.SetEnabledAll(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"); m_breakpoint_list.SetEnabledAll(true); if (internal_also) m_internal_breakpoint_list.SetEnabledAll(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"); if (DisableBreakpointByID(break_id)) { if (LLDB_BREAK_ID_IS_INTERNAL(break_id)) m_internal_breakpoint_list.Remove(break_id, false); else { if (m_last_created_breakpoint) { if (m_last_created_breakpoint->GetID() == break_id) m_last_created_breakpoint.reset(); } m_breakpoint_list.Remove(break_id, true); } return true; } return false; } 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"); BreakpointSP bp_sp; if (LLDB_BREAK_ID_IS_INTERNAL(break_id)) bp_sp = m_internal_breakpoint_list.FindBreakpointByID(break_id); else bp_sp = m_breakpoint_list.FindBreakpointByID(break_id); if (bp_sp) { bp_sp->SetEnabled(false); return true; } return false; } 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"); BreakpointSP bp_sp; if (LLDB_BREAK_ID_IS_INTERNAL(break_id)) bp_sp = m_internal_breakpoint_list.FindBreakpointByID(break_id); else bp_sp = m_breakpoint_list.FindBreakpointByID(break_id); if (bp_sp) { bp_sp->SetEnabled(true); return true; } return false; } Error Target::SerializeBreakpointsToFile(const FileSpec &file, const BreakpointIDList &bp_ids, bool append) { Error error; if (!file) { error.SetErrorString("Invalid FileSpec."); return error; } std::string path(file.GetPath()); StructuredData::ObjectSP input_data_sp; StructuredData::ArraySP break_store_sp; StructuredData::Array *break_store_ptr = nullptr; if (append) { input_data_sp = StructuredData::ParseJSONFromFile(file, error); if (error.Success()) { break_store_ptr = input_data_sp->GetAsArray(); if (!break_store_ptr) { error.SetErrorStringWithFormat( "Tried to append to invalid input file %s", path.c_str()); return error; } } } if (!break_store_ptr) { break_store_sp.reset(new StructuredData::Array()); break_store_ptr = break_store_sp.get(); } StreamFile out_file(path.c_str(), File::OpenOptions::eOpenOptionTruncate | File::OpenOptions::eOpenOptionWrite | File::OpenOptions::eOpenOptionCanCreate | File::OpenOptions::eOpenOptionCloseOnExec, lldb::eFilePermissionsFileDefault); if (!out_file.GetFile().IsValid()) { error.SetErrorStringWithFormat("Unable to open output file: %s.", path.c_str()); return error; } std::unique_lock lock; GetBreakpointList().GetListMutex(lock); if (bp_ids.GetSize() == 0) { const BreakpointList &breakpoints = GetBreakpointList(); size_t num_breakpoints = breakpoints.GetSize(); for (size_t i = 0; i < num_breakpoints; i++) { Breakpoint *bp = breakpoints.GetBreakpointAtIndex(i).get(); StructuredData::ObjectSP bkpt_save_sp = bp->SerializeToStructuredData(); // If a breakpoint can't serialize it, just ignore it for now: if (bkpt_save_sp) break_store_ptr->AddItem(bkpt_save_sp); } } else { std::unordered_set processed_bkpts; const size_t count = bp_ids.GetSize(); for (size_t i = 0; i < count; ++i) { BreakpointID cur_bp_id = bp_ids.GetBreakpointIDAtIndex(i); lldb::break_id_t bp_id = cur_bp_id.GetBreakpointID(); if (bp_id != LLDB_INVALID_BREAK_ID) { // Only do each breakpoint once: std::pair::iterator, bool> insert_result = processed_bkpts.insert(bp_id); if (!insert_result.second) continue; Breakpoint *bp = GetBreakpointByID(bp_id).get(); StructuredData::ObjectSP bkpt_save_sp = bp->SerializeToStructuredData(); // If the user explicitly asked to serialize a breakpoint, and we // can't, then // raise an error: if (!bkpt_save_sp) { error.SetErrorStringWithFormat("Unable to serialize breakpoint %d", bp_id); return error; } break_store_ptr->AddItem(bkpt_save_sp); } } } break_store_ptr->Dump(out_file, false); out_file.PutChar('\n'); return error; } Error Target::CreateBreakpointsFromFile(const FileSpec &file, BreakpointIDList &new_bps) { std::vector no_names; return CreateBreakpointsFromFile(file, no_names, new_bps); } Error Target::CreateBreakpointsFromFile(const FileSpec &file, std::vector &names, BreakpointIDList &new_bps) { std::unique_lock lock; GetBreakpointList().GetListMutex(lock); Error error; StructuredData::ObjectSP input_data_sp = StructuredData::ParseJSONFromFile(file, error); if (!error.Success()) { return error; } else if (!input_data_sp || !input_data_sp->IsValid()) { error.SetErrorStringWithFormat("Invalid JSON from input file: %s.", file.GetPath().c_str()); return error; } StructuredData::Array *bkpt_array = input_data_sp->GetAsArray(); if (!bkpt_array) { error.SetErrorStringWithFormat( "Invalid breakpoint data from input file: %s.", file.GetPath().c_str()); return error; } size_t num_bkpts = bkpt_array->GetSize(); size_t num_names = names.size(); for (size_t i = 0; i < num_bkpts; i++) { StructuredData::ObjectSP bkpt_object_sp = bkpt_array->GetItemAtIndex(i); // Peel off the breakpoint key, and feed the rest to the Breakpoint: StructuredData::Dictionary *bkpt_dict = bkpt_object_sp->GetAsDictionary(); if (!bkpt_dict) { error.SetErrorStringWithFormat( "Invalid breakpoint data for element %zu from input file: %s.", i, file.GetPath().c_str()); return error; } StructuredData::ObjectSP bkpt_data_sp = bkpt_dict->GetValueForKey(Breakpoint::GetSerializationKey()); if (num_names && !Breakpoint::SerializedBreakpointMatchesNames(bkpt_data_sp, names)) continue; BreakpointSP bkpt_sp = Breakpoint::CreateFromStructuredData(*this, bkpt_data_sp, error); if (!error.Success()) { error.SetErrorStringWithFormat( "Error restoring breakpoint %zu from %s: %s.", i, file.GetPath().c_str(), error.AsCString()); return error; } new_bps.AddBreakpointID(BreakpointID(bkpt_sp->GetID())); } return error; } // The flag 'end_to_end', default to true, signifies that the operation is // performed end to end, for both the debugger and the debuggee. // Assumption: Caller holds the list mutex lock for m_watchpoint_list for end // 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__); if (!end_to_end) { m_watchpoint_list.RemoveAll(true); return true; } // Otherwise, it's an end to end operation. if (!ProcessIsValid()) return false; size_t num_watchpoints = m_watchpoint_list.GetSize(); for (size_t i = 0; i < num_watchpoints; ++i) { WatchpointSP wp_sp = m_watchpoint_list.GetByIndex(i); if (!wp_sp) return false; Error rc = m_process_sp->DisableWatchpoint(wp_sp.get()); if (rc.Fail()) return false; } m_watchpoint_list.RemoveAll(true); m_last_created_watchpoint.reset(); return true; // Success! } // Assumption: Caller holds the list mutex lock for m_watchpoint_list for end 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__); if (!end_to_end) { m_watchpoint_list.SetEnabledAll(false); return true; } // Otherwise, it's an end to end operation. if (!ProcessIsValid()) return false; size_t num_watchpoints = m_watchpoint_list.GetSize(); for (size_t i = 0; i < num_watchpoints; ++i) { WatchpointSP wp_sp = m_watchpoint_list.GetByIndex(i); if (!wp_sp) return false; Error rc = m_process_sp->DisableWatchpoint(wp_sp.get()); if (rc.Fail()) return false; } return true; // Success! } // Assumption: Caller holds the list mutex lock for m_watchpoint_list for end 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__); if (!end_to_end) { m_watchpoint_list.SetEnabledAll(true); return true; } // Otherwise, it's an end to end operation. if (!ProcessIsValid()) return false; size_t num_watchpoints = m_watchpoint_list.GetSize(); for (size_t i = 0; i < num_watchpoints; ++i) { WatchpointSP wp_sp = m_watchpoint_list.GetByIndex(i); if (!wp_sp) return false; Error rc = m_process_sp->EnableWatchpoint(wp_sp.get()); if (rc.Fail()) return false; } return true; // Success! } // 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__); size_t num_watchpoints = m_watchpoint_list.GetSize(); for (size_t i = 0; i < num_watchpoints; ++i) { WatchpointSP wp_sp = m_watchpoint_list.GetByIndex(i); if (!wp_sp) return false; wp_sp->ResetHitCount(); } return true; // Success! } // 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__); size_t num_watchpoints = m_watchpoint_list.GetSize(); for (size_t i = 0; i < num_watchpoints; ++i) { WatchpointSP wp_sp = m_watchpoint_list.GetByIndex(i); if (!wp_sp) return false; wp_sp->ResetHistoricValues(); } return true; // Success! } // Assumption: Caller holds the list mutex lock for m_watchpoint_list // during 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__); if (!ProcessIsValid()) return false; size_t num_watchpoints = m_watchpoint_list.GetSize(); for (size_t i = 0; i < num_watchpoints; ++i) { WatchpointSP wp_sp = m_watchpoint_list.GetByIndex(i); if (!wp_sp) return false; wp_sp->SetIgnoreCount(ignore_count); } return true; // Success! } // 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); if (!ProcessIsValid()) return false; WatchpointSP wp_sp = m_watchpoint_list.FindByID(watch_id); if (wp_sp) { Error rc = m_process_sp->DisableWatchpoint(wp_sp.get()); if (rc.Success()) return true; // Else, fallthrough. } return false; } // 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); if (!ProcessIsValid()) return false; WatchpointSP wp_sp = m_watchpoint_list.FindByID(watch_id); if (wp_sp) { Error rc = m_process_sp->EnableWatchpoint(wp_sp.get()); if (rc.Success()) return true; // Else, fallthrough. } return false; } // 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); WatchpointSP watch_to_remove_sp = m_watchpoint_list.FindByID(watch_id); if (watch_to_remove_sp == m_last_created_watchpoint) m_last_created_watchpoint.reset(); if (DisableWatchpointByID(watch_id)) { m_watchpoint_list.Remove(watch_id, true); return true; } return false; } // Assumption: Caller holds the list mutex lock for m_watchpoint_list. 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); if (!ProcessIsValid()) return false; WatchpointSP wp_sp = m_watchpoint_list.FindByID(watch_id); if (wp_sp) { wp_sp->SetIgnoreCount(ignore_count); return true; } return false; } ModuleSP Target::GetExecutableModule() { // search for the first executable in the module list for (size_t i = 0; i < m_images.GetSize(); ++i) { ModuleSP module_sp = m_images.GetModuleAtIndex(i); lldb_private::ObjectFile *obj = module_sp->GetObjectFile(); if (obj == nullptr) continue; if (obj->GetType() == ObjectFile::Type::eTypeExecutable) return module_sp; } // as fall back return the first module loaded return m_images.GetModuleAtIndex(0); } Module *Target::GetExecutableModulePointer() { return GetExecutableModule().get(); } static void LoadScriptingResourceForModule(const ModuleSP &module_sp, Target *target) { Error error; StreamString feedback_stream; if (module_sp && !module_sp->LoadScriptingResourceInTarget(target, error, &feedback_stream)) { if (error.AsCString()) target->GetDebugger().GetErrorFile()->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()); } void Target::ClearModules(bool delete_locations) { ModulesDidUnload(m_images, delete_locations); m_section_load_history.Clear(); m_images.Clear(); m_scratch_type_system_map.Clear(); m_ast_importer_sp.reset(); } void Target::DidExec() { // When a process exec's we need to know about it so we can do some cleanup. m_breakpoint_list.RemoveInvalidLocations(m_arch); m_internal_breakpoint_list.RemoveInvalidLocations(m_arch); } void Target::SetExecutableModule(ModuleSP &executable_sp, bool get_dependent_files) { Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_TARGET)); ClearModules(false); if (executable_sp) { Timer scoped_timer(LLVM_PRETTY_FUNCTION, "Target::SetExecutableModule (executable = '%s')", executable_sp->GetFileSpec().GetPath().c_str()); m_images.Append(executable_sp); // 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. if (!m_arch.IsValid()) { m_arch = executable_sp->GetArchitecture(); if (log) log->Printf("Target::SetExecutableModule setting architecture to %s " "(%s) based on executable file", m_arch.GetArchitectureName(), m_arch.GetTriple().getTriple().c_str()); } FileSpecList dependent_files; ObjectFile *executable_objfile = executable_sp->GetObjectFile(); if (executable_objfile && get_dependent_files) { executable_objfile->GetDependentModules(dependent_files); for (uint32_t i = 0; i < dependent_files.GetSize(); i++) { FileSpec dependent_file_spec( dependent_files.GetFileSpecPointerAtIndex(i)); FileSpec platform_dependent_file_spec; if (m_platform_sp) m_platform_sp->GetFileWithUUID(dependent_file_spec, nullptr, platform_dependent_file_spec); else platform_dependent_file_spec = dependent_file_spec; ModuleSpec module_spec(platform_dependent_file_spec, m_arch); ModuleSP image_module_sp(GetSharedModule(module_spec)); if (image_module_sp) { ObjectFile *objfile = image_module_sp->GetObjectFile(); if (objfile) objfile->GetDependentModules(dependent_files); } } } } } bool Target::SetArchitecture(const ArchSpec &arch_spec) { Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_TARGET)); bool missing_local_arch = !m_arch.IsValid(); bool replace_local_arch = true; bool compatible_local_arch = false; ArchSpec other(arch_spec); if (!missing_local_arch) { if (m_arch.IsCompatibleMatch(arch_spec)) { other.MergeFrom(m_arch); if (m_arch.IsCompatibleMatch(other)) { compatible_local_arch = true; bool arch_changed, vendor_changed, os_changed, os_ver_changed, env_changed; m_arch.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; } } } if (compatible_local_arch || missing_local_arch) { // If we haven't got a valid arch spec, or the architectures are compatible // update the architecture, unless the one we already have is more specified if (replace_local_arch) m_arch = other; if (log) log->Printf("Target::SetArchitecture set architecture to %s (%s)", m_arch.GetArchitectureName(), m_arch.GetTriple().getTriple().c_str()); return true; } // 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()); m_arch = other; ModuleSP executable_sp = GetExecutableModule(); ClearModules(true); // 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()); ModuleSpec module_spec(executable_sp->GetFileSpec(), other); Error error = ModuleList::GetSharedModule(module_spec, executable_sp, &GetExecutableSearchPaths(), nullptr, nullptr); if (!error.Fail() && executable_sp) { SetExecutableModule(executable_sp, true); return true; } } return false; } bool Target::MergeArchitecture(const ArchSpec &arch_spec) { if (arch_spec.IsValid()) { if (m_arch.IsCompatibleMatch(arch_spec)) { // The current target arch is compatible with "arch_spec", see if we // can improve our current architecture using bits from "arch_spec" // Merge bits from arch_spec into "merged_arch" and set our architecture ArchSpec merged_arch(m_arch); merged_arch.MergeFrom(arch_spec); return SetArchitecture(merged_arch); } else { // The new architecture is different, we just need to replace it return SetArchitecture(arch_spec); } } return false; } void Target::WillClearList(const ModuleList &module_list) {} void Target::ModuleAdded(const ModuleList &module_list, const ModuleSP &module_sp) { // A module is being added to this target for the first time if (m_valid) { ModuleList my_module_list; my_module_list.Append(module_sp); LoadScriptingResourceForModule(module_sp, this); ModulesDidLoad(my_module_list); } } void Target::ModuleRemoved(const ModuleList &module_list, const ModuleSP &module_sp) { // A module is being removed from this target. if (m_valid) { ModuleList my_module_list; my_module_list.Append(module_sp); ModulesDidUnload(my_module_list, false); } } void Target::ModuleUpdated(const ModuleList &module_list, 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, new_module_sp); m_internal_breakpoint_list.UpdateBreakpointsWhenModuleIsReplaced( old_module_sp, new_module_sp); } } void Target::ModulesDidLoad(ModuleList &module_list) { if (m_valid && module_list.GetSize()) { m_breakpoint_list.UpdateBreakpoints(module_list, true, false); m_internal_breakpoint_list.UpdateBreakpoints(module_list, true, false); if (m_process_sp) { m_process_sp->ModulesDidLoad(module_list); } BroadcastEvent(eBroadcastBitModulesLoaded, new TargetEventData(this->shared_from_this(), module_list)); } } void Target::SymbolsDidLoad(ModuleList &module_list) { if (m_valid && module_list.GetSize()) { if (m_process_sp) { LanguageRuntime *runtime = m_process_sp->GetLanguageRuntime(lldb::eLanguageTypeObjC); if (runtime) { ObjCLanguageRuntime *objc_runtime = (ObjCLanguageRuntime *)runtime; objc_runtime->SymbolsDidLoad(module_list); } } m_breakpoint_list.UpdateBreakpoints(module_list, true, false); m_internal_breakpoint_list.UpdateBreakpoints(module_list, true, false); BroadcastEvent(eBroadcastBitSymbolsLoaded, new TargetEventData(this->shared_from_this(), module_list)); } } void Target::ModulesDidUnload(ModuleList &module_list, bool delete_locations) { if (m_valid && module_list.GetSize()) { UnloadModuleSections(module_list); m_breakpoint_list.UpdateBreakpoints(module_list, false, delete_locations); m_internal_breakpoint_list.UpdateBreakpoints(module_list, false, delete_locations); BroadcastEvent(eBroadcastBitModulesUnloaded, new TargetEventData(this->shared_from_this(), module_list)); } } bool Target::ModuleIsExcludedForUnconstrainedSearches( const FileSpec &module_file_spec) { if (GetBreakpointsConsultPlatformAvoidList()) { ModuleList matchingModules; ModuleSpec module_spec(module_file_spec); size_t num_modules = GetImages().FindModules(module_spec, matchingModules); // 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( matchingModules.GetModuleAtIndex(i))) return false; } return true; } } return false; } bool Target::ModuleIsExcludedForUnconstrainedSearches( const lldb::ModuleSP &module_sp) { if (GetBreakpointsConsultPlatformAvoidList()) { if (m_platform_sp) return m_platform_sp->ModuleIsExcludedForUnconstrainedSearches(*this, module_sp); } return false; } size_t Target::ReadMemoryFromFileCache(const Address &addr, void *dst, size_t dst_len, Error &error) { SectionSP section_sp(addr.GetSection()); if (section_sp) { // If the contents of this section are encrypted, the on-disk file is // unusable. Read only from live memory. if (section_sp->IsEncrypted()) { error.SetErrorString("section is encrypted"); return 0; } ModuleSP module_sp(section_sp->GetModule()); if (module_sp) { ObjectFile *objfile = section_sp->GetModule()->GetObjectFile(); if (objfile) { size_t bytes_read = objfile->ReadSectionData( section_sp.get(), addr.GetOffset(), dst, dst_len); if (bytes_read > 0) return bytes_read; else error.SetErrorStringWithFormat("error reading data from section %s", section_sp->GetName().GetCString()); } else error.SetErrorString("address isn't from a object file"); } else error.SetErrorString("address isn't in a module"); } else error.SetErrorString("address doesn't contain a section that points to a " "section in a object file"); return 0; } size_t Target::ReadMemory(const Address &addr, bool prefer_file_cache, void *dst, size_t dst_len, Error &error, lldb::addr_t *load_addr_ptr) { error.Clear(); // if we end up reading this from process memory, we will fill this // with the actual load address if (load_addr_ptr) *load_addr_ptr = LLDB_INVALID_ADDRESS; size_t bytes_read = 0; addr_t load_addr = LLDB_INVALID_ADDRESS; addr_t file_addr = LLDB_INVALID_ADDRESS; Address resolved_addr; if (!addr.IsSectionOffset()) { SectionLoadList §ion_load_list = GetSectionLoadList(); if (section_load_list.IsEmpty()) { // No sections are loaded, so we must assume we are not running // yet and anything we are given is a file address. file_addr = addr.GetOffset(); // "addr" doesn't have a section, so its // offset is the file address m_images.ResolveFileAddress(file_addr, resolved_addr); } else { // We have at least one section loaded. This can be because // we have manually loaded some sections with "target modules load ..." // or because we have have a live process that has sections loaded // through the dynamic loader load_addr = addr.GetOffset(); // "addr" doesn't have a section, so its // offset is the load address section_load_list.ResolveLoadAddress(load_addr, resolved_addr); } } if (!resolved_addr.IsValid()) resolved_addr = addr; if (prefer_file_cache) { bytes_read = ReadMemoryFromFileCache(resolved_addr, dst, dst_len, error); if (bytes_read > 0) return bytes_read; } if (ProcessIsValid()) { if (load_addr == LLDB_INVALID_ADDRESS) load_addr = resolved_addr.GetLoadAddress(this); if (load_addr == LLDB_INVALID_ADDRESS) { ModuleSP addr_module_sp(resolved_addr.GetModule()); if (addr_module_sp && addr_module_sp->GetFileSpec()) error.SetErrorStringWithFormatv( "{0:F}[{1:x+}] can't be resolved, {0:F} is not currently loaded", addr_module_sp->GetFileSpec(), resolved_addr.GetFileAddress()); else error.SetErrorStringWithFormat("0x%" PRIx64 " can't be resolved", resolved_addr.GetFileAddress()); } else { bytes_read = m_process_sp->ReadMemory(load_addr, dst, dst_len, error); if (bytes_read != dst_len) { if (error.Success()) { if (bytes_read == 0) error.SetErrorStringWithFormat( "read memory from 0x%" PRIx64 " failed", load_addr); else error.SetErrorStringWithFormat( "only %" PRIu64 " of %" PRIu64 " bytes were read from memory at 0x%" PRIx64, (uint64_t)bytes_read, (uint64_t)dst_len, load_addr); } } if (bytes_read) { if (load_addr_ptr) *load_addr_ptr = load_addr; return bytes_read; } // If the address is not section offset we have an address that // doesn't resolve to any address in any currently loaded shared // libraries and we failed to read memory so there isn't anything // more we can do. If it is section offset, we might be able to // read cached memory from the object file. if (!resolved_addr.IsSectionOffset()) return 0; } } if (!prefer_file_cache && resolved_addr.IsSectionOffset()) { // If we didn't already try and read from the object file cache, then // try it after failing to read from the process. return ReadMemoryFromFileCache(resolved_addr, dst, dst_len, error); } return 0; } size_t Target::ReadCStringFromMemory(const Address &addr, std::string &out_str, Error &error) { char buf[256]; out_str.clear(); addr_t curr_addr = addr.GetLoadAddress(this); Address address(addr); while (1) { size_t length = ReadCStringFromMemory(address, buf, sizeof(buf), error); if (length == 0) break; out_str.append(buf, length); // If we got "length - 1" bytes, we didn't get the whole C string, we // need to read some more characters if (length == sizeof(buf) - 1) curr_addr += length; else break; address = Address(curr_addr); } return out_str.size(); } size_t Target::ReadCStringFromMemory(const Address &addr, char *dst, size_t dst_max_len, Error &result_error) { size_t total_cstr_len = 0; if (dst && dst_max_len) { result_error.Clear(); // NULL out everything just to be safe memset(dst, 0, dst_max_len); Error error; addr_t curr_addr = addr.GetLoadAddress(this); Address address(addr); // We could call m_process_sp->GetMemoryCacheLineSize() but I don't // think this really needs to be tied to the memory cache subsystem's // cache line size, so leave this as a fixed constant. const size_t cache_line_size = 512; size_t bytes_left = dst_max_len - 1; char *curr_dst = dst; while (bytes_left > 0) { addr_t cache_line_bytes_left = cache_line_size - (curr_addr % cache_line_size); addr_t bytes_to_read = std::min(bytes_left, cache_line_bytes_left); size_t bytes_read = ReadMemory(address, false, curr_dst, bytes_to_read, error); if (bytes_read == 0) { result_error = error; dst[total_cstr_len] = '\0'; break; } const size_t len = strlen(curr_dst); total_cstr_len += len; if (len < bytes_to_read) break; curr_dst += bytes_read; curr_addr += bytes_read; bytes_left -= bytes_read; address = Address(curr_addr); } } else { if (dst == nullptr) result_error.SetErrorString("invalid arguments"); else result_error.Clear(); } return total_cstr_len; } size_t Target::ReadScalarIntegerFromMemory(const Address &addr, bool prefer_file_cache, uint32_t byte_size, bool is_signed, Scalar &scalar, Error &error) { uint64_t uval; if (byte_size <= sizeof(uval)) { size_t bytes_read = ReadMemory(addr, prefer_file_cache, &uval, byte_size, error); if (bytes_read == byte_size) { DataExtractor data(&uval, sizeof(uval), m_arch.GetByteOrder(), m_arch.GetAddressByteSize()); lldb::offset_t offset = 0; if (byte_size <= 4) scalar = data.GetMaxU32(&offset, byte_size); else scalar = data.GetMaxU64(&offset, byte_size); if (is_signed) scalar.SignExtend(byte_size * 8); return bytes_read; } } else { error.SetErrorStringWithFormat( "byte size of %u is too large for integer scalar type", byte_size); } return 0; } uint64_t Target::ReadUnsignedIntegerFromMemory(const Address &addr, bool prefer_file_cache, size_t integer_byte_size, uint64_t fail_value, Error &error) { Scalar scalar; if (ReadScalarIntegerFromMemory(addr, prefer_file_cache, integer_byte_size, false, scalar, error)) return scalar.ULongLong(fail_value); return fail_value; } bool Target::ReadPointerFromMemory(const Address &addr, bool prefer_file_cache, Error &error, Address &pointer_addr) { Scalar scalar; if (ReadScalarIntegerFromMemory(addr, prefer_file_cache, m_arch.GetAddressByteSize(), false, scalar, error)) { addr_t pointer_vm_addr = scalar.ULongLong(LLDB_INVALID_ADDRESS); if (pointer_vm_addr != LLDB_INVALID_ADDRESS) { SectionLoadList §ion_load_list = GetSectionLoadList(); if (section_load_list.IsEmpty()) { // No sections are loaded, so we must assume we are not running // yet and anything we are given is a file address. m_images.ResolveFileAddress(pointer_vm_addr, pointer_addr); } else { // We have at least one section loaded. This can be because // we have manually loaded some sections with "target modules load ..." // or because we have have a live process that has sections loaded // through the dynamic loader section_load_list.ResolveLoadAddress(pointer_vm_addr, pointer_addr); } // We weren't able to resolve the pointer value, so just return // an address with no section if (!pointer_addr.IsValid()) pointer_addr.SetOffset(pointer_vm_addr); return true; } } return false; } ModuleSP Target::GetSharedModule(const ModuleSpec &module_spec, Error *error_ptr) { ModuleSP module_sp; Error error; // First see if we already have this module in our module list. If we do, // then we're done, we don't need // to consult the shared modules list. But only do this if we are passed a // UUID. if (module_spec.GetUUID().IsValid()) module_sp = m_images.FindFirstModule(module_spec); if (!module_sp) { ModuleSP old_module_sp; // This will get filled in if we have a new version // of the library bool did_create_module = false; // If there are image search path entries, try to use them first to acquire // a suitable image. if (m_image_search_paths.GetSize()) { ModuleSpec transformed_spec(module_spec); if (m_image_search_paths.RemapPath( module_spec.GetFileSpec().GetDirectory(), transformed_spec.GetFileSpec().GetDirectory())) { transformed_spec.GetFileSpec().GetFilename() = module_spec.GetFileSpec().GetFilename(); error = ModuleList::GetSharedModule(transformed_spec, module_sp, &GetExecutableSearchPaths(), &old_module_sp, &did_create_module); } } if (!module_sp) { // If we have a UUID, we can check our global shared module list in case // we already have it. If we don't have a valid UUID, then we can't since // the path in "module_spec" will be a platform path, and we will need to // let the platform find that file. For example, we could be asking for // "/usr/lib/dyld" and if we do not have a UUID, we don't want to pick // the local copy of "/usr/lib/dyld" since our platform could be a remote // platform that has its own "/usr/lib/dyld" in an SDK or in a local file // 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, &GetExecutableSearchPaths(), &old_module_sp, &did_create_module); } if (!module_sp) { // The platform is responsible for finding and caching an appropriate // module in the shared module cache. if (m_platform_sp) { error = m_platform_sp->GetSharedModule( module_spec, m_process_sp.get(), module_sp, &GetExecutableSearchPaths(), &old_module_sp, &did_create_module); } else { error.SetErrorString("no platform is currently set"); } } } // We found a module that wasn't in our target list. Let's make sure that // there wasn't an equivalent // module in the list already, and if there was, let's remove it. if (module_sp) { ObjectFile *objfile = module_sp->GetObjectFile(); if (objfile) { switch (objfile->GetType()) { case ObjectFile::eTypeCoreFile: /// A core file that has a checkpoint of /// a program's execution state case ObjectFile::eTypeExecutable: /// A normal executable case ObjectFile::eTypeDynamicLinker: /// The platform's dynamic linker /// executable case ObjectFile::eTypeObjectFile: /// An intermediate object file case ObjectFile::eTypeSharedLibrary: /// A shared library that can be /// used during execution break; case ObjectFile::eTypeDebugInfo: /// An object file that contains only /// debug information if (error_ptr) error_ptr->SetErrorString("debug info files aren't valid target " "modules, please specify an executable"); return ModuleSP(); case ObjectFile::eTypeStubLibrary: /// A library that can be linked /// against but not used for /// execution if (error_ptr) error_ptr->SetErrorString("stub libraries aren't valid target " "modules, please specify an executable"); return ModuleSP(); default: if (error_ptr) error_ptr->SetErrorString( "unsupported file type, please specify an executable"); return ModuleSP(); } // GetSharedModule is not guaranteed to find the old shared module, for // instance // in the common case where you pass in the UUID, it is only going to // find the one // module matching the UUID. In fact, it has no good way to know what // the "old module" // relevant to this target is, since there might be many copies of a // module with this file spec // in various running debug sessions, but only one of them will belong // to this target. // So let's remove the UUID from the module list, and look in the // target's module list. // Only do this if there is SOMETHING else in the module spec... if (!old_module_sp) { if (module_spec.GetUUID().IsValid() && !module_spec.GetFileSpec().GetFilename().IsEmpty() && !module_spec.GetFileSpec().GetDirectory().IsEmpty()) { ModuleSpec module_spec_copy(module_spec.GetFileSpec()); module_spec_copy.GetUUID().Clear(); ModuleList found_modules; size_t num_found = m_images.FindModules(module_spec_copy, found_modules); if (num_found == 1) { old_module_sp = found_modules.GetModuleAtIndex(0); } } } + // Preload symbols outside of any lock, so hopefully we can do this for + // each library in parallel. + if (GetPreloadSymbols()) + module_sp->PreloadSymbols(); + 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(); ModuleList::RemoveSharedModuleIfOrphaned(old_module_ptr); } else m_images.Append(module_sp); } else module_sp.reset(); } } if (error_ptr) *error_ptr = error; return module_sp; } TargetSP Target::CalculateTarget() { return shared_from_this(); } ProcessSP Target::CalculateProcess() { return m_process_sp; } ThreadSP Target::CalculateThread() { return ThreadSP(); } StackFrameSP Target::CalculateStackFrame() { return StackFrameSP(); } void Target::CalculateExecutionContext(ExecutionContext &exe_ctx) { exe_ctx.Clear(); exe_ctx.SetTargetPtr(this); } PathMappingList &Target::GetImageSearchPathList() { return m_image_search_paths; } void Target::ImageSearchPathsChanged(const PathMappingList &path_list, void *baton) { Target *target = (Target *)baton; ModuleSP exe_module_sp(target->GetExecutableModule()); if (exe_module_sp) target->SetExecutableModule(exe_module_sp, true); } TypeSystem *Target::GetScratchTypeSystemForLanguage(Error *error, lldb::LanguageType language, bool create_on_demand) { if (!m_valid) return nullptr; if (error) { error->Clear(); } if (language == eLanguageTypeMipsAssembler // GNU AS and LLVM use it for all // assembly code || language == eLanguageTypeUnknown) { std::set languages_for_types; std::set languages_for_expressions; Language::GetLanguagesSupportingTypeSystems(languages_for_types, languages_for_expressions); if (languages_for_expressions.count(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(); } } } return m_scratch_type_system_map.GetTypeSystemForLanguage(language, this, create_on_demand); } PersistentExpressionState * Target::GetPersistentExpressionStateForLanguage(lldb::LanguageType language) { TypeSystem *type_system = GetScratchTypeSystemForLanguage(nullptr, language, true); if (type_system) { return type_system->GetPersistentExpressionState(); } else { return nullptr; } } UserExpression *Target::GetUserExpressionForLanguage( llvm::StringRef expr, llvm::StringRef prefix, lldb::LanguageType language, Expression::ResultType desired_type, const EvaluateExpressionOptions &options, Error &error) { Error type_system_error; TypeSystem *type_system = GetScratchTypeSystemForLanguage(&type_system_error, language); UserExpression *user_expr = nullptr; if (!type_system) { error.SetErrorStringWithFormat( "Could not find type system for language %s: %s", Language::GetNameForLanguageType(language), type_system_error.AsCString()); return nullptr; } user_expr = type_system->GetUserExpression(expr, prefix, language, desired_type, options); if (!user_expr) error.SetErrorStringWithFormat( "Could not create an expression for language %s", Language::GetNameForLanguageType(language)); return user_expr; } FunctionCaller *Target::GetFunctionCallerForLanguage( lldb::LanguageType language, const CompilerType &return_type, const Address &function_address, const ValueList &arg_value_list, const char *name, Error &error) { Error type_system_error; TypeSystem *type_system = GetScratchTypeSystemForLanguage(&type_system_error, language); FunctionCaller *persistent_fn = nullptr; if (!type_system) { error.SetErrorStringWithFormat( "Could not find type system for language %s: %s", Language::GetNameForLanguageType(language), type_system_error.AsCString()); return persistent_fn; } persistent_fn = type_system->GetFunctionCaller(return_type, function_address, arg_value_list, name); if (!persistent_fn) error.SetErrorStringWithFormat( "Could not create an expression for language %s", Language::GetNameForLanguageType(language)); return persistent_fn; } UtilityFunction * Target::GetUtilityFunctionForLanguage(const char *text, lldb::LanguageType language, const char *name, Error &error) { Error type_system_error; TypeSystem *type_system = GetScratchTypeSystemForLanguage(&type_system_error, language); UtilityFunction *utility_fn = nullptr; if (!type_system) { error.SetErrorStringWithFormat( "Could not find type system for language %s: %s", Language::GetNameForLanguageType(language), type_system_error.AsCString()); return utility_fn; } utility_fn = type_system->GetUtilityFunction(text, name); if (!utility_fn) error.SetErrorStringWithFormat( "Could not create an expression for language %s", Language::GetNameForLanguageType(language)); 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(type_system); } return nullptr; } ClangASTImporterSP Target::GetClangASTImporter() { if (m_valid) { if (!m_ast_importer_sp) { m_ast_importer_sp.reset(new ClangASTImporter()); } return m_ast_importer_sp; } return ClangASTImporterSP(); } void Target::SettingsInitialize() { Process::SettingsInitialize(); } void Target::SettingsTerminate() { Process::SettingsTerminate(); } FileSpecList Target::GetDefaultExecutableSearchPaths() { TargetPropertiesSP properties_sp(Target::GetGlobalProperties()); if (properties_sp) return properties_sp->GetExecutableSearchPaths(); return FileSpecList(); } FileSpecList Target::GetDefaultDebugFileSearchPaths() { TargetPropertiesSP properties_sp(Target::GetGlobalProperties()); if (properties_sp) return properties_sp->GetDebugFileSearchPaths(); return FileSpecList(); } FileSpecList Target::GetDefaultClangModuleSearchPaths() { TargetPropertiesSP properties_sp(Target::GetGlobalProperties()); if (properties_sp) return properties_sp->GetClangModuleSearchPaths(); return FileSpecList(); } ArchSpec Target::GetDefaultArchitecture() { TargetPropertiesSP properties_sp(Target::GetGlobalProperties()); if (properties_sp) return properties_sp->GetDefaultArchitecture(); return ArchSpec(); } 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()); return properties_sp->SetDefaultArchitecture(arch); } } Target *Target::GetTargetFromContexts(const ExecutionContext *exe_ctx_ptr, const SymbolContext *sc_ptr) { // The target can either exist in the "process" of ExecutionContext, or in // the "target_sp" member of SymbolContext. This accessor helper function // will get the target from one of these locations. Target *target = nullptr; if (sc_ptr != nullptr) target = sc_ptr->target_sp.get(); if (target == nullptr && exe_ctx_ptr) target = exe_ctx_ptr->GetTargetPtr(); return target; } ExpressionResults Target::EvaluateExpression( llvm::StringRef expr, ExecutionContextScope *exe_scope, lldb::ValueObjectSP &result_valobj_sp, const EvaluateExpressionOptions &options, std::string *fixed_expression) { result_valobj_sp.reset(); ExpressionResults execution_results = eExpressionSetupError; if (expr.empty()) return execution_results; // We shouldn't run stop hooks in expressions. // Be sure to reset this if you return anywhere within this function. bool old_suppress_value = m_suppress_stop_hooks; m_suppress_stop_hooks = true; ExecutionContext exe_ctx; if (exe_scope) { exe_scope->CalculateExecutionContext(exe_ctx); } else if (m_process_sp) { m_process_sp->CalculateExecutionContext(exe_ctx); } else { CalculateExecutionContext(exe_ctx); } // 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); if (persistent_var_sp) { result_valobj_sp = persistent_var_sp->GetValueObject(); execution_results = eExpressionCompleted; } else { const char *prefix = GetExpressionPrefixContentsAsCString(); Error error; execution_results = UserExpression::Evaluate(exe_ctx, options, expr, prefix, result_valobj_sp, error, 0, // Line Number fixed_expression); } m_suppress_stop_hooks = old_suppress_value; return execution_results; } lldb::ExpressionVariableSP Target::GetPersistentVariable(const ConstString &name) { lldb::ExpressionVariableSP variable_sp; m_scratch_type_system_map.ForEach( [name, &variable_sp](TypeSystem *type_system) -> bool { if (PersistentExpressionState *persistent_state = type_system->GetPersistentExpressionState()) { variable_sp = persistent_state->GetVariable(name); if (variable_sp) return false; // Stop iterating the ForEach } return true; // Keep iterating the ForEach }); return variable_sp; } lldb::addr_t Target::GetPersistentSymbol(const ConstString &name) { lldb::addr_t address = LLDB_INVALID_ADDRESS; m_scratch_type_system_map.ForEach( [name, &address](TypeSystem *type_system) -> bool { if (PersistentExpressionState *persistent_state = type_system->GetPersistentExpressionState()) { address = persistent_state->LookupSymbol(name); if (address != LLDB_INVALID_ADDRESS) return false; // Stop iterating the ForEach } return true; // Keep iterating the ForEach }); return address; } lldb::addr_t Target::GetCallableLoadAddress(lldb::addr_t load_addr, AddressClass addr_class) const { addr_t code_addr = load_addr; switch (m_arch.GetMachine()) { case llvm::Triple::mips: case llvm::Triple::mipsel: case llvm::Triple::mips64: case llvm::Triple::mips64el: switch (addr_class) { case eAddressClassData: case eAddressClassDebug: return LLDB_INVALID_ADDRESS; case eAddressClassUnknown: case eAddressClassInvalid: case eAddressClassCode: case eAddressClassCodeAlternateISA: case eAddressClassRuntime: if ((code_addr & 2ull) || (addr_class == eAddressClassCodeAlternateISA)) code_addr |= 1ull; break; } break; case llvm::Triple::arm: case llvm::Triple::thumb: switch (addr_class) { case eAddressClassData: case eAddressClassDebug: return LLDB_INVALID_ADDRESS; case eAddressClassUnknown: case eAddressClassInvalid: case eAddressClassCode: case eAddressClassCodeAlternateISA: case eAddressClassRuntime: // Check if bit zero it no set? if ((code_addr & 1ull) == 0) { // Bit zero isn't set, check if the address is a multiple of 2? if (code_addr & 2ull) { // The address is a multiple of 2 so it must be thumb, set bit zero code_addr |= 1ull; } else if (addr_class == eAddressClassCodeAlternateISA) { // We checked the address and the address claims to be the alternate // ISA // which means thumb, so set bit zero. code_addr |= 1ull; } } break; } break; default: break; } return code_addr; } lldb::addr_t Target::GetOpcodeLoadAddress(lldb::addr_t load_addr, AddressClass addr_class) const { addr_t opcode_addr = load_addr; switch (m_arch.GetMachine()) { case llvm::Triple::mips: case llvm::Triple::mipsel: case llvm::Triple::mips64: case llvm::Triple::mips64el: case llvm::Triple::arm: case llvm::Triple::thumb: switch (addr_class) { case eAddressClassData: case eAddressClassDebug: return LLDB_INVALID_ADDRESS; case eAddressClassInvalid: case eAddressClassUnknown: case eAddressClassCode: case eAddressClassCodeAlternateISA: case eAddressClassRuntime: opcode_addr &= ~(1ull); break; } break; default: break; } return opcode_addr; } lldb::addr_t Target::GetBreakableLoadAddress(lldb::addr_t addr) { addr_t breakable_addr = addr; Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_BREAKPOINTS)); switch (m_arch.GetMachine()) { default: break; case llvm::Triple::mips: case llvm::Triple::mipsel: case llvm::Triple::mips64: case llvm::Triple::mips64el: { addr_t function_start = 0; addr_t current_offset = 0; uint32_t loop_count = 0; Address resolved_addr; uint32_t arch_flags = m_arch.GetFlags(); bool IsMips16 = arch_flags & ArchSpec::eMIPSAse_mips16; bool IsMicromips = arch_flags & ArchSpec::eMIPSAse_micromips; SectionLoadList §ion_load_list = GetSectionLoadList(); if (section_load_list.IsEmpty()) // No sections are loaded, so we must assume we are not running yet // and need to operate only on file address. m_images.ResolveFileAddress(addr, resolved_addr); else section_load_list.ResolveLoadAddress(addr, resolved_addr); // Get the function boundaries to make sure we don't scan back before the // beginning of the current function. ModuleSP temp_addr_module_sp(resolved_addr.GetModule()); if (temp_addr_module_sp) { SymbolContext sc; uint32_t resolve_scope = eSymbolContextFunction | eSymbolContextSymbol; temp_addr_module_sp->ResolveSymbolContextForAddress(resolved_addr, resolve_scope, sc); Address sym_addr; if (sc.function) sym_addr = sc.function->GetAddressRange().GetBaseAddress(); else if (sc.symbol) sym_addr = sc.symbol->GetAddress(); function_start = sym_addr.GetLoadAddress(this); if (function_start == LLDB_INVALID_ADDRESS) function_start = sym_addr.GetFileAddress(); if (function_start) current_offset = addr - function_start; } // If breakpoint address is start of function then we dont have to do // anything. if (current_offset == 0) return breakable_addr; else loop_count = current_offset / 2; if (loop_count > 3) { // Scan previous 6 bytes if (IsMips16 | IsMicromips) loop_count = 3; // For mips-only, instructions are always 4 bytes, so scan previous 4 // bytes only. else loop_count = 2; } // Create Disassembler Instance lldb::DisassemblerSP disasm_sp( Disassembler::FindPlugin(m_arch, nullptr, nullptr)); ExecutionContext exe_ctx; CalculateExecutionContext(exe_ctx); InstructionList instruction_list; InstructionSP prev_insn; bool prefer_file_cache = true; // Read from file uint32_t inst_to_choose = 0; for (uint32_t i = 1; i <= loop_count; i++) { // Adjust the address to read from. resolved_addr.Slide(-2); AddressRange range(resolved_addr, i * 2); uint32_t insn_size = 0; disasm_sp->ParseInstructions(&exe_ctx, range, nullptr, prefer_file_cache); uint32_t num_insns = disasm_sp->GetInstructionList().GetSize(); if (num_insns) { prev_insn = disasm_sp->GetInstructionList().GetInstructionAtIndex(0); insn_size = prev_insn->GetOpcode().GetByteSize(); if (i == 1 && insn_size == 2) { // This looks like a valid 2-byte instruction (but it could be a part // of upper 4 byte instruction). instruction_list.Append(prev_insn); inst_to_choose = 1; } else if (i == 2) { // Here we may get one 4-byte instruction or two 2-byte instructions. if (num_insns == 2) { // Looks like there are two 2-byte instructions above our breakpoint // target address. // Now the upper 2-byte instruction is either a valid 2-byte // instruction or could be a part of it's upper 4-byte instruction. // In both cases we don't care because in this case lower 2-byte // instruction is definitely a valid instruction // and whatever i=1 iteration has found out is true. inst_to_choose = 1; break; } else if (insn_size == 4) { // This instruction claims its a valid 4-byte instruction. But it // could be a part of it's upper 4-byte instruction. // Lets try scanning upper 2 bytes to verify this. instruction_list.Append(prev_insn); inst_to_choose = 2; } } else if (i == 3) { if (insn_size == 4) // FIXME: We reached here that means instruction at [target - 4] has // already claimed to be a 4-byte instruction, // and now instruction at [target - 6] is also claiming that it's a // 4-byte instruction. This can not be true. // In this case we can not decide the valid previous instruction so // we let lldb set the breakpoint at the address given by user. inst_to_choose = 0; else // This is straight-forward inst_to_choose = 2; break; } } else { // Decode failed, bytes do not form a valid instruction. So whatever // previous iteration has found out is true. if (i > 1) { inst_to_choose = i - 1; break; } } } // Check if we are able to find any valid instruction. if (inst_to_choose) { if (inst_to_choose > instruction_list.GetSize()) inst_to_choose--; prev_insn = instruction_list.GetInstructionAtIndex(inst_to_choose - 1); if (prev_insn->HasDelaySlot()) { uint32_t shift_size = prev_insn->GetOpcode().GetByteSize(); // Adjust the breakable address breakable_addr = addr - shift_size; 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); } } break; } } return breakable_addr; } SourceManager &Target::GetSourceManager() { if (!m_source_manager_ap) m_source_manager_ap.reset(new SourceManager(shared_from_this())); return *m_source_manager_ap; } ClangModulesDeclVendor *Target::GetClangModulesDeclVendor() { static std::mutex s_clang_modules_decl_vendor_mutex; // If this is contended // we can make it // per-target { std::lock_guard guard(s_clang_modules_decl_vendor_mutex); if (!m_clang_modules_decl_vendor_ap) { m_clang_modules_decl_vendor_ap.reset( ClangModulesDeclVendor::Create(*this)); } } return m_clang_modules_decl_vendor_ap.get(); } Target::StopHookSP Target::CreateStopHook() { lldb::user_id_t new_uid = ++m_stop_hook_next_id; Target::StopHookSP stop_hook_sp(new StopHook(shared_from_this(), new_uid)); m_stop_hooks[new_uid] = stop_hook_sp; return stop_hook_sp; } bool Target::RemoveStopHookByID(lldb::user_id_t user_id) { size_t num_removed = m_stop_hooks.erase(user_id); return (num_removed != 0); } void Target::RemoveAllStopHooks() { m_stop_hooks.clear(); } Target::StopHookSP Target::GetStopHookByID(lldb::user_id_t user_id) { StopHookSP found_hook; StopHookCollection::iterator specified_hook_iter; specified_hook_iter = m_stop_hooks.find(user_id); if (specified_hook_iter != m_stop_hooks.end()) found_hook = (*specified_hook_iter).second; return found_hook; } bool Target::SetStopHookActiveStateByID(lldb::user_id_t user_id, bool active_state) { StopHookCollection::iterator specified_hook_iter; specified_hook_iter = m_stop_hooks.find(user_id); if (specified_hook_iter == m_stop_hooks.end()) return false; (*specified_hook_iter).second->SetIsActive(active_state); return true; } void Target::SetAllStopHooksActiveState(bool active_state) { StopHookCollection::iterator pos, end = m_stop_hooks.end(); for (pos = m_stop_hooks.begin(); pos != end; pos++) { (*pos).second->SetIsActive(active_state); } } void Target::RunStopHooks() { if (m_suppress_stop_hooks) return; if (!m_process_sp) return; // make sure we check that we are not stopped // because of us running a user expression // since in that case we do not want to run the stop-hooks if (m_process_sp->GetModIDRef().IsLastResumeForUserExpression()) return; if (m_stop_hooks.empty()) return; StopHookCollection::iterator pos, end = m_stop_hooks.end(); // If there aren't any active stop hooks, don't bother either: bool any_active_hooks = false; for (pos = m_stop_hooks.begin(); pos != end; pos++) { if ((*pos).second->IsActive()) { any_active_hooks = true; break; } } if (!any_active_hooks) return; CommandReturnObject result; std::vector exc_ctx_with_reasons; std::vector sym_ctx_with_reasons; ThreadList &cur_threadlist = m_process_sp->GetThreadList(); size_t num_threads = cur_threadlist.GetSize(); for (size_t i = 0; i < num_threads; i++) { lldb::ThreadSP cur_thread_sp = cur_threadlist.GetThreadAtIndex(i); if (cur_thread_sp->ThreadStoppedForAReason()) { lldb::StackFrameSP cur_frame_sp = cur_thread_sp->GetStackFrameAtIndex(0); exc_ctx_with_reasons.push_back(ExecutionContext( m_process_sp.get(), cur_thread_sp.get(), cur_frame_sp.get())); sym_ctx_with_reasons.push_back( cur_frame_sp->GetSymbolContext(eSymbolContextEverything)); } } // If no threads stopped for a reason, don't run the stop-hooks. size_t num_exe_ctx = exc_ctx_with_reasons.size(); if (num_exe_ctx == 0) return; result.SetImmediateOutputStream(m_debugger.GetAsyncOutputStream()); result.SetImmediateErrorStream(m_debugger.GetAsyncErrorStream()); bool keep_going = true; bool hooks_ran = false; bool print_hook_header = (m_stop_hooks.size() != 1); bool print_thread_header = (num_exe_ctx != 1); for (pos = m_stop_hooks.begin(); keep_going && pos != end; pos++) { // result.Clear(); StopHookSP cur_hook_sp = (*pos).second; if (!cur_hook_sp->IsActive()) continue; bool any_thread_matched = false; for (size_t i = 0; keep_going && i < num_exe_ctx; i++) { if ((cur_hook_sp->GetSpecifier() == nullptr || cur_hook_sp->GetSpecifier()->SymbolContextMatches( sym_ctx_with_reasons[i])) && (cur_hook_sp->GetThreadSpecifier() == nullptr || cur_hook_sp->GetThreadSpecifier()->ThreadPassesBasicTests( exc_ctx_with_reasons[i].GetThreadRef()))) { if (!hooks_ran) { hooks_ran = true; } if (print_hook_header && !any_thread_matched) { const char *cmd = (cur_hook_sp->GetCommands().GetSize() == 1 ? cur_hook_sp->GetCommands().GetStringAtIndex(0) : nullptr); if (cmd) result.AppendMessageWithFormat("\n- Hook %" PRIu64 " (%s)\n", cur_hook_sp->GetID(), cmd); else result.AppendMessageWithFormat("\n- Hook %" PRIu64 "\n", cur_hook_sp->GetID()); any_thread_matched = true; } if (print_thread_header) result.AppendMessageWithFormat( "-- Thread %d\n", exc_ctx_with_reasons[i].GetThreadPtr()->GetIndexID()); CommandInterpreterRunOptions options; options.SetStopOnContinue(true); options.SetStopOnError(true); options.SetEchoCommands(false); options.SetPrintResults(true); options.SetAddToHistory(false); GetDebugger().GetCommandInterpreter().HandleCommands( cur_hook_sp->GetCommands(), &exc_ctx_with_reasons[i], options, result); // If the command started the target going again, we should bag out of // running the stop hooks. if ((result.GetStatus() == eReturnStatusSuccessContinuingNoResult) || (result.GetStatus() == eReturnStatusSuccessContinuingResult)) { result.AppendMessageWithFormat("Aborting stop hooks, hook %" PRIu64 " set the program running.", cur_hook_sp->GetID()); keep_going = false; } } } } result.GetImmediateOutputStream()->Flush(); result.GetImmediateErrorStream()->Flush(); } const TargetPropertiesSP &Target::GetGlobalProperties() { // NOTE: intentional leak so we don't crash if global destructor chain gets // called as other threads still use the result of this function static TargetPropertiesSP *g_settings_sp_ptr = new TargetPropertiesSP(new TargetProperties(nullptr)); return *g_settings_sp_ptr; } Error Target::Install(ProcessLaunchInfo *launch_info) { Error error; PlatformSP platform_sp(GetPlatform()); if (platform_sp) { if (platform_sp->IsRemote()) { if (platform_sp->IsConnected()) { // Install all files that have an install path, and always install the // main executable when connected to a remote platform 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) { const bool is_main_executable = module_sp == GetExecutableModule(); FileSpec local_file(module_sp->GetFileSpec()); if (local_file) { FileSpec remote_file(module_sp->GetRemoteInstallFileSpec()); if (!remote_file) { if (is_main_executable) // TODO: add setting for always // installing main executable??? { // Always install the main executable remote_file = platform_sp->GetRemoteWorkingDirectory(); remote_file.AppendPathComponent( module_sp->GetFileSpec().GetFilename().GetCString()); } } if (remote_file) { error = platform_sp->Install(local_file, remote_file); if (error.Success()) { module_sp->SetPlatformFileSpec(remote_file); if (is_main_executable) { platform_sp->SetFilePermissions(remote_file, 0700); if (launch_info) launch_info->SetExecutableFile(remote_file, false); } } else break; } } } } } } } return error; } bool Target::ResolveLoadAddress(addr_t load_addr, Address &so_addr, uint32_t stop_id) { return m_section_load_history.ResolveLoadAddress(stop_id, load_addr, so_addr); } bool Target::ResolveFileAddress(lldb::addr_t file_addr, Address &resolved_addr) { return m_images.ResolveFileAddress(file_addr, resolved_addr); } bool Target::SetSectionLoadAddress(const SectionSP §ion_sp, addr_t new_section_load_addr, bool warn_multiple) { const addr_t old_section_load_addr = m_section_load_history.GetSectionLoadAddress( SectionLoadHistory::eStopIDNow, section_sp); if (old_section_load_addr != new_section_load_addr) { uint32_t stop_id = 0; ProcessSP process_sp(GetProcessSP()); if (process_sp) stop_id = process_sp->GetStopID(); else stop_id = m_section_load_history.GetLastStopID(); if (m_section_load_history.SetSectionLoadAddress( stop_id, section_sp, new_section_load_addr, warn_multiple)) return true; // Return true if the section load address was changed... } return false; // Return false to indicate nothing changed } size_t Target::UnloadModuleSections(const ModuleList &module_list) { size_t section_unload_count = 0; size_t num_modules = module_list.GetSize(); for (size_t i = 0; i < num_modules; ++i) { section_unload_count += UnloadModuleSections(module_list.GetModuleAtIndex(i)); } return section_unload_count; } size_t Target::UnloadModuleSections(const lldb::ModuleSP &module_sp) { uint32_t stop_id = 0; ProcessSP process_sp(GetProcessSP()); if (process_sp) stop_id = process_sp->GetStopID(); else stop_id = m_section_load_history.GetLastStopID(); SectionList *sections = module_sp->GetSectionList(); size_t section_unload_count = 0; if (sections) { const uint32_t num_sections = sections->GetNumSections(0); for (uint32_t i = 0; i < num_sections; ++i) { section_unload_count += m_section_load_history.SetSectionUnloaded( stop_id, sections->GetSectionAtIndex(i)); } } return section_unload_count; } bool Target::SetSectionUnloaded(const lldb::SectionSP §ion_sp) { uint32_t stop_id = 0; ProcessSP process_sp(GetProcessSP()); if (process_sp) stop_id = process_sp->GetStopID(); else stop_id = m_section_load_history.GetLastStopID(); return m_section_load_history.SetSectionUnloaded(stop_id, section_sp); } bool Target::SetSectionUnloaded(const lldb::SectionSP §ion_sp, addr_t load_addr) { uint32_t stop_id = 0; ProcessSP process_sp(GetProcessSP()); if (process_sp) stop_id = process_sp->GetStopID(); else stop_id = m_section_load_history.GetLastStopID(); return m_section_load_history.SetSectionUnloaded(stop_id, section_sp, load_addr); } void Target::ClearAllLoadedSections() { m_section_load_history.Clear(); } Error Target::Launch(ProcessLaunchInfo &launch_info, Stream *stream) { Error 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()); StateType state = eStateInvalid; // Scope to temporarily get the process state in case someone has manually // remotely connected already to a process and we can skip the platform // launching. { ProcessSP process_sp(GetProcessSP()); 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)); } else { if (log) log->Printf("Target::%s the process instance doesn't currently exist.", __FUNCTION__); } } launch_info.GetFlags().Set(eLaunchFlagDebug); // Get the value of synchronous execution here. If you wait till after you // have started to // run, then you could have hit a breakpoint, whose command might switch the // value, and // then you'll pick up that incorrect value. Debugger &debugger = GetDebugger(); const bool synchronous_execution = debugger.GetCommandInterpreter().GetSynchronous(); PlatformSP platform_sp(GetPlatform()); // Finalize the file actions, and if none were given, default to opening // up a pseudo terminal const bool default_to_use_pty = platform_sp ? platform_sp->IsHost() : false; if (log) log->Printf("Target::%s have platform=%s, platform_sp->IsHost()=%s, " "default_to_use_pty=%s", __FUNCTION__, platform_sp ? "true" : "false", platform_sp ? (platform_sp->IsHost() ? "true" : "false") : "n/a", default_to_use_pty ? "true" : "false"); launch_info.FinalizeFileActions(this, default_to_use_pty); if (state == eStateConnected) { if (launch_info.GetFlags().Test(eLaunchFlagLaunchInTTY)) { error.SetErrorString( "can't launch in tty when launching through a remote connection"); return error; } } if (!launch_info.GetArchitecture().IsValid()) launch_info.GetArchitecture() = GetArchitecture(); // If we're not already connected to the process, and if we have a platform // 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__); // Get a weak pointer to the previous process if we have one ProcessWP process_wp; if (m_process_sp) process_wp = m_process_sp; m_process_sp = GetPlatform()->DebugProcess(launch_info, debugger, this, error); // Cleanup the old process since someone might still have a strong // reference to this process and we would like to allow it to cleanup // as much as it can without the object being destroyed. We try to // lock the shared pointer and if that works, then someone else still // has a strong reference to the process. ProcessSP old_process_sp(process_wp.lock()); if (old_process_sp) old_process_sp->Finalize(); } 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__); if (state == eStateConnected) { assert(m_process_sp); } else { // Use a Process plugin to construct the process. const char *plugin_name = launch_info.GetProcessPluginName(); CreateProcess(launch_info.GetListenerForProcess(debugger), plugin_name, nullptr); } // Since we didn't have a platform launch the process, launch it here. if (m_process_sp) error = m_process_sp->Launch(launch_info); } if (!m_process_sp) { if (error.Success()) error.SetErrorString("failed to launch or debug process"); return error; } if (error.Success()) { if (synchronous_execution || !launch_info.GetFlags().Test(eLaunchFlagStopAtEntry)) { ListenerSP hijack_listener_sp(launch_info.GetHijackListener()); if (!hijack_listener_sp) { hijack_listener_sp = Listener::MakeListener("lldb.Target.Launch.hijack"); launch_info.SetHijackListener(hijack_listener_sp); m_process_sp->HijackProcessEvents(hijack_listener_sp); } StateType state = m_process_sp->WaitForProcessToStop( llvm::None, nullptr, false, hijack_listener_sp, nullptr); if (state == eStateStopped) { if (!launch_info.GetFlags().Test(eLaunchFlagStopAtEntry)) { if (synchronous_execution) { error = m_process_sp->PrivateResume(); if (error.Success()) { state = m_process_sp->WaitForProcessToStop( llvm::None, nullptr, true, hijack_listener_sp, stream); const bool must_be_alive = false; // eStateExited is ok, so this must be false if (!StateIsStoppedState(state, must_be_alive)) { error.SetErrorStringWithFormat("process isn't stopped: %s", StateAsCString(state)); } } } else { m_process_sp->RestoreProcessEvents(); error = m_process_sp->PrivateResume(); } if (!error.Success()) { Error error2; error2.SetErrorStringWithFormat( "process resume at entry point failed: %s", error.AsCString()); error = error2; } } } else if (state == eStateExited) { bool with_shell = !!launch_info.GetShell(); const int exit_status = m_process_sp->GetExitStatus(); const char *exit_desc = m_process_sp->GetExitDescription(); #define LAUNCH_SHELL_MESSAGE \ "\n'r' and 'run' are aliases that default to launching through a " \ "shell.\nTry launching without going through a shell by using 'process " \ "launch'." if (exit_desc && exit_desc[0]) { if (with_shell) error.SetErrorStringWithFormat( "process exited with status %i (%s)" LAUNCH_SHELL_MESSAGE, exit_status, exit_desc); else error.SetErrorStringWithFormat("process exited with status %i (%s)", exit_status, exit_desc); } else { if (with_shell) error.SetErrorStringWithFormat( "process exited with status %i" LAUNCH_SHELL_MESSAGE, exit_status); else error.SetErrorStringWithFormat("process exited with status %i", exit_status); } } else { error.SetErrorStringWithFormat( "initial process state wasn't stopped: %s", StateAsCString(state)); } } m_process_sp->RestoreProcessEvents(); } else { Error error2; error2.SetErrorStringWithFormat("process launch failed: %s", error.AsCString()); error = error2; } return error; } Error Target::Attach(ProcessAttachInfo &attach_info, Stream *stream) { auto state = eStateInvalid; auto process_sp = GetProcessSP(); if (process_sp) { state = process_sp->GetState(); if (process_sp->IsAlive() && state != eStateConnected) { if (state == eStateAttaching) return Error("process attach is in progress"); return Error("a process is already being debugged"); } } const ModuleSP old_exec_module_sp = GetExecutableModule(); // If no process info was specified, then use the target executable // name as the process to attach to by default if (!attach_info.ProcessInfoSpecified()) { if (old_exec_module_sp) attach_info.GetExecutableFile().GetFilename() = old_exec_module_sp->GetPlatformFileSpec().GetFilename(); if (!attach_info.ProcessInfoSpecified()) { return Error("no process specified, create a target with a file, or " "specify the --pid or --name"); } } const auto platform_sp = GetDebugger().GetPlatformList().GetSelectedPlatform(); ListenerSP hijack_listener_sp; const bool async = attach_info.GetAsync(); if (!async) { hijack_listener_sp = Listener::MakeListener("lldb.Target.Attach.attach.hijack"); attach_info.SetHijackListener(hijack_listener_sp); } Error error; if (state != eStateConnected && platform_sp != nullptr && platform_sp->CanDebugProcess()) { SetPlatform(platform_sp); process_sp = platform_sp->Attach(attach_info, GetDebugger(), this, error); } else { if (state != eStateConnected) { const char *plugin_name = attach_info.GetProcessPluginName(); process_sp = CreateProcess(attach_info.GetListenerForProcess(GetDebugger()), plugin_name, nullptr); if (process_sp == nullptr) { error.SetErrorStringWithFormat( "failed to create process using plugin %s", (plugin_name) ? plugin_name : "null"); return error; } } if (hijack_listener_sp) process_sp->HijackProcessEvents(hijack_listener_sp); error = process_sp->Attach(attach_info); } if (error.Success() && process_sp) { if (async) { process_sp->RestoreProcessEvents(); } else { state = process_sp->WaitForProcessToStop( llvm::None, nullptr, false, attach_info.GetHijackListener(), stream); process_sp->RestoreProcessEvents(); if (state != eStateStopped) { const char *exit_desc = process_sp->GetExitDescription(); if (exit_desc) error.SetErrorStringWithFormat("%s", exit_desc); else error.SetErrorString( "process did not stop (no such process or permission problem?)"); process_sp->Destroy(false); } } } return error; } //-------------------------------------------------------------- // Target::StopHook //-------------------------------------------------------------- Target::StopHook::StopHook(lldb::TargetSP target_sp, lldb::user_id_t uid) : UserID(uid), m_target_sp(target_sp), m_commands(), m_specifier_sp(), m_thread_spec_ap(), m_active(true) {} Target::StopHook::StopHook(const StopHook &rhs) : UserID(rhs.GetID()), m_target_sp(rhs.m_target_sp), m_commands(rhs.m_commands), m_specifier_sp(rhs.m_specifier_sp), m_thread_spec_ap(), m_active(rhs.m_active) { if (rhs.m_thread_spec_ap) m_thread_spec_ap.reset(new ThreadSpec(*rhs.m_thread_spec_ap.get())); } Target::StopHook::~StopHook() = default; void Target::StopHook::SetSpecifier(SymbolContextSpecifier *specifier) { m_specifier_sp.reset(specifier); } void Target::StopHook::SetThreadSpecifier(ThreadSpec *specifier) { m_thread_spec_ap.reset(specifier); } void Target::StopHook::GetDescription(Stream *s, lldb::DescriptionLevel level) const { int indent_level = s->GetIndentLevel(); s->SetIndentLevel(indent_level + 2); s->Printf("Hook: %" PRIu64 "\n", GetID()); if (m_active) s->Indent("State: enabled\n"); else s->Indent("State: disabled\n"); if (m_specifier_sp) { s->Indent(); s->PutCString("Specifier:\n"); s->SetIndentLevel(indent_level + 4); m_specifier_sp->GetDescription(s, level); s->SetIndentLevel(indent_level + 2); } if (m_thread_spec_ap) { StreamString tmp; s->Indent("Thread:\n"); m_thread_spec_ap->GetDescription(&tmp, level); s->SetIndentLevel(indent_level + 4); s->Indent(tmp.GetString()); s->PutCString("\n"); s->SetIndentLevel(indent_level + 2); } s->Indent("Commands: \n"); s->SetIndentLevel(indent_level + 4); uint32_t num_commands = m_commands.GetSize(); for (uint32_t i = 0; i < num_commands; i++) { s->Indent(m_commands.GetStringAtIndex(i)); s->PutCString("\n"); } s->SetIndentLevel(indent_level); } //-------------------------------------------------------------- // class TargetProperties //-------------------------------------------------------------- OptionEnumValueElement lldb_private::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."}, {0, nullptr, nullptr}}; static 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)."}, {0, nullptr, nullptr}}; typedef enum x86DisassemblyFlavor { eX86DisFlavorDefault, eX86DisFlavorIntel, eX86DisFlavorATT } x86DisassemblyFlavor; static OptionEnumValueElement g_x86_dis_flavor_value_types[] = { {eX86DisFlavorDefault, "default", "Disassembler default (currently att)."}, {eX86DisFlavorIntel, "intel", "Intel disassembler flavor."}, {eX86DisFlavorATT, "att", "AT&T disassembler flavor."}, {0, nullptr, nullptr}}; static OptionEnumValueElement g_hex_immediate_style_values[] = { {Disassembler::eHexStyleC, "c", "C-style (0xffff)."}, {Disassembler::eHexStyleAsm, "asm", "Asm-style (0ffffh)."}, {0, nullptr, nullptr}}; static 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."}, {0, nullptr, nullptr}}; static 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"}, {0, nullptr, nullptr}}; static 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."}, {0, nullptr, nullptr}}; static PropertyDefinition g_properties[] = { {"default-arch", OptionValue::eTypeArch, true, 0, nullptr, nullptr, "Default architecture to choose, when there's a choice."}, {"move-to-nearest-code", OptionValue::eTypeBoolean, false, true, nullptr, nullptr, "Move breakpoints to nearest code."}, {"language", OptionValue::eTypeLanguage, false, eLanguageTypeUnknown, nullptr, nullptr, "The language to use when interpreting expressions entered in commands."}, {"expr-prefix", OptionValue::eTypeFileSpec, false, 0, nullptr, nullptr, "Path to a file containing expressions to be prepended to all " "expressions."}, {"prefer-dynamic-value", OptionValue::eTypeEnum, false, eDynamicDontRunTarget, nullptr, g_dynamic_value_types, "Should printed values be shown as their dynamic value."}, {"enable-synthetic-value", OptionValue::eTypeBoolean, false, true, nullptr, nullptr, "Should synthetic values be used by default whenever available."}, {"skip-prologue", OptionValue::eTypeBoolean, false, true, nullptr, nullptr, "Skip function prologues when setting breakpoints by name."}, {"source-map", OptionValue::eTypePathMap, false, 0, nullptr, 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, 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, nullptr, "List of directories to be searched when locating debug symbol files."}, {"clang-module-search-paths", OptionValue::eTypeFileSpecList, false, 0, nullptr, nullptr, "List of directories to be searched when locating modules for Clang."}, {"auto-import-clang-modules", OptionValue::eTypeBoolean, false, true, nullptr, nullptr, "Automatically load Clang modules referred to by the program."}, {"auto-apply-fixits", OptionValue::eTypeBoolean, false, true, nullptr, nullptr, "Automatically apply fix-it hints to expressions."}, {"notify-about-fixits", OptionValue::eTypeBoolean, false, true, nullptr, nullptr, "Print the fixed expression text."}, {"save-jit-objects", OptionValue::eTypeBoolean, false, false, nullptr, nullptr, "Save intermediate object files generated by the LLVM JIT"}, {"max-children-count", OptionValue::eTypeSInt64, false, 256, nullptr, nullptr, "Maximum number of children to expand in any level of depth."}, {"max-string-summary-length", OptionValue::eTypeSInt64, false, 1024, nullptr, nullptr, "Maximum number of characters to show when using %s in summary strings."}, {"max-memory-read-size", OptionValue::eTypeSInt64, false, 1024, nullptr, 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, nullptr, "Consult the platform module avoid list when " "setting non-module specific breakpoints."}, {"arg0", OptionValue::eTypeString, false, 0, nullptr, 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, 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, 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, nullptr, "Inherit the environment from the process that is running LLDB."}, {"input-path", OptionValue::eTypeFileSpec, false, 0, nullptr, nullptr, "The file/path to be used by the executable program for reading its " "standard input."}, {"output-path", OptionValue::eTypeFileSpec, false, 0, nullptr, nullptr, "The file/path to be used by the executable program for writing its " "standard output."}, {"error-path", OptionValue::eTypeFileSpec, false, 0, nullptr, nullptr, "The file/path to be used by the executable program for writing its " "standard error."}, {"detach-on-error", OptionValue::eTypeBoolean, false, true, nullptr, nullptr, "debugserver will detach (rather than killing) a process if it " "loses connection with lldb."}, + {"preload-symbols", OptionValue::eTypeBoolean, false, true, nullptr, nullptr, + "Enable loading of symbol tables before they are needed."}, {"disable-aslr", OptionValue::eTypeBoolean, false, true, nullptr, nullptr, "Disable Address Space Layout Randomization (ASLR)"}, {"disable-stdio", OptionValue::eTypeBoolean, false, false, nullptr, nullptr, "Disable stdin/stdout for process (e.g. for a GUI application)"}, {"inline-breakpoint-strategy", OptionValue::eTypeEnum, false, eInlineBreakpointsAlways, nullptr, 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, 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, nullptr, "Show immediates in disassembly as hexadecimal."}, {"hex-immediate-style", OptionValue::eTypeEnum, false, Disassembler::eHexStyleC, nullptr, g_hex_immediate_style_values, "Which style to use for printing hexadecimal disassembly values."}, {"use-fast-stepping", OptionValue::eTypeBoolean, false, true, nullptr, 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, 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, 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, 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, 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, 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, nullptr, "If true, LLDB will show variables that are meant to " "support the operation of a language's runtime " "support."}, {"non-stop-mode", OptionValue::eTypeBoolean, false, 0, nullptr, nullptr, "Disable lock-step debugging, instead control threads independently."}, {nullptr, OptionValue::eTypeInvalid, false, 0, nullptr, nullptr, nullptr}}; enum { ePropertyDefaultArch, ePropertyMoveToNearestCode, ePropertyLanguage, ePropertyExprPrefix, ePropertyPreferDynamic, ePropertyEnableSynthetic, ePropertySkipPrologue, ePropertySourceMap, ePropertyExecutableSearchPaths, ePropertyDebugFileSearchPaths, ePropertyClangModuleSearchPaths, ePropertyAutoImportClangModules, 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, ePropertyNonStopModeEnabled, ePropertyExperimental }; class TargetOptionValueProperties : public OptionValueProperties { public: TargetOptionValueProperties(const ConstString &name) : OptionValueProperties(name), m_target(nullptr), m_got_host_env(false) {} // This constructor is used when creating TargetOptionValueProperties when it // is part of a new lldb_private::Target instance. It will copy all current // global property values as needed TargetOptionValueProperties(Target *target, const TargetPropertiesSP &target_properties_sp) : OptionValueProperties(*target_properties_sp->GetValueProperties()), m_target(target), m_got_host_env(false) {} const Property *GetPropertyAtIndex(const ExecutionContext *exe_ctx, bool will_modify, uint32_t idx) const override { // When getting the value for a key from the target options, we will always // try and grab the setting from the current target if there is one. Else we // just // use the one from this instance. if (idx == ePropertyEnvVars) GetHostEnvironmentIfNeeded(); if (exe_ctx) { Target *target = exe_ctx->GetTargetPtr(); if (target) { TargetOptionValueProperties *target_properties = static_cast( target->GetValueProperties().get()); if (this != target_properties) return target_properties->ProtectedGetPropertyAtIndex(idx); } } return ProtectedGetPropertyAtIndex(idx); } lldb::TargetSP GetTargetSP() { return m_target->shared_from_this(); } protected: void GetHostEnvironmentIfNeeded() const { if (!m_got_host_env) { if (m_target) { m_got_host_env = true; const uint32_t idx = ePropertyInheritEnv; if (GetPropertyAtIndexAsBoolean( nullptr, idx, g_properties[idx].default_uint_value != 0)) { PlatformSP platform_sp(m_target->GetPlatform()); if (platform_sp) { StringList env; if (platform_sp->GetEnvironment(env)) { OptionValueDictionary *env_dict = GetPropertyAtIndexAsOptionValueDictionary(nullptr, ePropertyEnvVars); if (env_dict) { const bool can_replace = false; const size_t envc = env.GetSize(); for (size_t idx = 0; idx < envc; idx++) { const char *env_entry = env.GetStringAtIndex(idx); if (env_entry) { const char *equal_pos = ::strchr(env_entry, '='); ConstString key; // It is ok to have environment variables with no values const char *value = nullptr; if (equal_pos) { key.SetCStringWithLength(env_entry, equal_pos - env_entry); if (equal_pos[1]) value = equal_pos + 1; } else { key.SetCString(env_entry); } // Don't allow existing keys to be replaced with ones we get // from the platform environment env_dict->SetValueForKey( key, OptionValueSP(new OptionValueString(value)), can_replace); } } } } } } } } } Target *m_target; mutable bool m_got_host_env; }; //---------------------------------------------------------------------- // TargetProperties //---------------------------------------------------------------------- static PropertyDefinition g_experimental_properties[]{ {"inject-local-vars", OptionValue::eTypeBoolean, true, true, nullptr, 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."}, {nullptr, OptionValue::eTypeInvalid, true, 0, nullptr, nullptr, nullptr}}; enum { ePropertyInjectLocalVars = 0 }; class TargetExperimentalOptionValueProperties : public OptionValueProperties { public: TargetExperimentalOptionValueProperties() : OptionValueProperties( ConstString(Properties::GetExperimentalSettingsName())) {} }; TargetExperimentalProperties::TargetExperimentalProperties() : Properties(OptionValuePropertiesSP( new TargetExperimentalOptionValueProperties())) { m_collection_sp->Initialize(g_experimental_properties); } //---------------------------------------------------------------------- // TargetProperties //---------------------------------------------------------------------- TargetProperties::TargetProperties(Target *target) : Properties(), m_launch_info() { if (target) { m_collection_sp.reset( new TargetOptionValueProperties(target, Target::GetGlobalProperties())); // Set callbacks to update launch_info whenever "settins set" updated any of // these properties m_collection_sp->SetValueChangedCallback( ePropertyArg0, TargetProperties::Arg0ValueChangedCallback, this); m_collection_sp->SetValueChangedCallback( ePropertyRunArgs, TargetProperties::RunArgsValueChangedCallback, this); m_collection_sp->SetValueChangedCallback( ePropertyEnvVars, TargetProperties::EnvVarsValueChangedCallback, this); m_collection_sp->SetValueChangedCallback( ePropertyInputPath, TargetProperties::InputPathValueChangedCallback, this); m_collection_sp->SetValueChangedCallback( ePropertyOutputPath, TargetProperties::OutputPathValueChangedCallback, this); m_collection_sp->SetValueChangedCallback( ePropertyErrorPath, TargetProperties::ErrorPathValueChangedCallback, this); m_collection_sp->SetValueChangedCallback( ePropertyDetachOnError, TargetProperties::DetachOnErrorValueChangedCallback, this); m_collection_sp->SetValueChangedCallback( ePropertyDisableASLR, TargetProperties::DisableASLRValueChangedCallback, this); m_collection_sp->SetValueChangedCallback( ePropertyDisableSTDIO, TargetProperties::DisableSTDIOValueChangedCallback, this); m_experimental_properties_up.reset(new TargetExperimentalProperties()); m_collection_sp->AppendProperty( ConstString(Properties::GetExperimentalSettingsName()), ConstString("Experimental settings - setting these won't produce " "errors if the setting is not present."), 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 // Target::GetPlatform() InputPathValueChangedCallback(this, nullptr); OutputPathValueChangedCallback(this, nullptr); ErrorPathValueChangedCallback(this, nullptr); DetachOnErrorValueChangedCallback(this, nullptr); DisableASLRValueChangedCallback(this, nullptr); DisableSTDIOValueChangedCallback(this, nullptr); } else { m_collection_sp.reset( new TargetOptionValueProperties(ConstString("target"))); m_collection_sp->Initialize(g_properties); m_experimental_properties_up.reset(new TargetExperimentalProperties()); m_collection_sp->AppendProperty( ConstString(Properties::GetExperimentalSettingsName()), ConstString("Experimental settings - setting these won't produce " "errors if the setting is not present."), true, m_experimental_properties_up->GetValueProperties()); m_collection_sp->AppendProperty( ConstString("process"), ConstString("Settings specific to processes."), true, Process::GetGlobalProperties()->GetValueProperties()); } } TargetProperties::~TargetProperties() = default; bool TargetProperties::GetInjectLocalVariables( ExecutionContext *exe_ctx) const { const Property *exp_property = m_collection_sp->GetPropertyAtIndex( exe_ctx, false, ePropertyExperimental); OptionValueProperties *exp_values = exp_property->GetValue()->GetAsProperties(); if (exp_values) return exp_values->GetPropertyAtIndexAsBoolean( exe_ctx, ePropertyInjectLocalVars, true); else return true; } void TargetProperties::SetInjectLocalVariables(ExecutionContext *exe_ctx, bool b) { const Property *exp_property = m_collection_sp->GetPropertyAtIndex(exe_ctx, true, ePropertyExperimental); OptionValueProperties *exp_values = exp_property->GetValue()->GetAsProperties(); if (exp_values) exp_values->SetPropertyAtIndexAsBoolean(exe_ctx, ePropertyInjectLocalVars, true); } ArchSpec TargetProperties::GetDefaultArchitecture() const { OptionValueArch *value = m_collection_sp->GetPropertyAtIndexAsOptionValueArch( nullptr, ePropertyDefaultArch); if (value) return value->GetCurrentValue(); return ArchSpec(); } void TargetProperties::SetDefaultArchitecture(const ArchSpec &arch) { OptionValueArch *value = m_collection_sp->GetPropertyAtIndexAsOptionValueArch( nullptr, ePropertyDefaultArch); if (value) return value->SetCurrentValue(arch, true); } bool TargetProperties::GetMoveToNearestCode() const { const uint32_t idx = ePropertyMoveToNearestCode; return m_collection_sp->GetPropertyAtIndexAsBoolean( nullptr, idx, g_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); } bool TargetProperties::SetPreferDynamicValue(lldb::DynamicValueType d) { const uint32_t idx = ePropertyPreferDynamic; return m_collection_sp->SetPropertyAtIndexAsEnumeration(nullptr, idx, d); +} + +bool TargetProperties::GetPreloadSymbols() const { + const uint32_t idx = ePropertyPreloadSymbols; + return m_collection_sp->GetPropertyAtIndexAsBoolean( + nullptr, idx, g_properties[idx].default_uint_value != 0); +} + +void TargetProperties::SetPreloadSymbols(bool b) { + const uint32_t idx = ePropertyPreloadSymbols; + m_collection_sp->SetPropertyAtIndexAsBoolean(nullptr, idx, b); } bool TargetProperties::GetDisableASLR() const { const uint32_t idx = ePropertyDisableASLR; return m_collection_sp->GetPropertyAtIndexAsBoolean( nullptr, idx, g_properties[idx].default_uint_value != 0); } void TargetProperties::SetDisableASLR(bool b) { const uint32_t idx = ePropertyDisableASLR; m_collection_sp->SetPropertyAtIndexAsBoolean(nullptr, idx, b); } bool TargetProperties::GetDetachOnError() const { const uint32_t idx = ePropertyDetachOnError; return m_collection_sp->GetPropertyAtIndexAsBoolean( nullptr, idx, g_properties[idx].default_uint_value != 0); } void TargetProperties::SetDetachOnError(bool b) { const uint32_t idx = ePropertyDetachOnError; m_collection_sp->SetPropertyAtIndexAsBoolean(nullptr, idx, b); } bool TargetProperties::GetDisableSTDIO() const { const uint32_t idx = ePropertyDisableSTDIO; return m_collection_sp->GetPropertyAtIndexAsBoolean( nullptr, idx, g_properties[idx].default_uint_value != 0); } void TargetProperties::SetDisableSTDIO(bool b) { const uint32_t idx = ePropertyDisableSTDIO; m_collection_sp->SetPropertyAtIndexAsBoolean(nullptr, idx, b); } const char *TargetProperties::GetDisassemblyFlavor() const { const uint32_t idx = ePropertyDisassemblyFlavor; const char *return_value; x86DisassemblyFlavor flavor_value = (x86DisassemblyFlavor)m_collection_sp->GetPropertyAtIndexAsEnumeration( nullptr, idx, g_properties[idx].default_uint_value); return_value = g_x86_dis_flavor_value_types[flavor_value].string_value; return return_value; } InlineStrategy TargetProperties::GetInlineStrategy() const { const uint32_t idx = ePropertyInlineStrategy; return (InlineStrategy)m_collection_sp->GetPropertyAtIndexAsEnumeration( nullptr, idx, g_properties[idx].default_uint_value); } llvm::StringRef TargetProperties::GetArg0() const { const uint32_t idx = ePropertyArg0; 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_launch_info.SetArg0(arg); } bool TargetProperties::GetRunArguments(Args &args) const { const uint32_t idx = ePropertyRunArgs; return m_collection_sp->GetPropertyAtIndexAsArgs(nullptr, idx, args); } void TargetProperties::SetRunArguments(const Args &args) { const uint32_t idx = ePropertyRunArgs; m_collection_sp->SetPropertyAtIndexFromArgs(nullptr, idx, args); m_launch_info.GetArguments() = args; } size_t TargetProperties::GetEnvironmentAsArgs(Args &env) const { const uint32_t idx = ePropertyEnvVars; return m_collection_sp->GetPropertyAtIndexAsArgs(nullptr, idx, env); } void TargetProperties::SetEnvironmentFromArgs(const Args &env) { const uint32_t idx = ePropertyEnvVars; m_collection_sp->SetPropertyAtIndexFromArgs(nullptr, idx, env); m_launch_info.GetEnvironmentEntries() = env; } bool TargetProperties::GetSkipPrologue() const { const uint32_t idx = ePropertySkipPrologue; return m_collection_sp->GetPropertyAtIndexAsBoolean( nullptr, idx, g_properties[idx].default_uint_value != 0); } PathMappingList &TargetProperties::GetSourcePathMap() const { const uint32_t idx = ePropertySourceMap; OptionValuePathMappings *option_value = m_collection_sp->GetPropertyAtIndexAsOptionValuePathMappings(nullptr, false, idx); assert(option_value); return option_value->GetCurrentValue(); } FileSpecList &TargetProperties::GetExecutableSearchPaths() { const uint32_t idx = ePropertyExecutableSearchPaths; OptionValueFileSpecList *option_value = m_collection_sp->GetPropertyAtIndexAsOptionValueFileSpecList(nullptr, false, idx); assert(option_value); return option_value->GetCurrentValue(); } FileSpecList &TargetProperties::GetDebugFileSearchPaths() { const uint32_t idx = ePropertyDebugFileSearchPaths; OptionValueFileSpecList *option_value = m_collection_sp->GetPropertyAtIndexAsOptionValueFileSpecList(nullptr, false, idx); assert(option_value); return option_value->GetCurrentValue(); } FileSpecList &TargetProperties::GetClangModuleSearchPaths() { const uint32_t idx = ePropertyClangModuleSearchPaths; OptionValueFileSpecList *option_value = m_collection_sp->GetPropertyAtIndexAsOptionValueFileSpecList(nullptr, false, idx); assert(option_value); return option_value->GetCurrentValue(); } bool TargetProperties::GetEnableAutoImportClangModules() const { const uint32_t idx = ePropertyAutoImportClangModules; return m_collection_sp->GetPropertyAtIndexAsBoolean( nullptr, idx, g_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); } bool TargetProperties::GetEnableNotifyAboutFixIts() const { const uint32_t idx = ePropertyNotifyAboutFixIts; return m_collection_sp->GetPropertyAtIndexAsBoolean( nullptr, idx, g_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); } bool TargetProperties::GetEnableSyntheticValue() const { const uint32_t idx = ePropertyEnableSynthetic; return m_collection_sp->GetPropertyAtIndexAsBoolean( nullptr, idx, g_properties[idx].default_uint_value != 0); } uint32_t TargetProperties::GetMaximumNumberOfChildrenToDisplay() const { const uint32_t idx = ePropertyMaxChildrenCount; return m_collection_sp->GetPropertyAtIndexAsSInt64( nullptr, idx, g_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); } uint32_t TargetProperties::GetMaximumMemReadSize() const { const uint32_t idx = ePropertyMaxMemReadSize; return m_collection_sp->GetPropertyAtIndexAsSInt64( nullptr, idx, g_properties[idx].default_uint_value); } FileSpec TargetProperties::GetStandardInputPath() const { const uint32_t idx = ePropertyInputPath; return m_collection_sp->GetPropertyAtIndexAsFileSpec(nullptr, idx); } void TargetProperties::SetStandardInputPath(llvm::StringRef path) { const uint32_t idx = ePropertyInputPath; m_collection_sp->SetPropertyAtIndexAsString(nullptr, idx, path); } FileSpec TargetProperties::GetStandardOutputPath() const { const uint32_t idx = ePropertyOutputPath; return m_collection_sp->GetPropertyAtIndexAsFileSpec(nullptr, idx); } void TargetProperties::SetStandardOutputPath(llvm::StringRef path) { const uint32_t idx = ePropertyOutputPath; m_collection_sp->SetPropertyAtIndexAsString(nullptr, idx, path); } FileSpec TargetProperties::GetStandardErrorPath() const { const uint32_t idx = ePropertyErrorPath; return m_collection_sp->GetPropertyAtIndexAsFileSpec(nullptr, idx); } void TargetProperties::SetStandardErrorPath(llvm::StringRef path) { const uint32_t idx = ePropertyErrorPath; m_collection_sp->SetPropertyAtIndexAsString(nullptr, idx, path); } LanguageType TargetProperties::GetLanguage() const { OptionValueLanguage *value = m_collection_sp->GetPropertyAtIndexAsOptionValueLanguage( nullptr, ePropertyLanguage); if (value) return value->GetCurrentValue(); return LanguageType(); } const char *TargetProperties::GetExpressionPrefixContentsAsCString() { const uint32_t idx = ePropertyExprPrefix; OptionValueFileSpec *file = m_collection_sp->GetPropertyAtIndexAsOptionValueFileSpec(nullptr, false, idx); if (file) { const bool null_terminate = true; DataBufferSP data_sp(file->GetFileContents(null_terminate)); if (data_sp) return (const char *)data_sp->GetBytes(); } return nullptr; } bool TargetProperties::GetBreakpointsConsultPlatformAvoidList() { const uint32_t idx = ePropertyBreakpointUseAvoidList; return m_collection_sp->GetPropertyAtIndexAsBoolean( nullptr, idx, g_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); } bool TargetProperties::GetUseFastStepping() const { const uint32_t idx = ePropertyUseFastStepping; return m_collection_sp->GetPropertyAtIndexAsBoolean( nullptr, idx, g_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); } LoadScriptFromSymFile TargetProperties::GetLoadScriptFromSymbolFile() const { const uint32_t idx = ePropertyLoadScriptFromSymbolFile; return (LoadScriptFromSymFile) m_collection_sp->GetPropertyAtIndexAsEnumeration( nullptr, idx, g_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); } 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); } MemoryModuleLoadLevel TargetProperties::GetMemoryModuleLoadLevel() const { const uint32_t idx = ePropertyMemoryModuleLoadLevel; return (MemoryModuleLoadLevel) m_collection_sp->GetPropertyAtIndexAsEnumeration( nullptr, idx, g_properties[idx].default_uint_value); } bool TargetProperties::GetUserSpecifiedTrapHandlerNames(Args &args) const { const uint32_t idx = ePropertyTrapHandlerNames; return m_collection_sp->GetPropertyAtIndexAsArgs(nullptr, idx, args); } void TargetProperties::SetUserSpecifiedTrapHandlerNames(const Args &args) { const uint32_t idx = ePropertyTrapHandlerNames; m_collection_sp->SetPropertyAtIndexFromArgs(nullptr, idx, args); } bool TargetProperties::GetDisplayRuntimeSupportValues() const { const uint32_t idx = ePropertyDisplayRuntimeSupportValues; return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx, false); } void TargetProperties::SetDisplayRuntimeSupportValues(bool b) { const uint32_t idx = ePropertyDisplayRuntimeSupportValues; m_collection_sp->SetPropertyAtIndexAsBoolean(nullptr, idx, b); } bool TargetProperties::GetNonStopModeEnabled() const { const uint32_t idx = ePropertyNonStopModeEnabled; return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx, false); } void TargetProperties::SetNonStopModeEnabled(bool b) { const uint32_t idx = ePropertyNonStopModeEnabled; m_collection_sp->SetPropertyAtIndexAsBoolean(nullptr, idx, b); } const ProcessLaunchInfo &TargetProperties::GetProcessLaunchInfo() { m_launch_info.SetArg0(GetArg0()); // FIXME: Arg0 callback doesn't work return m_launch_info; } void TargetProperties::SetProcessLaunchInfo( const ProcessLaunchInfo &launch_info) { m_launch_info = launch_info; SetArg0(launch_info.GetArg0()); SetRunArguments(launch_info.GetArguments()); SetEnvironmentFromArgs(launch_info.GetEnvironmentEntries()); const FileAction *input_file_action = launch_info.GetFileActionForFD(STDIN_FILENO); if (input_file_action) { SetStandardInputPath(input_file_action->GetPath()); } const FileAction *output_file_action = launch_info.GetFileActionForFD(STDOUT_FILENO); if (output_file_action) { SetStandardOutputPath(output_file_action->GetPath()); } const FileAction *error_file_action = launch_info.GetFileActionForFD(STDERR_FILENO); if (error_file_action) { SetStandardErrorPath(error_file_action->GetPath()); } SetDetachOnError(launch_info.GetFlags().Test(lldb::eLaunchFlagDetachOnError)); SetDisableASLR(launch_info.GetFlags().Test(lldb::eLaunchFlagDisableASLR)); SetDisableSTDIO(launch_info.GetFlags().Test(lldb::eLaunchFlagDisableSTDIO)); } void TargetProperties::Arg0ValueChangedCallback(void *target_property_ptr, OptionValue *) { TargetProperties *this_ = reinterpret_cast(target_property_ptr); this_->m_launch_info.SetArg0(this_->GetArg0()); } void TargetProperties::RunArgsValueChangedCallback(void *target_property_ptr, OptionValue *) { TargetProperties *this_ = reinterpret_cast(target_property_ptr); Args args; if (this_->GetRunArguments(args)) this_->m_launch_info.GetArguments() = args; } void TargetProperties::EnvVarsValueChangedCallback(void *target_property_ptr, OptionValue *) { TargetProperties *this_ = reinterpret_cast(target_property_ptr); Args args; if (this_->GetEnvironmentAsArgs(args)) this_->m_launch_info.GetEnvironmentEntries() = args; } void TargetProperties::InputPathValueChangedCallback(void *target_property_ptr, OptionValue *) { TargetProperties *this_ = reinterpret_cast(target_property_ptr); this_->m_launch_info.AppendOpenFileAction( STDIN_FILENO, this_->GetStandardInputPath(), true, false); } void TargetProperties::OutputPathValueChangedCallback(void *target_property_ptr, OptionValue *) { TargetProperties *this_ = reinterpret_cast(target_property_ptr); this_->m_launch_info.AppendOpenFileAction( STDOUT_FILENO, this_->GetStandardOutputPath(), false, true); } void TargetProperties::ErrorPathValueChangedCallback(void *target_property_ptr, OptionValue *) { TargetProperties *this_ = reinterpret_cast(target_property_ptr); this_->m_launch_info.AppendOpenFileAction( STDERR_FILENO, this_->GetStandardErrorPath(), false, true); } void TargetProperties::DetachOnErrorValueChangedCallback( void *target_property_ptr, OptionValue *) { TargetProperties *this_ = reinterpret_cast(target_property_ptr); if (this_->GetDetachOnError()) this_->m_launch_info.GetFlags().Set(lldb::eLaunchFlagDetachOnError); else this_->m_launch_info.GetFlags().Clear(lldb::eLaunchFlagDetachOnError); } void TargetProperties::DisableASLRValueChangedCallback( void *target_property_ptr, OptionValue *) { TargetProperties *this_ = reinterpret_cast(target_property_ptr); if (this_->GetDisableASLR()) this_->m_launch_info.GetFlags().Set(lldb::eLaunchFlagDisableASLR); else this_->m_launch_info.GetFlags().Clear(lldb::eLaunchFlagDisableASLR); } void TargetProperties::DisableSTDIOValueChangedCallback( void *target_property_ptr, OptionValue *) { TargetProperties *this_ = reinterpret_cast(target_property_ptr); if (this_->GetDisableSTDIO()) this_->m_launch_info.GetFlags().Set(lldb::eLaunchFlagDisableSTDIO); else this_->m_launch_info.GetFlags().Clear(lldb::eLaunchFlagDisableSTDIO); } //---------------------------------------------------------------------- // Target::TargetEventData //---------------------------------------------------------------------- Target::TargetEventData::TargetEventData(const lldb::TargetSP &target_sp) : EventData(), m_target_sp(target_sp), m_module_list() {} Target::TargetEventData::TargetEventData(const lldb::TargetSP &target_sp, const ModuleList &module_list) : EventData(), m_target_sp(target_sp), m_module_list(module_list) {} Target::TargetEventData::~TargetEventData() = default; const ConstString &Target::TargetEventData::GetFlavorString() { static ConstString g_flavor("Target::TargetEventData"); return g_flavor; } void Target::TargetEventData::Dump(Stream *s) const { for (size_t i = 0; i < m_module_list.GetSize(); ++i) { if (i != 0) *s << ", "; m_module_list.GetModuleAtIndex(i)->GetDescription( s, lldb::eDescriptionLevelBrief); } } const Target::TargetEventData * Target::TargetEventData::GetEventDataFromEvent(const Event *event_ptr) { if (event_ptr) { const EventData *event_data = event_ptr->GetData(); if (event_data && event_data->GetFlavor() == TargetEventData::GetFlavorString()) return static_cast(event_ptr->GetData()); } return nullptr; } TargetSP Target::TargetEventData::GetTargetFromEvent(const Event *event_ptr) { TargetSP target_sp; const TargetEventData *event_data = GetEventDataFromEvent(event_ptr); if (event_data) target_sp = event_data->m_target_sp; return target_sp; } ModuleList Target::TargetEventData::GetModuleListFromEvent(const Event *event_ptr) { ModuleList module_list; const TargetEventData *event_data = GetEventDataFromEvent(event_ptr); if (event_data) module_list = event_data->m_module_list; return module_list; } Index: vendor/lldb/dist/source/Utility/ConstString.cpp =================================================================== --- vendor/lldb/dist/source/Utility/ConstString.cpp (revision 317691) +++ vendor/lldb/dist/source/Utility/ConstString.cpp (revision 317692) @@ -1,347 +1,340 @@ //===-- ConstString.cpp -----------------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #include "lldb/Utility/ConstString.h" #include "lldb/Utility/Stream.h" #include "llvm/ADT/StringExtras.h" #include "llvm/ADT/StringMap.h" #include "llvm/ADT/iterator.h" // for iterator_facade_base #include "llvm/Support/Allocator.h" // for BumpPtrAllocator #include "llvm/Support/FormatProviders.h" // for format_provider #include "llvm/Support/RWMutex.h" #include "llvm/Support/Threading.h" #include // for min #include #include // for make_pair, pair #include // for PRIu64 #include // for uint8_t, uint32_t, uint64_t #include // for size_t, strlen using namespace lldb_private; class Pool { public: typedef const char *StringPoolValueType; typedef llvm::StringMap StringPool; typedef llvm::StringMapEntry StringPoolEntryType; static StringPoolEntryType & GetStringMapEntryFromKeyData(const char *keyData) { - char *ptr = const_cast(keyData) - sizeof(StringPoolEntryType); - return *reinterpret_cast(ptr); + return StringPoolEntryType::GetStringMapEntryFromKeyData(keyData); } - size_t GetConstCStringLength(const char *ccstr) const { + static size_t GetConstCStringLength(const char *ccstr) { if (ccstr != nullptr) { - const uint8_t h = hash(llvm::StringRef(ccstr)); - llvm::sys::SmartScopedReader rlock(m_string_pools[h].m_mutex); + // Since the entry is read only, and we derive the entry entirely from the + // pointer, we don't need the lock. const StringPoolEntryType &entry = GetStringMapEntryFromKeyData(ccstr); return entry.getKey().size(); } return 0; } StringPoolValueType GetMangledCounterpart(const char *ccstr) const { if (ccstr != nullptr) { const uint8_t h = hash(llvm::StringRef(ccstr)); llvm::sys::SmartScopedReader rlock(m_string_pools[h].m_mutex); return GetStringMapEntryFromKeyData(ccstr).getValue(); } 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 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 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)); return nullptr; } const char *GetConstCStringWithLength(const char *cstr, size_t cstr_len) { if (cstr != nullptr) return GetConstCStringWithStringRef(llvm::StringRef(cstr, cstr_len)); return nullptr; } const char *GetConstCStringWithStringRef(const llvm::StringRef &string_ref) { if (string_ref.data()) { const uint8_t h = hash(string_ref); { llvm::sys::SmartScopedReader rlock(m_string_pools[h].m_mutex); auto it = m_string_pools[h].m_string_map.find(string_ref); if (it != m_string_pools[h].m_string_map.end()) return it->getKeyData(); } llvm::sys::SmartScopedWriter wlock(m_string_pools[h].m_mutex); StringPoolEntryType &entry = *m_string_pools[h] .m_string_map.insert(std::make_pair(string_ref, nullptr)) .first; return entry.getKeyData(); } return nullptr; } const char * GetConstCStringAndSetMangledCounterPart(const char *demangled_cstr, const char *mangled_ccstr) { if (demangled_cstr != nullptr) { const char *demangled_ccstr = nullptr; { llvm::StringRef string_ref(demangled_cstr); const uint8_t h = hash(string_ref); llvm::sys::SmartScopedWriter wlock(m_string_pools[h].m_mutex); // Make string pool entry with the mangled counterpart already set StringPoolEntryType &entry = *m_string_pools[h] .m_string_map.insert(std::make_pair(string_ref, mangled_ccstr)) .first; // Extract the const version of the demangled_cstr demangled_ccstr = entry.getKeyData(); } { // Now assign the demangled const string as the counterpart of the // mangled const string... const uint8_t h = hash(llvm::StringRef(mangled_ccstr)); llvm::sys::SmartScopedWriter wlock(m_string_pools[h].m_mutex); GetStringMapEntryFromKeyData(mangled_ccstr).setValue(demangled_ccstr); } // Return the constant demangled C string return demangled_ccstr; } return nullptr; } const char *GetConstTrimmedCStringWithLength(const char *cstr, size_t cstr_len) { if (cstr != nullptr) { const size_t trimmed_len = std::min(strlen(cstr), cstr_len); return GetConstCStringWithLength(cstr, trimmed_len); } return nullptr; } //------------------------------------------------------------------ // Return the size in bytes that this object and any items in its // collection of uniqued strings + data count values takes in // memory. //------------------------------------------------------------------ size_t MemorySize() const { size_t mem_size = sizeof(Pool); for (const auto &pool : m_string_pools) { llvm::sys::SmartScopedReader rlock(pool.m_mutex); for (const auto &entry : pool.m_string_map) mem_size += sizeof(StringPoolEntryType) + entry.getKey().size(); } return mem_size; } protected: uint8_t hash(const llvm::StringRef &s) const { uint32_t h = llvm::HashString(s); return ((h >> 24) ^ (h >> 16) ^ (h >> 8) ^ h) & 0xff; } struct PoolEntry { mutable llvm::sys::SmartRWMutex m_mutex; StringPool m_string_map; }; std::array m_string_pools; }; //---------------------------------------------------------------------- // Frameworks and dylibs aren't supposed to have global C++ // initializers so we hide the string pool in a static function so // that it will get initialized on the first call to this static // function. // // Note, for now we make the string pool a pointer to the pool, because // we can't guarantee that some objects won't get destroyed after the // global destructor chain is run, and trying to make sure no destructors // touch ConstStrings is difficult. So we leak the pool instead. //---------------------------------------------------------------------- static Pool &StringPool() { static llvm::once_flag g_pool_initialization_flag; static Pool *g_string_pool = nullptr; llvm::call_once(g_pool_initialization_flag, []() { g_string_pool = new Pool(); }); return *g_string_pool; } ConstString::ConstString(const char *cstr) : m_string(StringPool().GetConstCString(cstr)) {} ConstString::ConstString(const char *cstr, size_t cstr_len) : m_string(StringPool().GetConstCStringWithLength(cstr, cstr_len)) {} ConstString::ConstString(const llvm::StringRef &s) : m_string(StringPool().GetConstCStringWithLength(s.data(), s.size())) {} bool ConstString::operator<(const ConstString &rhs) const { if (m_string == rhs.m_string) return false; - llvm::StringRef lhs_string_ref(m_string, - StringPool().GetConstCStringLength(m_string)); - llvm::StringRef rhs_string_ref( - rhs.m_string, StringPool().GetConstCStringLength(rhs.m_string)); + llvm::StringRef lhs_string_ref(GetStringRef()); + llvm::StringRef rhs_string_ref(rhs.GetStringRef()); // If both have valid C strings, then return the comparison if (lhs_string_ref.data() && rhs_string_ref.data()) return lhs_string_ref < rhs_string_ref; // Else one of them was nullptr, so if LHS is nullptr then it is less than return lhs_string_ref.data() == nullptr; } Stream &lldb_private::operator<<(Stream &s, const ConstString &str) { const char *cstr = str.GetCString(); if (cstr != nullptr) s << cstr; return s; } size_t ConstString::GetLength() const { - return StringPool().GetConstCStringLength(m_string); + return Pool::GetConstCStringLength(m_string); } bool ConstString::Equals(const ConstString &lhs, const ConstString &rhs, const bool case_sensitive) { if (lhs.m_string == rhs.m_string) return true; // Since the pointers weren't equal, and identical ConstStrings always have // identical pointers, // the result must be false for case sensitive equality test. if (case_sensitive) return false; // perform case insensitive equality test - llvm::StringRef lhs_string_ref( - lhs.m_string, StringPool().GetConstCStringLength(lhs.m_string)); - llvm::StringRef rhs_string_ref( - rhs.m_string, StringPool().GetConstCStringLength(rhs.m_string)); + llvm::StringRef lhs_string_ref(lhs.GetStringRef()); + llvm::StringRef rhs_string_ref(rhs.GetStringRef()); return lhs_string_ref.equals_lower(rhs_string_ref); } int ConstString::Compare(const ConstString &lhs, const ConstString &rhs, const bool case_sensitive) { // If the iterators are the same, this is the same string const char *lhs_cstr = lhs.m_string; const char *rhs_cstr = rhs.m_string; if (lhs_cstr == rhs_cstr) return 0; if (lhs_cstr && rhs_cstr) { - llvm::StringRef lhs_string_ref( - lhs_cstr, StringPool().GetConstCStringLength(lhs_cstr)); - llvm::StringRef rhs_string_ref( - rhs_cstr, StringPool().GetConstCStringLength(rhs_cstr)); + llvm::StringRef lhs_string_ref(lhs.GetStringRef()); + llvm::StringRef rhs_string_ref(rhs.GetStringRef()); if (case_sensitive) { return lhs_string_ref.compare(rhs_string_ref); } else { return lhs_string_ref.compare_lower(rhs_string_ref); } } if (lhs_cstr) return +1; // LHS isn't nullptr but RHS is else return -1; // LHS is nullptr but RHS isn't } void ConstString::Dump(Stream *s, const char *fail_value) const { if (s != nullptr) { const char *cstr = AsCString(fail_value); if (cstr != nullptr) s->PutCString(cstr); } } void ConstString::DumpDebug(Stream *s) const { const char *cstr = GetCString(); size_t cstr_len = GetLength(); // Only print the parens if we have a non-nullptr string const char *parens = cstr ? "\"" : ""; s->Printf("%*p: ConstString, string = %s%s%s, length = %" PRIu64, static_cast(sizeof(void *) * 2), static_cast(this), parens, cstr, parens, static_cast(cstr_len)); } void ConstString::SetCString(const char *cstr) { m_string = StringPool().GetConstCString(cstr); } void ConstString::SetString(const llvm::StringRef &s) { m_string = StringPool().GetConstCStringWithLength(s.data(), s.size()); } void ConstString::SetCStringWithMangledCounterpart(const char *demangled, const ConstString &mangled) { m_string = StringPool().GetConstCStringAndSetMangledCounterPart( demangled, mangled.m_string); } bool ConstString::GetMangledCounterpart(ConstString &counterpart) const { counterpart.m_string = StringPool().GetMangledCounterpart(m_string); return (bool)counterpart; } void ConstString::SetCStringWithLength(const char *cstr, size_t cstr_len) { m_string = StringPool().GetConstCStringWithLength(cstr, cstr_len); } void ConstString::SetTrimmedCStringWithLength(const char *cstr, size_t cstr_len) { m_string = StringPool().GetConstTrimmedCStringWithLength(cstr, cstr_len); } size_t ConstString::StaticMemorySize() { // Get the size of the static string pool return StringPool().MemorySize(); } void llvm::format_provider::format(const ConstString &CS, llvm::raw_ostream &OS, llvm::StringRef Options) { format_provider::format(CS.AsCString(), OS, Options); } Index: vendor/lldb/dist/tools/debugserver/debugserver.xcodeproj/project.pbxproj =================================================================== --- vendor/lldb/dist/tools/debugserver/debugserver.xcodeproj/project.pbxproj (revision 317691) +++ vendor/lldb/dist/tools/debugserver/debugserver.xcodeproj/project.pbxproj (revision 317692) @@ -1,2086 +1,2090 @@ // !$*UTF8*$! { archiveVersion = 1; classes = { }; objectVersion = 46; objects = { /* Begin PBXBuildFile section */ 23043C9D1D35DBEC00FC25CA /* JSON.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 233B4EA51D2DB54300E98261 /* JSON.cpp */; }; 23043C9E1D35DBFA00FC25CA /* StringConvert.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 233B4EA81D2DB96A00E98261 /* StringConvert.cpp */; }; 2307CCCB1D4A5D630016ABC0 /* LogFilterExactMatch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 237821AE1D4917D20028B7A1 /* LogFilterExactMatch.cpp */; }; 233B4EA71D2DB54300E98261 /* JSON.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 233B4EA51D2DB54300E98261 /* JSON.cpp */; }; 233B4EA91D2DB96A00E98261 /* StringConvert.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 233B4EA81D2DB96A00E98261 /* StringConvert.cpp */; }; 23562ED21D3424DF00AB2BD4 /* LogMessageOsLog.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 23562ED01D3424DF00AB2BD4 /* LogMessageOsLog.cpp */; }; 23562ED31D3424DF00AB2BD4 /* LogMessageOsLog.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 23562ED01D3424DF00AB2BD4 /* LogMessageOsLog.cpp */; }; 23562ED61D342A5A00AB2BD4 /* ActivityStore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 23562ED51D342A5A00AB2BD4 /* ActivityStore.cpp */; }; 23562ED71D342A5A00AB2BD4 /* ActivityStore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 23562ED51D342A5A00AB2BD4 /* ActivityStore.cpp */; }; 23562ED91D342B0000AB2BD4 /* LogMessage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 23562ED81D342B0000AB2BD4 /* LogMessage.cpp */; }; 23562EDA1D342B0000AB2BD4 /* LogMessage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 23562ED81D342B0000AB2BD4 /* LogMessage.cpp */; }; 237821B01D4917D20028B7A1 /* LogFilterExactMatch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 237821AE1D4917D20028B7A1 /* LogFilterExactMatch.cpp */; }; 23AC04C61D2F41A00072351D /* LogFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 23AC04C41D2F41A00072351D /* LogFilter.cpp */; }; 23AC04C71D2F41A00072351D /* LogFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 23AC04C41D2F41A00072351D /* LogFilter.cpp */; }; 23AC04CA1D2F42250072351D /* LogFilterChain.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 23AC04C81D2F42250072351D /* LogFilterChain.cpp */; }; 23AC04CB1D2F42250072351D /* LogFilterChain.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 23AC04C81D2F42250072351D /* LogFilterChain.cpp */; }; 23AC04CF1D2F58AF0072351D /* LogFilterRegex.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 23AC04CD1D2F58AF0072351D /* LogFilterRegex.cpp */; }; 23AC04D01D2F58AF0072351D /* LogFilterRegex.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 23AC04CD1D2F58AF0072351D /* LogFilterRegex.cpp */; }; 23AE72E41D25DECF00945BCE /* DarwinLogCollector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 23AE72E21D25DECF00945BCE /* DarwinLogCollector.cpp */; }; 23AE72E51D25DEE100945BCE /* DarwinLogCollector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 23AE72E21D25DECF00945BCE /* DarwinLogCollector.cpp */; }; 23D1B0291D497E8B00FF831B /* OsLogger.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 23D1B0271D497E8B00FF831B /* OsLogger.cpp */; }; 23D1B02A1D497E8B00FF831B /* OsLogger.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 23D1B0271D497E8B00FF831B /* OsLogger.cpp */; }; 264D5D581293835600ED4C01 /* DNBArch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 264D5D571293835600ED4C01 /* DNBArch.cpp */; }; 266B5ED11460A68200E43F0A /* DNBArchImplARM64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 266B5ECF1460A68200E43F0A /* DNBArchImplARM64.cpp */; }; 26CE05A7115C360D0022F371 /* DNBError.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26C637DE0C71334A0024798E /* DNBError.cpp */; }; 26CE05A8115C36170022F371 /* DNBThreadResumeActions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260E7331114BFFE600D1DFB3 /* DNBThreadResumeActions.cpp */; }; 26CE05A9115C36250022F371 /* debugserver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26A02918114AB9240029C479 /* debugserver.cpp */; }; 26CE05AA115C36260022F371 /* RNBContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26A68F7E0D104EC800665A9E /* RNBContext.cpp */; }; 26CE05AB115C36270022F371 /* RNBServices.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EF8878A00D9C797C001831DA /* RNBServices.cpp */; }; 26CE05AC115C36280022F371 /* RNBSocket.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26A68FB00D1054DA00665A9E /* RNBSocket.cpp */; }; 26CE05AD115C36280022F371 /* RNBRemote.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26A68FD60D10574500665A9E /* RNBRemote.cpp */; }; 26CE05AE115C36320022F371 /* dbgnub-mig.defs in Sources */ = {isa = PBXBuildFile; fileRef = 26C637E80C71334A0024798E /* dbgnub-mig.defs */; settings = {ATTRIBUTES = (Client, Server, ); }; }; 26CE05B0115C36340022F371 /* MachException.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26C637EE0C71334A0024798E /* MachException.cpp */; }; 26CE05B1115C36350022F371 /* MachProcess.mm in Sources */ = {isa = PBXBuildFile; fileRef = 26C637F00C71334A0024798E /* MachProcess.mm */; }; 26CE05B2115C36360022F371 /* MachThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26C637F20C71334A0024798E /* MachThread.cpp */; }; 26CE05B3115C36370022F371 /* MachThreadList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26C637F40C71334A0024798E /* MachThreadList.cpp */; }; 26CE05B4115C36380022F371 /* MachVMMemory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26C637F60C71334A0024798E /* MachVMMemory.cpp */; }; 26CE05B5115C36380022F371 /* MachVMRegion.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26C637F80C71334A0024798E /* MachVMRegion.cpp */; }; 26CE05B6115C36390022F371 /* MachTask.mm in Sources */ = {isa = PBXBuildFile; fileRef = 26B67DE10EE9BC30006C8BC0 /* MachTask.mm */; }; 26CE05B7115C363B0022F371 /* DNB.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26C637D60C71334A0024798E /* DNB.cpp */; }; 26CE05B8115C363C0022F371 /* DNBBreakpoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26C637D90C71334A0024798E /* DNBBreakpoint.cpp */; }; 26CE05B9115C363D0022F371 /* DNBDataRef.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26C637DB0C71334A0024798E /* DNBDataRef.cpp */; }; 26CE05BA115C363E0022F371 /* DNBLog.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26C637E00C71334A0024798E /* DNBLog.cpp */; }; 26CE05BB115C363F0022F371 /* DNBRegisterInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26C637E20C71334A0024798E /* DNBRegisterInfo.cpp */; }; 26CE05BC115C36420022F371 /* PThreadEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26C637FE0C71334A0024798E /* PThreadEvent.cpp */; }; 26CE05BD115C36430022F371 /* PThreadMutex.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2672DBEE0EEF446700E92059 /* PThreadMutex.cpp */; }; 26CE05BE115C36440022F371 /* SysSignal.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26C638010C71334A0024798E /* SysSignal.cpp */; }; 26CE05BF115C364D0022F371 /* DNBArchImplX86_64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26CF99A21142EB7400011AAB /* DNBArchImplX86_64.cpp */; }; 26CE05C0115C364F0022F371 /* DNBArchImplI386.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26C637EA0C71334A0024798E /* DNBArchImplI386.cpp */; }; 26CE05C1115C36510022F371 /* DNBArchImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2675D4220CCEB705000F49AF /* DNBArchImpl.cpp */; }; 26CE05C2115C36550022F371 /* DNBArchImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26C637FB0C71334A0024798E /* DNBArchImpl.cpp */; }; 26CE05C3115C36580022F371 /* CFString.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2695DD9B0D3EC160007E4CA2 /* CFString.cpp */; }; 26CE05C5115C36590022F371 /* CFBundle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2695DD910D3EBFF6007E4CA2 /* CFBundle.cpp */; }; 26CE05CF115C36F70022F371 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 26ACA3340D3E956300A2120B /* CoreFoundation.framework */; settings = {ATTRIBUTES = (Required, ); }; }; 26CE05F1115C387C0022F371 /* PseudoTerminal.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF67ABFF0D34604D0022D128 /* PseudoTerminal.cpp */; }; 456F67461AD46CE9002850C2 /* DNBError.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26C637DE0C71334A0024798E /* DNBError.cpp */; }; 456F67471AD46CE9002850C2 /* DNBThreadResumeActions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260E7331114BFFE600D1DFB3 /* DNBThreadResumeActions.cpp */; }; 456F67481AD46CE9002850C2 /* debugserver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26A02918114AB9240029C479 /* debugserver.cpp */; }; 456F67491AD46CE9002850C2 /* RNBContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26A68F7E0D104EC800665A9E /* RNBContext.cpp */; }; 456F674A1AD46CE9002850C2 /* RNBServices.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EF8878A00D9C797C001831DA /* RNBServices.cpp */; }; 456F674B1AD46CE9002850C2 /* RNBSocket.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26A68FB00D1054DA00665A9E /* RNBSocket.cpp */; }; 456F674C1AD46CE9002850C2 /* RNBRemote.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26A68FD60D10574500665A9E /* RNBRemote.cpp */; }; 456F674D1AD46CE9002850C2 /* dbgnub-mig.defs in Sources */ = {isa = PBXBuildFile; fileRef = 26C637E80C71334A0024798E /* dbgnub-mig.defs */; settings = {ATTRIBUTES = (Client, Server, ); }; }; 456F674E1AD46CE9002850C2 /* MachException.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26C637EE0C71334A0024798E /* MachException.cpp */; }; 456F674F1AD46CE9002850C2 /* MachProcess.mm in Sources */ = {isa = PBXBuildFile; fileRef = 26C637F00C71334A0024798E /* MachProcess.mm */; }; 456F67501AD46CE9002850C2 /* MachThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26C637F20C71334A0024798E /* MachThread.cpp */; }; 456F67511AD46CE9002850C2 /* MachThreadList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26C637F40C71334A0024798E /* MachThreadList.cpp */; }; 456F67521AD46CE9002850C2 /* MachVMMemory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26C637F60C71334A0024798E /* MachVMMemory.cpp */; }; 456F67531AD46CE9002850C2 /* MachVMRegion.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26C637F80C71334A0024798E /* MachVMRegion.cpp */; }; 456F67541AD46CE9002850C2 /* MachTask.mm in Sources */ = {isa = PBXBuildFile; fileRef = 26B67DE10EE9BC30006C8BC0 /* MachTask.mm */; }; 456F67551AD46CE9002850C2 /* DNB.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26C637D60C71334A0024798E /* DNB.cpp */; }; 456F67561AD46CE9002850C2 /* Genealogy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AFEC3363194A8B0B00FF05C6 /* Genealogy.cpp */; }; 456F67571AD46CE9002850C2 /* DNBBreakpoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26C637D90C71334A0024798E /* DNBBreakpoint.cpp */; }; 456F67581AD46CE9002850C2 /* DNBDataRef.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26C637DB0C71334A0024798E /* DNBDataRef.cpp */; }; 456F67591AD46CE9002850C2 /* DNBLog.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26C637E00C71334A0024798E /* DNBLog.cpp */; }; 456F675A1AD46CE9002850C2 /* DNBRegisterInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26C637E20C71334A0024798E /* DNBRegisterInfo.cpp */; }; 456F675B1AD46CE9002850C2 /* PThreadEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26C637FE0C71334A0024798E /* PThreadEvent.cpp */; }; 456F675C1AD46CE9002850C2 /* PThreadMutex.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2672DBEE0EEF446700E92059 /* PThreadMutex.cpp */; }; 456F675D1AD46CE9002850C2 /* SysSignal.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26C638010C71334A0024798E /* SysSignal.cpp */; }; 456F675E1AD46CE9002850C2 /* DNBArchImplX86_64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26CF99A21142EB7400011AAB /* DNBArchImplX86_64.cpp */; }; 456F675F1AD46CE9002850C2 /* DNBArchImplI386.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26C637EA0C71334A0024798E /* DNBArchImplI386.cpp */; }; 456F67601AD46CE9002850C2 /* DNBArchImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2675D4220CCEB705000F49AF /* DNBArchImpl.cpp */; }; 456F67611AD46CE9002850C2 /* DNBArchImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26C637FB0C71334A0024798E /* DNBArchImpl.cpp */; }; 456F67621AD46CE9002850C2 /* CFString.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2695DD9B0D3EC160007E4CA2 /* CFString.cpp */; }; 456F67641AD46CE9002850C2 /* CFBundle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2695DD910D3EBFF6007E4CA2 /* CFBundle.cpp */; }; 456F67651AD46CE9002850C2 /* PseudoTerminal.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF67ABFF0D34604D0022D128 /* PseudoTerminal.cpp */; }; 456F67671AD46CE9002850C2 /* DNBArch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 264D5D571293835600ED4C01 /* DNBArch.cpp */; }; 456F67691AD46CE9002850C2 /* DNBArchImplARM64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 266B5ECF1460A68200E43F0A /* DNBArchImplARM64.cpp */; }; 456F676B1AD46CE9002850C2 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 26ACA3340D3E956300A2120B /* CoreFoundation.framework */; settings = {ATTRIBUTES = (Required, ); }; }; 49D404621E39260F00570CDC /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 49D404611E39260F00570CDC /* Foundation.framework */; }; AF48558C1D75126800D19C07 /* StdStringExtractor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF48558B1D75126800D19C07 /* StdStringExtractor.cpp */; }; AF48558D1D75127500D19C07 /* StdStringExtractor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF48558B1D75126800D19C07 /* StdStringExtractor.cpp */; }; AFA3FCA11E39984900218D5E /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 49D404611E39260F00570CDC /* Foundation.framework */; }; AFEC3364194A8B0B00FF05C6 /* Genealogy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AFEC3363194A8B0B00FF05C6 /* Genealogy.cpp */; }; + D6631CA91E848FE9006A7B11 /* SocketAddress.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D6631CA81E848FE9006A7B11 /* SocketAddress.cpp */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ 2307CCCC1D4A5DAE0016ABC0 /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = ""; }; 233B4EA51D2DB54300E98261 /* JSON.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSON.cpp; sourceTree = ""; }; 233B4EA61D2DB54300E98261 /* JSON.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSON.h; sourceTree = ""; }; 233B4EA81D2DB96A00E98261 /* StringConvert.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StringConvert.cpp; path = ../../../source/Host/common/StringConvert.cpp; sourceTree = ""; }; 23562ECF1D34110D00AB2BD4 /* DarwinLogTypes.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DarwinLogTypes.h; sourceTree = ""; }; 23562ED01D3424DF00AB2BD4 /* LogMessageOsLog.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LogMessageOsLog.cpp; sourceTree = ""; }; 23562ED11D3424DF00AB2BD4 /* LogMessageOsLog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LogMessageOsLog.h; sourceTree = ""; }; 23562ED41D3426DD00AB2BD4 /* ActivityStore.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ActivityStore.h; sourceTree = ""; }; 23562ED51D342A5A00AB2BD4 /* ActivityStore.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ActivityStore.cpp; sourceTree = ""; }; 23562ED81D342B0000AB2BD4 /* LogMessage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LogMessage.cpp; sourceTree = ""; }; 237821AD1D4917D20028B7A1 /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = ""; }; 237821AE1D4917D20028B7A1 /* LogFilterExactMatch.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LogFilterExactMatch.cpp; sourceTree = ""; }; 237821AF1D4917D20028B7A1 /* LogFilterExactMatch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LogFilterExactMatch.h; sourceTree = ""; }; 23AC04C41D2F41A00072351D /* LogFilter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LogFilter.cpp; sourceTree = ""; }; 23AC04C51D2F41A00072351D /* LogFilter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LogFilter.h; sourceTree = ""; }; 23AC04C81D2F42250072351D /* LogFilterChain.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LogFilterChain.cpp; sourceTree = ""; }; 23AC04C91D2F42250072351D /* LogFilterChain.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LogFilterChain.h; sourceTree = ""; }; 23AC04CC1D2F42F10072351D /* DarwinLogInterfaces.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DarwinLogInterfaces.h; sourceTree = ""; }; 23AC04CD1D2F58AF0072351D /* LogFilterRegex.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LogFilterRegex.cpp; sourceTree = ""; }; 23AC04CE1D2F58AF0072351D /* LogFilterRegex.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LogFilterRegex.h; sourceTree = ""; }; 23AC04D11D2F60130072351D /* LogMessage.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LogMessage.h; sourceTree = ""; }; 23AE72E21D25DECF00945BCE /* DarwinLogCollector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DarwinLogCollector.cpp; sourceTree = ""; }; 23AE72E31D25DECF00945BCE /* DarwinLogCollector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DarwinLogCollector.h; sourceTree = ""; }; 23AE72E61D25DEFB00945BCE /* ActivityStreamSPI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ActivityStreamSPI.h; sourceTree = ""; }; 23CF6F5E1D28A3760088ADC9 /* DarwinLogEvent.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DarwinLogEvent.h; sourceTree = ""; }; 23D1B0271D497E8B00FF831B /* OsLogger.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = OsLogger.cpp; sourceTree = ""; }; 23D1B0281D497E8B00FF831B /* OsLogger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OsLogger.h; sourceTree = ""; }; 260828DE0CBAF7F400F95054 /* DNBRuntimeAction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DNBRuntimeAction.h; sourceTree = ""; }; 260E7331114BFFE600D1DFB3 /* DNBThreadResumeActions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DNBThreadResumeActions.cpp; sourceTree = ""; }; 260E7332114BFFE600D1DFB3 /* DNBThreadResumeActions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DNBThreadResumeActions.h; sourceTree = ""; }; 260FC7320E5B290400043FC9 /* debugnub-exports */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "debugnub-exports"; sourceTree = SOURCE_ROOT; }; 26203D1C1641EFB200A662F7 /* com.apple.debugserver.applist.internal.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = com.apple.debugserver.applist.internal.plist; sourceTree = ""; }; 26203D1D1641EFB200A662F7 /* com.apple.debugserver.internal.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = com.apple.debugserver.internal.plist; sourceTree = ""; }; 26242C390DDBD33C0054A4CC /* debugserver-entitlements.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "debugserver-entitlements.plist"; sourceTree = ""; }; 264D5D571293835600ED4C01 /* DNBArch.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DNBArch.cpp; sourceTree = ""; }; 264F679A1B2F9EB200140093 /* JSONGenerator.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JSONGenerator.h; sourceTree = ""; }; 26593A060D4931CC001C9FE3 /* ChangeLog */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ChangeLog; sourceTree = ""; }; 266B5ECF1460A68200E43F0A /* DNBArchImplARM64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DNBArchImplARM64.cpp; sourceTree = ""; }; 266B5ED01460A68200E43F0A /* DNBArchImplARM64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DNBArchImplARM64.h; sourceTree = ""; }; 2672DBEE0EEF446700E92059 /* PThreadMutex.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PThreadMutex.cpp; sourceTree = ""; }; 2675D4220CCEB705000F49AF /* DNBArchImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = DNBArchImpl.cpp; path = arm/DNBArchImpl.cpp; sourceTree = ""; }; 2675D4230CCEB705000F49AF /* DNBArchImpl.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = DNBArchImpl.h; path = arm/DNBArchImpl.h; sourceTree = ""; }; 2695DD910D3EBFF6007E4CA2 /* CFBundle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CFBundle.cpp; sourceTree = ""; }; 2695DD920D3EBFF6007E4CA2 /* CFBundle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CFBundle.h; sourceTree = ""; }; 2695DD9A0D3EC160007E4CA2 /* CFString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CFString.h; sourceTree = ""; }; 2695DD9B0D3EC160007E4CA2 /* CFString.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CFString.cpp; sourceTree = ""; }; 269E8DF8164B2ED200AD65F6 /* com.apple.debugserver.posix.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = com.apple.debugserver.posix.plist; sourceTree = ""; }; 26A02918114AB9240029C479 /* debugserver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = debugserver.cpp; sourceTree = ""; }; 26A4BAED0D498B7D00A9BEAB /* com.apple.debugserver.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = com.apple.debugserver.plist; sourceTree = ""; }; 26A68F7D0D104EC800665A9E /* RNBContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNBContext.h; sourceTree = ""; }; 26A68F7E0D104EC800665A9E /* RNBContext.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RNBContext.cpp; sourceTree = ""; }; 26A68FAF0D1054DA00665A9E /* RNBSocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNBSocket.h; sourceTree = ""; }; 26A68FB00D1054DA00665A9E /* RNBSocket.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RNBSocket.cpp; sourceTree = ""; }; 26A68FD50D10574500665A9E /* RNBRemote.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNBRemote.h; sourceTree = ""; }; 26A68FD60D10574500665A9E /* RNBRemote.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RNBRemote.cpp; sourceTree = ""; }; 26A8FE1E0D11A77B00203048 /* DNBTimer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DNBTimer.h; sourceTree = ""; }; 26ACA3340D3E956300A2120B /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = System/Library/Frameworks/CoreFoundation.framework; sourceTree = SDKROOT; }; 26B67DE00EE9BC30006C8BC0 /* MachTask.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MachTask.h; sourceTree = ""; }; 26B67DE10EE9BC30006C8BC0 /* MachTask.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MachTask.mm; sourceTree = ""; }; 26C637D60C71334A0024798E /* DNB.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = DNB.cpp; sourceTree = ""; }; 26C637D70C71334A0024798E /* DNB.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DNB.h; sourceTree = ""; }; 26C637D80C71334A0024798E /* DNBArch.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DNBArch.h; sourceTree = ""; }; 26C637D90C71334A0024798E /* DNBBreakpoint.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = DNBBreakpoint.cpp; sourceTree = ""; }; 26C637DA0C71334A0024798E /* DNBBreakpoint.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DNBBreakpoint.h; sourceTree = ""; }; 26C637DB0C71334A0024798E /* DNBDataRef.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = DNBDataRef.cpp; sourceTree = ""; }; 26C637DC0C71334A0024798E /* DNBDataRef.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DNBDataRef.h; sourceTree = ""; }; 26C637DD0C71334A0024798E /* DNBDefs.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = DNBDefs.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; 26C637DE0C71334A0024798E /* DNBError.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = DNBError.cpp; sourceTree = ""; }; 26C637DF0C71334A0024798E /* DNBError.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DNBError.h; sourceTree = ""; }; 26C637E00C71334A0024798E /* DNBLog.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = DNBLog.cpp; sourceTree = ""; }; 26C637E10C71334A0024798E /* DNBLog.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DNBLog.h; sourceTree = ""; }; 26C637E20C71334A0024798E /* DNBRegisterInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = DNBRegisterInfo.cpp; sourceTree = ""; }; 26C637E30C71334A0024798E /* DNBRegisterInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DNBRegisterInfo.h; sourceTree = ""; }; 26C637E70C71334A0024798E /* CFUtils.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CFUtils.h; sourceTree = ""; }; 26C637E80C71334A0024798E /* dbgnub-mig.defs */ = {isa = PBXFileReference; explicitFileType = sourcecode.mig; fileEncoding = 30; path = "dbgnub-mig.defs"; sourceTree = ""; }; 26C637EA0C71334A0024798E /* DNBArchImplI386.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = DNBArchImplI386.cpp; sourceTree = ""; }; 26C637EB0C71334A0024798E /* DNBArchImplI386.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DNBArchImplI386.h; sourceTree = ""; }; 26C637EE0C71334A0024798E /* MachException.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = MachException.cpp; sourceTree = ""; }; 26C637EF0C71334A0024798E /* MachException.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MachException.h; sourceTree = ""; }; 26C637F00C71334A0024798E /* MachProcess.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = MachProcess.mm; sourceTree = ""; }; 26C637F10C71334A0024798E /* MachProcess.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MachProcess.h; sourceTree = ""; }; 26C637F20C71334A0024798E /* MachThread.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = MachThread.cpp; sourceTree = ""; }; 26C637F30C71334A0024798E /* MachThread.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MachThread.h; sourceTree = ""; }; 26C637F40C71334A0024798E /* MachThreadList.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = MachThreadList.cpp; sourceTree = ""; }; 26C637F50C71334A0024798E /* MachThreadList.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MachThreadList.h; sourceTree = ""; }; 26C637F60C71334A0024798E /* MachVMMemory.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = MachVMMemory.cpp; sourceTree = ""; }; 26C637F70C71334A0024798E /* MachVMMemory.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MachVMMemory.h; sourceTree = ""; }; 26C637F80C71334A0024798E /* MachVMRegion.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = MachVMRegion.cpp; sourceTree = ""; }; 26C637F90C71334A0024798E /* MachVMRegion.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MachVMRegion.h; sourceTree = ""; }; 26C637FB0C71334A0024798E /* DNBArchImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = DNBArchImpl.cpp; sourceTree = ""; }; 26C637FC0C71334A0024798E /* DNBArchImpl.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DNBArchImpl.h; sourceTree = ""; }; 26C637FD0C71334A0024798E /* PThreadCondition.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PThreadCondition.h; sourceTree = ""; }; 26C637FE0C71334A0024798E /* PThreadEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = PThreadEvent.cpp; sourceTree = ""; }; 26C637FF0C71334A0024798E /* PThreadEvent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PThreadEvent.h; sourceTree = ""; }; 26C638000C71334A0024798E /* PThreadMutex.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PThreadMutex.h; sourceTree = ""; }; 26C638010C71334A0024798E /* SysSignal.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SysSignal.cpp; sourceTree = ""; }; 26C638020C71334A0024798E /* SysSignal.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SysSignal.h; sourceTree = ""; }; 26C638050C71334A0024798E /* TTYState.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = TTYState.cpp; sourceTree = ""; }; 26C638060C71334A0024798E /* TTYState.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = TTYState.h; sourceTree = ""; }; 26CE0594115C31C20022F371 /* debugserver */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = debugserver; sourceTree = BUILT_PRODUCTS_DIR; }; 26CF99A21142EB7400011AAB /* DNBArchImplX86_64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DNBArchImplX86_64.cpp; sourceTree = ""; }; 26CF99A31142EB7400011AAB /* DNBArchImplX86_64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DNBArchImplX86_64.h; sourceTree = ""; }; 26E6B9DA0D1329010037ECDD /* RNBDefs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNBDefs.h; sourceTree = ""; }; 456F67721AD46CE9002850C2 /* debugserver-nonui */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "debugserver-nonui"; sourceTree = BUILT_PRODUCTS_DIR; }; 49D404611E39260F00570CDC /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 49F530111331519C008956F6 /* MachRegisterStatesI386.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MachRegisterStatesI386.h; sourceTree = ""; }; 49F5301213316D7F008956F6 /* MachRegisterStatesX86_64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MachRegisterStatesX86_64.h; sourceTree = ""; }; 9457ECF61419864100DFE7D8 /* stack_logging.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = stack_logging.h; sourceTree = ""; }; AF0934BA18E12B92005A11FD /* Genealogy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Genealogy.h; sourceTree = ""; }; AF0934BB18E12B92005A11FD /* GenealogySPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GenealogySPI.h; sourceTree = ""; }; AF48558B1D75126800D19C07 /* StdStringExtractor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StdStringExtractor.cpp; sourceTree = ""; }; AF61C60418F75ABC00B48D9D /* debugserver-macosx-entitlements.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "debugserver-macosx-entitlements.plist"; sourceTree = ""; }; AF67ABFF0D34604D0022D128 /* PseudoTerminal.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PseudoTerminal.cpp; sourceTree = ""; }; AF67AC000D34604D0022D128 /* PseudoTerminal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PseudoTerminal.h; sourceTree = ""; }; AFEC3363194A8B0B00FF05C6 /* Genealogy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Genealogy.cpp; sourceTree = ""; }; + D6631CA81E848FE9006A7B11 /* SocketAddress.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = SocketAddress.cpp; path = ../../source/Host/common/SocketAddress.cpp; sourceTree = ""; }; ED128B7918E1F163003F6A7B /* libpmenergy.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libpmenergy.dylib; path = usr/lib/libpmenergy.dylib; sourceTree = SDKROOT; }; ED128B7A18E1F163003F6A7B /* libpmsample.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libpmsample.dylib; path = usr/lib/libpmsample.dylib; sourceTree = SDKROOT; }; EF88788B0D9C7558001831DA /* com.apple.debugserver.applist.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = com.apple.debugserver.applist.plist; sourceTree = ""; }; EF88789F0D9C797C001831DA /* RNBServices.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNBServices.h; sourceTree = ""; }; EF8878A00D9C797C001831DA /* RNBServices.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RNBServices.cpp; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ 26CE0592115C31C20022F371 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( 49D404621E39260F00570CDC /* Foundation.framework in Frameworks */, 26CE05CF115C36F70022F371 /* CoreFoundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; 456F676A1AD46CE9002850C2 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( 456F676B1AD46CE9002850C2 /* CoreFoundation.framework in Frameworks */, AFA3FCA11E39984900218D5E /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ 08FB7794FE84155DC02AAC07 /* dbgnub */ = { isa = PBXGroup; children = ( + D6631CA81E848FE9006A7B11 /* SocketAddress.cpp */, 26ACA3330D3E94F200A2120B /* Framework */, 26C637D50C71334A0024798E /* source */, 1AB674ADFE9D54B511CA2CBB /* Products */, 49D404601E39260F00570CDC /* Frameworks */, ); name = dbgnub; sourceTree = ""; }; 1AB674ADFE9D54B511CA2CBB /* Products */ = { isa = PBXGroup; children = ( 26CE0594115C31C20022F371 /* debugserver */, 456F67721AD46CE9002850C2 /* debugserver-nonui */, ); name = Products; sourceTree = ""; }; 23AC04C31D2F3E9A0072351D /* DarwinLog */ = { isa = PBXGroup; children = ( 237821AD1D4917D20028B7A1 /* CMakeLists.txt */, 23562ED41D3426DD00AB2BD4 /* ActivityStore.h */, 23562ED51D342A5A00AB2BD4 /* ActivityStore.cpp */, 23AE72E61D25DEFB00945BCE /* ActivityStreamSPI.h */, 23AE72E31D25DECF00945BCE /* DarwinLogCollector.h */, 23AE72E21D25DECF00945BCE /* DarwinLogCollector.cpp */, 23CF6F5E1D28A3760088ADC9 /* DarwinLogEvent.h */, 23AC04CC1D2F42F10072351D /* DarwinLogInterfaces.h */, 23562ECF1D34110D00AB2BD4 /* DarwinLogTypes.h */, 23AC04C51D2F41A00072351D /* LogFilter.h */, 23AC04C41D2F41A00072351D /* LogFilter.cpp */, 23AC04C91D2F42250072351D /* LogFilterChain.h */, 23AC04C81D2F42250072351D /* LogFilterChain.cpp */, 237821AF1D4917D20028B7A1 /* LogFilterExactMatch.h */, 237821AE1D4917D20028B7A1 /* LogFilterExactMatch.cpp */, 23AC04CE1D2F58AF0072351D /* LogFilterRegex.h */, 23AC04CD1D2F58AF0072351D /* LogFilterRegex.cpp */, 23AC04D11D2F60130072351D /* LogMessage.h */, 23562ED81D342B0000AB2BD4 /* LogMessage.cpp */, 23562ED11D3424DF00AB2BD4 /* LogMessageOsLog.h */, 23562ED01D3424DF00AB2BD4 /* LogMessageOsLog.cpp */, ); path = DarwinLog; sourceTree = ""; }; 266B5ECE1460A68200E43F0A /* arm64 */ = { isa = PBXGroup; children = ( 266B5ECF1460A68200E43F0A /* DNBArchImplARM64.cpp */, 266B5ED01460A68200E43F0A /* DNBArchImplARM64.h */, ); path = arm64; sourceTree = ""; }; 2675D41C0CCEB6CF000F49AF /* arm */ = { isa = PBXGroup; children = ( 2675D4220CCEB705000F49AF /* DNBArchImpl.cpp */, 2675D4230CCEB705000F49AF /* DNBArchImpl.h */, ); name = arm; sourceTree = ""; }; 26A028FE114AB6A60029C479 /* Resources */ = { isa = PBXGroup; children = ( 269E8DF8164B2ED200AD65F6 /* com.apple.debugserver.posix.plist */, 26203D1C1641EFB200A662F7 /* com.apple.debugserver.applist.internal.plist */, 26203D1D1641EFB200A662F7 /* com.apple.debugserver.internal.plist */, 260FC7320E5B290400043FC9 /* debugnub-exports */, 26242C390DDBD33C0054A4CC /* debugserver-entitlements.plist */, AF61C60418F75ABC00B48D9D /* debugserver-macosx-entitlements.plist */, 26A4BAED0D498B7D00A9BEAB /* com.apple.debugserver.plist */, EF88788B0D9C7558001831DA /* com.apple.debugserver.applist.plist */, ); name = Resources; sourceTree = ""; }; 26A028FF114AB6BB0029C479 /* libdebugnub */ = { isa = PBXGroup; children = ( 26C637E60C71334A0024798E /* MacOSX */, 260828DE0CBAF7F400F95054 /* DNBRuntimeAction.h */, 26A8FE1E0D11A77B00203048 /* DNBTimer.h */, 26C637D70C71334A0024798E /* DNB.h */, 26C637D60C71334A0024798E /* DNB.cpp */, 26C637D80C71334A0024798E /* DNBArch.h */, 264D5D571293835600ED4C01 /* DNBArch.cpp */, 26C637DA0C71334A0024798E /* DNBBreakpoint.h */, 26C637D90C71334A0024798E /* DNBBreakpoint.cpp */, 26C637DC0C71334A0024798E /* DNBDataRef.h */, 26C637DB0C71334A0024798E /* DNBDataRef.cpp */, 26C637DD0C71334A0024798E /* DNBDefs.h */, 26C637DF0C71334A0024798E /* DNBError.h */, 26C637DE0C71334A0024798E /* DNBError.cpp */, 26C637E10C71334A0024798E /* DNBLog.h */, 26C637E00C71334A0024798E /* DNBLog.cpp */, 26C637E30C71334A0024798E /* DNBRegisterInfo.h */, 26C637E20C71334A0024798E /* DNBRegisterInfo.cpp */, 260E7332114BFFE600D1DFB3 /* DNBThreadResumeActions.h */, 260E7331114BFFE600D1DFB3 /* DNBThreadResumeActions.cpp */, 233B4EA61D2DB54300E98261 /* JSON.h */, 233B4EA51D2DB54300E98261 /* JSON.cpp */, 264F679A1B2F9EB200140093 /* JSONGenerator.h */, AF67AC000D34604D0022D128 /* PseudoTerminal.h */, AF67ABFF0D34604D0022D128 /* PseudoTerminal.cpp */, 26C637FD0C71334A0024798E /* PThreadCondition.h */, 26C637FF0C71334A0024798E /* PThreadEvent.h */, 26C637FE0C71334A0024798E /* PThreadEvent.cpp */, 26C638000C71334A0024798E /* PThreadMutex.h */, 2672DBEE0EEF446700E92059 /* PThreadMutex.cpp */, 233B4EA81D2DB96A00E98261 /* StringConvert.cpp */, 26C638020C71334A0024798E /* SysSignal.h */, 26C638010C71334A0024798E /* SysSignal.cpp */, 26C638060C71334A0024798E /* TTYState.h */, 26C638050C71334A0024798E /* TTYState.cpp */, ); name = libdebugnub; sourceTree = ""; }; 26ACA3330D3E94F200A2120B /* Framework */ = { isa = PBXGroup; children = ( ED128B7918E1F163003F6A7B /* libpmenergy.dylib */, ED128B7A18E1F163003F6A7B /* libpmsample.dylib */, 26ACA3340D3E956300A2120B /* CoreFoundation.framework */, ); name = Framework; sourceTree = ""; }; 26C637D50C71334A0024798E /* source */ = { isa = PBXGroup; children = ( 26593A060D4931CC001C9FE3 /* ChangeLog */, 26DEFD6C0D104C23008A5A07 /* debugserver */, 26A028FF114AB6BB0029C479 /* libdebugnub */, ); indentWidth = 4; path = source; sourceTree = ""; tabWidth = 4; usesTabs = 0; }; 26C637E60C71334A0024798E /* MacOSX */ = { isa = PBXGroup; children = ( 23AC04C31D2F3E9A0072351D /* DarwinLog */, 2695DD920D3EBFF6007E4CA2 /* CFBundle.h */, 2695DD910D3EBFF6007E4CA2 /* CFBundle.cpp */, 2695DD9A0D3EC160007E4CA2 /* CFString.h */, 2695DD9B0D3EC160007E4CA2 /* CFString.cpp */, 26C637E70C71334A0024798E /* CFUtils.h */, 2307CCCC1D4A5DAE0016ABC0 /* CMakeLists.txt */, 2675D41C0CCEB6CF000F49AF /* arm */, 266B5ECE1460A68200E43F0A /* arm64 */, 26C637E90C71334A0024798E /* i386 */, 26C637FA0C71334A0024798E /* ppc */, 26CF99A11142EB7400011AAB /* x86_64 */, 26C637E80C71334A0024798E /* dbgnub-mig.defs */, AFEC3363194A8B0B00FF05C6 /* Genealogy.cpp */, AF0934BA18E12B92005A11FD /* Genealogy.h */, AF0934BB18E12B92005A11FD /* GenealogySPI.h */, 26C637EF0C71334A0024798E /* MachException.h */, 26C637EE0C71334A0024798E /* MachException.cpp */, 26C637F10C71334A0024798E /* MachProcess.h */, 26C637F00C71334A0024798E /* MachProcess.mm */, 26C637F30C71334A0024798E /* MachThread.h */, 26C637F20C71334A0024798E /* MachThread.cpp */, 26C637F50C71334A0024798E /* MachThreadList.h */, 26C637F40C71334A0024798E /* MachThreadList.cpp */, 26C637F70C71334A0024798E /* MachVMMemory.h */, 26C637F60C71334A0024798E /* MachVMMemory.cpp */, 26C637F90C71334A0024798E /* MachVMRegion.h */, 26C637F80C71334A0024798E /* MachVMRegion.cpp */, 26B67DE00EE9BC30006C8BC0 /* MachTask.h */, 26B67DE10EE9BC30006C8BC0 /* MachTask.mm */, 23D1B0281D497E8B00FF831B /* OsLogger.h */, 23D1B0271D497E8B00FF831B /* OsLogger.cpp */, 9457ECF61419864100DFE7D8 /* stack_logging.h */, ); path = MacOSX; sourceTree = ""; }; 26C637E90C71334A0024798E /* i386 */ = { isa = PBXGroup; children = ( 26C637EA0C71334A0024798E /* DNBArchImplI386.cpp */, 26C637EB0C71334A0024798E /* DNBArchImplI386.h */, 49F530111331519C008956F6 /* MachRegisterStatesI386.h */, ); path = i386; sourceTree = ""; }; 26C637FA0C71334A0024798E /* ppc */ = { isa = PBXGroup; children = ( 26C637FB0C71334A0024798E /* DNBArchImpl.cpp */, 26C637FC0C71334A0024798E /* DNBArchImpl.h */, ); path = ppc; sourceTree = ""; }; 26CF99A11142EB7400011AAB /* x86_64 */ = { isa = PBXGroup; children = ( 26CF99A21142EB7400011AAB /* DNBArchImplX86_64.cpp */, 26CF99A31142EB7400011AAB /* DNBArchImplX86_64.h */, 49F5301213316D7F008956F6 /* MachRegisterStatesX86_64.h */, ); path = x86_64; sourceTree = ""; }; 26DEFD6C0D104C23008A5A07 /* debugserver */ = { isa = PBXGroup; children = ( 26A02918114AB9240029C479 /* debugserver.cpp */, 26A028FE114AB6A60029C479 /* Resources */, 26A68F7D0D104EC800665A9E /* RNBContext.h */, 26A68F7E0D104EC800665A9E /* RNBContext.cpp */, EF88789F0D9C797C001831DA /* RNBServices.h */, EF8878A00D9C797C001831DA /* RNBServices.cpp */, 26A68FAF0D1054DA00665A9E /* RNBSocket.h */, 26A68FB00D1054DA00665A9E /* RNBSocket.cpp */, 26A68FD50D10574500665A9E /* RNBRemote.h */, 26A68FD60D10574500665A9E /* RNBRemote.cpp */, 26E6B9DA0D1329010037ECDD /* RNBDefs.h */, AF48558B1D75126800D19C07 /* StdStringExtractor.cpp */, ); name = debugserver; sourceTree = ""; usesTabs = 0; }; 49D404601E39260F00570CDC /* Frameworks */ = { isa = PBXGroup; children = ( 49D404611E39260F00570CDC /* Foundation.framework */, ); name = Frameworks; sourceTree = ""; }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ 26CE0593115C31C20022F371 /* debugserver */ = { isa = PBXNativeTarget; buildConfigurationList = 26CE05A4115C31ED0022F371 /* Build configuration list for PBXNativeTarget "debugserver" */; buildPhases = ( 26CE0591115C31C20022F371 /* Sources */, 26CE0592115C31C20022F371 /* Frameworks */, 4C3326CB18B2A2F600EB5DD7 /* ShellScript */, ); buildRules = ( ); dependencies = ( ); name = debugserver; productName = "lldb-debugserver"; productReference = 26CE0594115C31C20022F371 /* debugserver */; productType = "com.apple.product-type.tool"; }; 456F67431AD46CE9002850C2 /* debugserver-mini */ = { isa = PBXNativeTarget; buildConfigurationList = 456F676D1AD46CE9002850C2 /* Build configuration list for PBXNativeTarget "debugserver-mini" */; buildPhases = ( 456F67451AD46CE9002850C2 /* Sources */, 456F676A1AD46CE9002850C2 /* Frameworks */, ); buildRules = ( ); dependencies = ( ); name = "debugserver-mini"; productName = "lldb-debugserver"; productReference = 456F67721AD46CE9002850C2 /* debugserver-nonui */; productType = "com.apple.product-type.tool"; }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ 08FB7793FE84155DC02AAC07 /* Project object */ = { isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0700; LastUpgradeCheck = 0720; }; buildConfigurationList = 1DEB914E08733D8E0010E9CD /* Build configuration list for PBXProject "debugserver" */; compatibilityVersion = "Xcode 3.2"; developmentRegion = English; hasScannedForEncodings = 1; knownRegions = ( English, Japanese, French, German, ); mainGroup = 08FB7794FE84155DC02AAC07 /* dbgnub */; projectDirPath = ""; projectRoot = ""; targets = ( 26CE0593115C31C20022F371 /* debugserver */, 456F67431AD46CE9002850C2 /* debugserver-mini */, ); }; /* End PBXProject section */ /* Begin PBXShellScriptBuildPhase section */ 4C3326CB18B2A2F600EB5DD7 /* ShellScript */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = "/bin/sh -x"; shellScript = "if [ \"${CONFIGURATION}\" != BuildAndIntegration ]\nthen\n if [ -n \"${DEBUGSERVER_USE_FROM_SYSTEM}\" ]\n then\n\t\tditto \"${DEVELOPER_DIR}/../SharedFrameworks/LLDB.framework/Resources/debugserver\" \"${TARGET_BUILD_DIR}/${TARGET_NAME}\"\n elif [ \"${DEBUGSERVER_DISABLE_CODESIGN}\" == \"\" ]\n then\n codesign -f -s lldb_codesign \"${TARGET_BUILD_DIR}/${TARGET_NAME}\"\n fi\nfi\n"; }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ 26CE0591115C31C20022F371 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + D6631CA91E848FE9006A7B11 /* SocketAddress.cpp in Sources */, 26CE05A7115C360D0022F371 /* DNBError.cpp in Sources */, 26CE05A8115C36170022F371 /* DNBThreadResumeActions.cpp in Sources */, 26CE05A9115C36250022F371 /* debugserver.cpp in Sources */, AF48558C1D75126800D19C07 /* StdStringExtractor.cpp in Sources */, 26CE05AA115C36260022F371 /* RNBContext.cpp in Sources */, 26CE05AB115C36270022F371 /* RNBServices.cpp in Sources */, 23D1B0291D497E8B00FF831B /* OsLogger.cpp in Sources */, 26CE05AC115C36280022F371 /* RNBSocket.cpp in Sources */, 26CE05AD115C36280022F371 /* RNBRemote.cpp in Sources */, 26CE05AE115C36320022F371 /* dbgnub-mig.defs in Sources */, 26CE05B0115C36340022F371 /* MachException.cpp in Sources */, 26CE05B1115C36350022F371 /* MachProcess.mm in Sources */, 26CE05B2115C36360022F371 /* MachThread.cpp in Sources */, 233B4EA71D2DB54300E98261 /* JSON.cpp in Sources */, 26CE05B3115C36370022F371 /* MachThreadList.cpp in Sources */, 26CE05B4115C36380022F371 /* MachVMMemory.cpp in Sources */, 26CE05B5115C36380022F371 /* MachVMRegion.cpp in Sources */, 26CE05B6115C36390022F371 /* MachTask.mm in Sources */, 26CE05B7115C363B0022F371 /* DNB.cpp in Sources */, AFEC3364194A8B0B00FF05C6 /* Genealogy.cpp in Sources */, 23AC04CF1D2F58AF0072351D /* LogFilterRegex.cpp in Sources */, 233B4EA91D2DB96A00E98261 /* StringConvert.cpp in Sources */, 23562ED21D3424DF00AB2BD4 /* LogMessageOsLog.cpp in Sources */, 26CE05B8115C363C0022F371 /* DNBBreakpoint.cpp in Sources */, 26CE05B9115C363D0022F371 /* DNBDataRef.cpp in Sources */, 23AC04CA1D2F42250072351D /* LogFilterChain.cpp in Sources */, 23562ED61D342A5A00AB2BD4 /* ActivityStore.cpp in Sources */, 26CE05BA115C363E0022F371 /* DNBLog.cpp in Sources */, 23AC04C61D2F41A00072351D /* LogFilter.cpp in Sources */, 26CE05BB115C363F0022F371 /* DNBRegisterInfo.cpp in Sources */, 26CE05BC115C36420022F371 /* PThreadEvent.cpp in Sources */, 26CE05BD115C36430022F371 /* PThreadMutex.cpp in Sources */, 26CE05BE115C36440022F371 /* SysSignal.cpp in Sources */, 23AE72E41D25DECF00945BCE /* DarwinLogCollector.cpp in Sources */, 26CE05BF115C364D0022F371 /* DNBArchImplX86_64.cpp in Sources */, 26CE05C0115C364F0022F371 /* DNBArchImplI386.cpp in Sources */, 26CE05C1115C36510022F371 /* DNBArchImpl.cpp in Sources */, 26CE05C2115C36550022F371 /* DNBArchImpl.cpp in Sources */, 26CE05C5115C36590022F371 /* CFBundle.cpp in Sources */, 26CE05C3115C36580022F371 /* CFString.cpp in Sources */, 23562ED91D342B0000AB2BD4 /* LogMessage.cpp in Sources */, 26CE05F1115C387C0022F371 /* PseudoTerminal.cpp in Sources */, 264D5D581293835600ED4C01 /* DNBArch.cpp in Sources */, 237821B01D4917D20028B7A1 /* LogFilterExactMatch.cpp in Sources */, 266B5ED11460A68200E43F0A /* DNBArchImplARM64.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; 456F67451AD46CE9002850C2 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( 456F67461AD46CE9002850C2 /* DNBError.cpp in Sources */, 456F67471AD46CE9002850C2 /* DNBThreadResumeActions.cpp in Sources */, 456F67481AD46CE9002850C2 /* debugserver.cpp in Sources */, 23043C9D1D35DBEC00FC25CA /* JSON.cpp in Sources */, 456F67491AD46CE9002850C2 /* RNBContext.cpp in Sources */, 23D1B02A1D497E8B00FF831B /* OsLogger.cpp in Sources */, 456F674A1AD46CE9002850C2 /* RNBServices.cpp in Sources */, 456F674B1AD46CE9002850C2 /* RNBSocket.cpp in Sources */, 456F674C1AD46CE9002850C2 /* RNBRemote.cpp in Sources */, 456F674D1AD46CE9002850C2 /* dbgnub-mig.defs in Sources */, 456F674E1AD46CE9002850C2 /* MachException.cpp in Sources */, 456F674F1AD46CE9002850C2 /* MachProcess.mm in Sources */, 2307CCCB1D4A5D630016ABC0 /* LogFilterExactMatch.cpp in Sources */, 456F67501AD46CE9002850C2 /* MachThread.cpp in Sources */, 456F67511AD46CE9002850C2 /* MachThreadList.cpp in Sources */, 456F67521AD46CE9002850C2 /* MachVMMemory.cpp in Sources */, 456F67531AD46CE9002850C2 /* MachVMRegion.cpp in Sources */, 23562ED71D342A5A00AB2BD4 /* ActivityStore.cpp in Sources */, 456F67541AD46CE9002850C2 /* MachTask.mm in Sources */, 456F67551AD46CE9002850C2 /* DNB.cpp in Sources */, 456F67561AD46CE9002850C2 /* Genealogy.cpp in Sources */, 456F67571AD46CE9002850C2 /* DNBBreakpoint.cpp in Sources */, 456F67581AD46CE9002850C2 /* DNBDataRef.cpp in Sources */, 456F67591AD46CE9002850C2 /* DNBLog.cpp in Sources */, 23562ED31D3424DF00AB2BD4 /* LogMessageOsLog.cpp in Sources */, 456F675A1AD46CE9002850C2 /* DNBRegisterInfo.cpp in Sources */, 456F675B1AD46CE9002850C2 /* PThreadEvent.cpp in Sources */, 456F675C1AD46CE9002850C2 /* PThreadMutex.cpp in Sources */, 456F675D1AD46CE9002850C2 /* SysSignal.cpp in Sources */, 23AE72E51D25DEE100945BCE /* DarwinLogCollector.cpp in Sources */, 456F675E1AD46CE9002850C2 /* DNBArchImplX86_64.cpp in Sources */, 23562EDA1D342B0000AB2BD4 /* LogMessage.cpp in Sources */, 456F675F1AD46CE9002850C2 /* DNBArchImplI386.cpp in Sources */, 456F67601AD46CE9002850C2 /* DNBArchImpl.cpp in Sources */, 23AC04C71D2F41A00072351D /* LogFilter.cpp in Sources */, 23043C9E1D35DBFA00FC25CA /* StringConvert.cpp in Sources */, 456F67611AD46CE9002850C2 /* DNBArchImpl.cpp in Sources */, 456F67621AD46CE9002850C2 /* CFString.cpp in Sources */, 23AC04CB1D2F42250072351D /* LogFilterChain.cpp in Sources */, AF48558D1D75127500D19C07 /* StdStringExtractor.cpp in Sources */, 456F67641AD46CE9002850C2 /* CFBundle.cpp in Sources */, 456F67651AD46CE9002850C2 /* PseudoTerminal.cpp in Sources */, 456F67671AD46CE9002850C2 /* DNBArch.cpp in Sources */, 23AC04D01D2F58AF0072351D /* LogFilterRegex.cpp in Sources */, 456F67691AD46CE9002850C2 /* DNBArchImplARM64.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin XCBuildConfiguration section */ 1DEB914F08733D8E0010E9CD /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { "ARCHS[sdk=iphoneos*]" = ( arm64, armv7, ); "ARCHS[sdk=macosx*]" = "$(ARCHS_STANDARD_64_BIT)"; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = 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; CODE_SIGN_IDENTITY = ""; COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = 360.99.0; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; LLDB_COMPRESSION_CFLAGS = ""; "LLDB_COMPRESSION_CFLAGS[sdk=macosx10.11]" = "-DHAVE_LIBCOMPRESSION=1"; LLDB_COMPRESSION_LDFLAGS = ""; "LLDB_COMPRESSION_LDFLAGS[sdk=macosx10.11]" = "-weak-lcompression"; LLDB_OS_LOG_CFLAGS = "-DLLDB_USE_OS_LOG=$(LLDB_USE_OS_LOG)"; LLDB_USE_OS_LOG = 0; LLDB_ZLIB_CFLAGS = "-DHAVE_LIBZ=1"; LLDB_ZLIB_LDFLAGS = "-lz"; MACOSX_DEPLOYMENT_TARGET = 10.10; ONLY_ACTIVE_ARCH = YES; OTHER_CFLAGS = ""; STRIP_INSTALLED_PRODUCT = NO; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_BUILDER = "$(USER)"; }; name = Debug; }; 1DEB915008733D8E0010E9CD /* Release */ = { isa = XCBuildConfiguration; buildSettings = { "ARCHS[sdk=iphoneos*]" = ( armv7, armv7s, ); "ARCHS[sdk=macosx*]" = "$(ARCHS_STANDARD_64_BIT)"; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = 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; CURRENT_PROJECT_VERSION = 360.99.0; DEAD_CODE_STRIPPING = YES; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; LLDB_COMPRESSION_CFLAGS = ""; "LLDB_COMPRESSION_CFLAGS[sdk=macosx10.11]" = "-DHAVE_LIBCOMPRESSION=1"; LLDB_COMPRESSION_LDFLAGS = ""; "LLDB_COMPRESSION_LDFLAGS[sdk=macosx10.11]" = "-weak-lcompression"; LLDB_OS_LOG_CFLAGS = "-DLLDB_USE_OS_LOG=$(LLDB_USE_OS_LOG)"; LLDB_USE_OS_LOG = 0; LLDB_ZLIB_CFLAGS = "-DHAVE_LIBZ=1"; LLDB_ZLIB_LDFLAGS = "-lz"; MACOSX_DEPLOYMENT_TARGET = 10.10; ONLY_ACTIVE_ARCH = YES; OTHER_CFLAGS = ""; STRIPFLAGS = "-x"; STRIP_STYLE = debugging; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_BUILDER = "$(USER)"; }; name = Release; }; 262419A11198A93E00067686 /* BuildAndIntegration */ = { isa = XCBuildConfiguration; buildSettings = { "ARCHS[sdk=iphoneos*]" = arm64; "ARCHS[sdk=macosx*]" = "$(ARCHS_STANDARD_64_BIT)"; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = 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; CURRENT_PROJECT_VERSION = 360.99.0; DEAD_CODE_STRIPPING = YES; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; LLDB_COMPRESSION_CFLAGS = ""; "LLDB_COMPRESSION_CFLAGS[sdk=macosx10.11]" = "-DHAVE_LIBCOMPRESSION=1"; LLDB_COMPRESSION_LDFLAGS = ""; "LLDB_COMPRESSION_LDFLAGS[sdk=macosx10.11]" = "-weak-lcompression"; LLDB_OS_LOG_CFLAGS = "-DLLDB_USE_OS_LOG=$(LLDB_USE_OS_LOG)"; LLDB_USE_OS_LOG = 1; LLDB_ZLIB_CFLAGS = "-DHAVE_LIBZ=1"; LLDB_ZLIB_LDFLAGS = "-lz"; MACOSX_DEPLOYMENT_TARGET = 10.10; OTHER_CFLAGS = ""; STRIPFLAGS = "-x"; STRIP_STYLE = debugging; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_BUILDER = "$(USER)"; }; name = BuildAndIntegration; }; 262419A21198A93E00067686 /* BuildAndIntegration */ = { isa = XCBuildConfiguration; buildSettings = { CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; CLANG_CXX_LIBRARY = "libc++"; "CODE_SIGN_ENTITLEMENTS[sdk=iphoneos*]" = "source/debugserver-entitlements.plist"; "CODE_SIGN_ENTITLEMENTS[sdk=macosx*]" = "source/debugserver-macosx-entitlements.plist"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "-"; "CODE_SIGN_IDENTITY[sdk=macosx*]" = "-"; COPY_PHASE_STRIP = YES; CURRENT_PROJECT_VERSION = 360.99.0; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; FRAMEWORK_SEARCH_PATHS = $SDKROOT/System/Library/PrivateFrameworks; "FRAMEWORK_SEARCH_PATHS[sdk=iphoneos*][arch=*]" = ( "$(SDKROOT)/System/Library/PrivateFrameworks", "$(SDKROOT)/Developer/Library/PrivateFrameworks", ); "FRAMEWORK_SEARCH_PATHS[sdk=macosx*][arch=*]" = "$(SDKROOT)/System/Library/PrivateFrameworks"; GCC_C_LANGUAGE_STANDARD = c99; GCC_PREPROCESSOR_DEFINITIONS = LLDB_DEBUGSERVER_BUILDANDINTEGRATION; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; HEADER_SEARCH_PATHS = /System/Library/Frameworks/System.framework/PrivateHeaders; INSTALL_PATH = /usr/bin; "INSTALL_PATH[sdk=iphoneos*]" = /Developer/usr/bin/; LLDB_COMPRESSION_CFLAGS = ""; "LLDB_COMPRESSION_CFLAGS[sdk=appletvos*]" = "-DHAVE_LIBCOMPRESSION=1"; "LLDB_COMPRESSION_CFLAGS[sdk=iphoneos*]" = "-DHAVE_LIBCOMPRESSION=1"; "LLDB_COMPRESSION_CFLAGS[sdk=macosx10.11]" = "-DHAVE_LIBCOMPRESSION=1"; "LLDB_COMPRESSION_CFLAGS[sdk=macosx10.11internal]" = "-DHAVE_LIBCOMPRESSION=1"; "LLDB_COMPRESSION_CFLAGS[sdk=watchos*]" = "-DHAVE_LIBCOMPRESSION=1"; LLDB_COMPRESSION_LDFLAGS = ""; "LLDB_COMPRESSION_LDFLAGS[sdk=appletvos*]" = "-weak-lcompression"; "LLDB_COMPRESSION_LDFLAGS[sdk=iphoneos*]" = "-weak-lcompression"; "LLDB_COMPRESSION_LDFLAGS[sdk=macosx10.11]" = "-weak-lcompression"; "LLDB_COMPRESSION_LDFLAGS[sdk=macosx10.11internal]" = "-weak-lcompression"; "LLDB_COMPRESSION_LDFLAGS[sdk=watchos*]" = "-weak-lcompression"; LLDB_DEBUGSERVER = 1; LLDB_ENERGY_CFLAGS = ""; "LLDB_ENERGY_CFLAGS[sdk=macosx*]" = "-DLLDB_ENERGY"; LLDB_ENERGY_LFLAGS = ""; "LLDB_ENERGY_LFLAGS[sdk=macosx*]" = "-weak-lpmenergy -weak-lpmsample"; LLDB_ZLIB_CFLAGS = "-DHAVE_LIBZ=1"; LLDB_ZLIB_LDFLAGS = "-lz"; MACOSX_DEPLOYMENT_TARGET = 10.9; OTHER_CFLAGS = ( "-Wparentheses", "$(LLDB_ENERGY_CFLAGS)", "-DDT_VARIANT_$(DT_VARIANT)", "$(LLDB_COMPRESSION_CFLAGS)", "$(LLDB_ZLIB_CFLAGS)", "$(LLDB_OS_LOG_CFLAGS)", ); "OTHER_CFLAGS[sdk=iphoneos*]" = ( "-Wparentheses", "-DWITH_LOCKDOWN", "-DWITH_FBS", "-DWITH_BKS", "-DOS_OBJECT_USE_OBJC=0", "$(LLDB_COMPRESSION_CFLAGS)", "$(LLDB_ZLIB_CFLAGS)", "$(LLDB_OS_LOG_CFLAGS)", ); "OTHER_CPLUSPLUSFLAGS[sdk=iphoneos*][arch=*]" = "$(OTHER_CFLAGS)"; OTHER_LDFLAGS = ""; "OTHER_LDFLAGS[sdk=iphoneos*][arch=*]" = ( "-framework", SpringBoardServices, "-framework", BackBoardServices, "-llockdown", "-framework", FrontBoardServices, "-framework", MobileCoreServices, "$(LLDB_COMPRESSION_LDFLAGS)", "$(LLDB_ZLIB_LDFLAGS)", ); "OTHER_LDFLAGS[sdk=macosx*]" = ( "-sectcreate", __TEXT, __info_plist, "$(PROJECT_DIR)/resources/lldb-debugserver-Info.plist", "$(LLDB_ENERGY_LFLAGS)", "$(LLDB_COMPRESSION_LDFLAGS)", "$(LLDB_ZLIB_LDFLAGS)", ); OTHER_MIGFLAGS = "-I$(DERIVED_FILE_DIR)"; PRODUCT_NAME = debugserver; SDKROOT = macosx; "SDKROOT[arch=i386]" = macosx; "SDKROOT[arch=x86_64]" = macosx; "SDKROOT[arch=x86_64h]" = macosx; SKIP_INSTALL = YES; "SKIP_INSTALL[sdk=iphoneos*]" = NO; STRIP_INSTALLED_PRODUCT = YES; USER_HEADER_SEARCH_PATHS = "./source ../../source $(DERIVED_SOURCES_DIR) ../../include"; ZERO_LINK = NO; }; name = BuildAndIntegration; }; 26CE0596115C31C30022F371 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; CLANG_CXX_LIBRARY = "libc++"; "CODE_SIGN_ENTITLEMENTS[sdk=*]" = "source/debugserver-macosx-entitlements.plist"; "CODE_SIGN_ENTITLEMENTS[sdk=iphoneos*]" = "source/debugserver-entitlements.plist"; "CODE_SIGN_ENTITLEMENTS[sdk=macosx*]" = "source/debugserver-macosx-entitlements.plist"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=macosx*]" = ""; COPY_PHASE_STRIP = YES; CURRENT_PROJECT_VERSION = 360.99.0; FRAMEWORK_SEARCH_PATHS = $SDKROOT/System/Library/PrivateFrameworks; "FRAMEWORK_SEARCH_PATHS[sdk=iphoneos*][arch=*]" = ( "$(SDKROOT)/System/Library/PrivateFrameworks", "$(SDKROOT)/Developer/Library/PrivateFrameworks", ); "FRAMEWORK_SEARCH_PATHS[sdk=macosx*][arch=*]" = "$(SDKROOT)/System/Library/PrivateFrameworks"; GCC_C_LANGUAGE_STANDARD = c99; GCC_DYNAMIC_NO_PIC = NO; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = LLDB_DEBUGSERVER_DEBUG; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; INSTALL_PATH = /usr/bin; LLDB_COMPRESSION_CFLAGS = ""; "LLDB_COMPRESSION_CFLAGS[sdk=appletvos*]" = "-DHAVE_LIBCOMPRESSION=1"; "LLDB_COMPRESSION_CFLAGS[sdk=iphoneos*]" = "-DHAVE_LIBCOMPRESSION=1"; "LLDB_COMPRESSION_CFLAGS[sdk=macosx10.11]" = "-DHAVE_LIBCOMPRESSION=1"; "LLDB_COMPRESSION_CFLAGS[sdk=macosx10.11internal]" = "-DHAVE_LIBCOMPRESSION=1"; "LLDB_COMPRESSION_CFLAGS[sdk=watchos*]" = "-DHAVE_LIBCOMPRESSION=1"; LLDB_COMPRESSION_LDFLAGS = ""; "LLDB_COMPRESSION_LDFLAGS[sdk=appletvos*]" = "-weak-lcompression"; "LLDB_COMPRESSION_LDFLAGS[sdk=iphoneos*]" = "-weak-lcompression"; "LLDB_COMPRESSION_LDFLAGS[sdk=macosx10.11]" = "-weak-lcompression"; "LLDB_COMPRESSION_LDFLAGS[sdk=macosx10.11internal]" = "-weak-lcompression"; "LLDB_COMPRESSION_LDFLAGS[sdk=watchos*]" = "-weak-lcompression"; LLDB_DEBUGSERVER = 1; LLDB_ENERGY_CFLAGS = ""; "LLDB_ENERGY_CFLAGS[sdk=macosx.internal]" = "-DLLDB_ENERGY"; LLDB_ENERGY_LFLAGS = ""; "LLDB_ENERGY_LFLAGS[sdk=macosx.internal]" = "-weak-lpmenergy -weak-lpmsample"; LLDB_ZLIB_CFLAGS = "-DHAVE_LIBZ=1"; LLDB_ZLIB_LDFLAGS = "-lz"; MACOSX_DEPLOYMENT_TARGET = 10.9; OTHER_CFLAGS = ( "-Wparentheses", "$(LLDB_ENERGY_CFLAGS)", "-DDT_VARIANT_$(DT_VARIANT)", "$(LLDB_COMPRESSION_CFLAGS)", "$(LLDB_ZLIB_CFLAGS)", "$(LLDB_OS_LOG_CFLAGS)", ); "OTHER_CFLAGS[sdk=iphoneos*][arch=*]" = ( "-Wparentheses", "-DWITH_LOCKDOWN", "-DWITH_BKS", "-DWITH_FBS", "-DOS_OBJECT_USE_OBJC=0", "$(LLDB_COMPRESSION_CFLAGS)", "$(LLDB_ZLIB_CFLAGS)", "$(LLDB_OS_LOG_CFLAGS)", ); "OTHER_CPLUSPLUSFLAGS[sdk=iphoneos*][arch=*]" = "$(OTHER_CFLAGS)"; OTHER_LDFLAGS = ""; "OTHER_LDFLAGS[sdk=iphoneos*][arch=*]" = ( "-framework", SpringBoardServices, "-framework", BackBoardServices, "-llockdown", "-framework", FrontBoardServices, "-framework", MobileCoreServices, "$(LLDB_COMPRESSION_LDFLAGS)", "$(LLDB_ZLIB_LDFLAGS)", ); "OTHER_LDFLAGS[sdk=macosx*]" = ( "-sectcreate", __TEXT, __info_plist, "$(PROJECT_DIR)/resources/lldb-debugserver-Info.plist", "$(LLDB_ENERGY_LFLAGS)", "$(LLDB_ZLIB_LDFLAGS)", "$(LLDB_COMPRESSION_LDFLAGS)", ); OTHER_MIGFLAGS = "-I$(DERIVED_FILE_DIR)"; PRODUCT_NAME = debugserver; "PROVISIONING_PROFILE[sdk=iphoneos*]" = ""; "PROVISIONING_PROFILE[sdk=macosx*]" = ""; SDKROOT = macosx; "SDKROOT[arch=i386]" = macosx; "SDKROOT[arch=x86_64]" = macosx; "SDKROOT[arch=x86_64h]" = macosx; SKIP_INSTALL = YES; USER_HEADER_SEARCH_PATHS = "./source ../../source $(DERIVED_SOURCES_DIR) ../../include"; ZERO_LINK = NO; }; name = Debug; }; 26CE0597115C31C30022F371 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; CLANG_CXX_LIBRARY = "libc++"; "CODE_SIGN_ENTITLEMENTS[sdk=*]" = "source/debugserver-macosx-entitlements.plist"; "CODE_SIGN_ENTITLEMENTS[sdk=iphoneos*]" = "source/debugserver-entitlements.plist"; "CODE_SIGN_ENTITLEMENTS[sdk=macosx*]" = "source/debugserver-macosx-entitlements.plist"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=macosx*]" = ""; COPY_PHASE_STRIP = YES; CURRENT_PROJECT_VERSION = 360.99.0; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; FRAMEWORK_SEARCH_PATHS = $SDKROOT/System/Library/PrivateFrameworks; "FRAMEWORK_SEARCH_PATHS[sdk=iphoneos*][arch=*]" = ( "$(SDKROOT)/System/Library/PrivateFrameworks", "$(SDKROOT)/Developer/Library/PrivateFrameworks", ); "FRAMEWORK_SEARCH_PATHS[sdk=macosx*][arch=*]" = "$(SDKROOT)/System/Library/PrivateFrameworks"; GCC_C_LANGUAGE_STANDARD = c99; GCC_PREPROCESSOR_DEFINITIONS = LLDB_DEBUGSERVER_RELEASE; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; INSTALL_PATH = /usr/bin; LLDB_COMPRESSION_CFLAGS = ""; "LLDB_COMPRESSION_CFLAGS[sdk=appletvos*]" = "-DHAVE_LIBCOMPRESSION=1"; "LLDB_COMPRESSION_CFLAGS[sdk=iphoneos*]" = "-DHAVE_LIBCOMPRESSION=1"; "LLDB_COMPRESSION_CFLAGS[sdk=macosx10.11]" = "-DHAVE_LIBCOMPRESSION=1"; "LLDB_COMPRESSION_CFLAGS[sdk=macosx10.11internal]" = "-DHAVE_LIBCOMPRESSION=1"; "LLDB_COMPRESSION_CFLAGS[sdk=watchos*]" = "-DHAVE_LIBCOMPRESSION=1"; LLDB_COMPRESSION_LDFLAGS = ""; "LLDB_COMPRESSION_LDFLAGS[sdk=appletvos*]" = "-weak-lcompression"; "LLDB_COMPRESSION_LDFLAGS[sdk=iphoneos*]" = "-weak-lcompression"; "LLDB_COMPRESSION_LDFLAGS[sdk=macosx10.11]" = "-weak-lcompression"; "LLDB_COMPRESSION_LDFLAGS[sdk=macosx10.11internal]" = "-weak-lcompression"; "LLDB_COMPRESSION_LDFLAGS[sdk=watchos*]" = "-weak-lcompression"; LLDB_DEBUGSERVER = 1; LLDB_ENERGY_CFLAGS = ""; "LLDB_ENERGY_CFLAGS[sdk=macosx.internal]" = "-DLLDB_ENERGY"; LLDB_ENERGY_LFLAGS = ""; "LLDB_ENERGY_LFLAGS[sdk=macosx.internal]" = "-weak-lpmenergy -weak-lpmsample"; LLDB_ZLIB_CFLAGS = "-DHAVE_LIBZ=1"; LLDB_ZLIB_LDFLAGS = "-lz"; MACOSX_DEPLOYMENT_TARGET = 10.9; OTHER_CFLAGS = ( "-Wparentheses", "$(LLDB_ENERGY_CFLAGS)", "-DDT_VARIANT_$(DT_VARIANT)", "$(LLDB_COMPRESSION_CFLAGS)", "$(LLDB_ZLIB_CFLAGS)", "$(LLDB_OS_LOG_CFLAGS)", ); "OTHER_CFLAGS[sdk=iphoneos*][arch=*]" = ( "-Wparentheses", "-DWITH_LOCKDOWN", "-DWITH_FBS", "-DWITH_BKS", "-DOS_OBJECT_USE_OBJC=0", "$(LLDB_COMPRESSION_CFLAGS)", "$(LLDB_ZLIB_CFLAGS)", "$(LLDB_OS_LOG_CFLAGS)", ); "OTHER_CPLUSPLUSFLAGS[sdk=iphoneos*][arch=*]" = "$(OTHER_CFLAGS)"; OTHER_LDFLAGS = ""; "OTHER_LDFLAGS[sdk=iphoneos*][arch=*]" = ( "-framework", SpringBoardServices, "-framework", BackBoardServices, "-llockdown", "-framework", FrontBoardServices, "-framework", MobileCoreServices, "$(LLDB_COMPRESSION_LDFLAGS)", "$(LLDB_ZLIB_LDFLAGS)", ); "OTHER_LDFLAGS[sdk=macosx*]" = ( "-sectcreate", __TEXT, __info_plist, "$(PROJECT_DIR)/resources/lldb-debugserver-Info.plist", "$(LLDB_ENERGY_LFLAGS)", "$(LLDB_COMPRESSION_LDFLAGS)", "$(LLDB_ZLIB_LDFLAGS)", ); OTHER_MIGFLAGS = "-I$(DERIVED_FILE_DIR)"; PRODUCT_NAME = debugserver; "PROVISIONING_PROFILE[sdk=iphoneos*]" = ""; "PROVISIONING_PROFILE[sdk=macosx*]" = ""; SDKROOT = macosx; "SDKROOT[arch=i386]" = macosx; "SDKROOT[arch=x86_64]" = macosx; "SDKROOT[arch=x86_64h]" = macosx; SKIP_INSTALL = YES; USER_HEADER_SEARCH_PATHS = "./source ../../source $(DERIVED_SOURCES_DIR) ../../include"; ZERO_LINK = NO; }; name = Release; }; 456F676E1AD46CE9002850C2 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = 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; "CODE_SIGN_ENTITLEMENTS[sdk=*]" = "source/debugserver-macosx-entitlements.plist"; "CODE_SIGN_ENTITLEMENTS[sdk=iphoneos*]" = "source/debugserver-entitlements.plist"; "CODE_SIGN_ENTITLEMENTS[sdk=macosx*]" = "source/debugserver-macosx-entitlements.plist"; CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=macosx*]" = ""; COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = 360.99.0; ENABLE_STRICT_OBJC_MSGSEND = YES; FRAMEWORK_SEARCH_PATHS = $SDKROOT/System/Library/PrivateFrameworks; "FRAMEWORK_SEARCH_PATHS[sdk=iphoneos*][arch=*]" = ( "$(SDKROOT)/System/Library/PrivateFrameworks", "$(SDKROOT)/Developer/Library/PrivateFrameworks", ); "FRAMEWORK_SEARCH_PATHS[sdk=macosx*][arch=*]" = "$(SDKROOT)/System/Library/PrivateFrameworks"; GCC_C_LANGUAGE_STANDARD = c99; GCC_DYNAMIC_NO_PIC = NO; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = LLDB_DEBUGSERVER_DEBUG; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; INSTALL_PATH = /usr/local/bin; LLDB_COMPRESSION_CFLAGS = ""; "LLDB_COMPRESSION_CFLAGS[sdk=macosx10.11]" = "-DHAVE_LIBCOMPRESSION=1"; LLDB_COMPRESSION_LDFLAGS = ""; "LLDB_COMPRESSION_LDFLAGS[sdk=macosx10.11]" = "-weak-lcompression"; LLDB_DEBUGSERVER = 1; LLDB_ENERGY_CFLAGS = ""; "LLDB_ENERGY_CFLAGS[sdk=macosx.internal]" = "-DLLDB_ENERGY"; LLDB_ENERGY_LFLAGS = ""; "LLDB_ENERGY_LFLAGS[sdk=macosx.internal]" = "-weak-lpmenergy -weak-lpmsample"; LLDB_ZLIB_CFLAGS = "-DHAVE_LIBZ=1"; LLDB_ZLIB_LDFLAGS = "-lz"; MACOSX_DEPLOYMENT_TARGET = 10.9; ONLY_ACTIVE_ARCH = YES; OTHER_CFLAGS = ""; "OTHER_CFLAGS[sdk=iphoneos*][arch=*]" = ( "-Wparentheses", "-DOS_OBJECT_USE_OBJC=0", "-DDEBUGSERVER_PROGRAM_SYMBOL=debugserver_nonui", "$(LLDB_OS_LOG_CFLAGS)", ); "OTHER_CPLUSPLUSFLAGS[sdk=iphoneos*][arch=*]" = "$(OTHER_CFLAGS)"; OTHER_LDFLAGS = ""; "OTHER_LDFLAGS[sdk=iphoneos*][arch=*]" = ( "-framework", Foundation, ); "OTHER_LDFLAGS[sdk=macosx*]" = ( "-sectcreate", __TEXT, __info_plist, "$(PROJECT_DIR)/resources/lldb-debugserver-Info.plist", "$(LLDB_ENERGY_LFLAGS)", ); OTHER_MIGFLAGS = "-I$(DERIVED_FILE_DIR)"; PRODUCT_NAME = "debugserver-nonui"; "PROVISIONING_PROFILE[sdk=iphoneos*]" = ""; "PROVISIONING_PROFILE[sdk=macosx*]" = ""; SDKROOT = macosx.internal; "SDKROOT[arch=i386]" = macosx; "SDKROOT[arch=x86_64]" = macosx; "SDKROOT[arch=x86_64h]" = macosx; SKIP_INSTALL = YES; STRIP_INSTALLED_PRODUCT = NO; USER_HEADER_SEARCH_PATHS = "./source ../../source $(DERIVED_SOURCES_DIR) ../../include"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_BUILDER = "$(USER)"; ZERO_LINK = NO; }; name = Debug; }; 456F676F1AD46CE9002850C2 /* DebugClang */ = { isa = XCBuildConfiguration; buildSettings = { CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; CLANG_CXX_LIBRARY = "libc++"; "CODE_SIGN_ENTITLEMENTS[sdk=*]" = "source/debugserver-macosx-entitlements.plist"; "CODE_SIGN_ENTITLEMENTS[sdk=iphoneos*]" = "source/debugserver-entitlements.plist"; "CODE_SIGN_ENTITLEMENTS[sdk=macosx*]" = "source/debugserver-macosx-entitlements.plist"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=macosx*]" = ""; COPY_PHASE_STRIP = YES; CURRENT_PROJECT_VERSION = 360.99.0; FRAMEWORK_SEARCH_PATHS = $SDKROOT/System/Library/PrivateFrameworks; "FRAMEWORK_SEARCH_PATHS[sdk=iphoneos*][arch=*]" = ( "$(SDKROOT)/System/Library/PrivateFrameworks", "$(SDKROOT)/Developer/Library/PrivateFrameworks", ); "FRAMEWORK_SEARCH_PATHS[sdk=macosx*][arch=*]" = "$(SDKROOT)/System/Library/PrivateFrameworks"; GCC_C_LANGUAGE_STANDARD = c99; GCC_DYNAMIC_NO_PIC = NO; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = LLDB_DEBUGSERVER_DEBUG; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; INSTALL_PATH = /usr/local/bin; LLDB_DEBUGSERVER = 1; LLDB_ENERGY_CFLAGS = ""; "LLDB_ENERGY_CFLAGS[sdk=macosx.internal]" = "-DLLDB_ENERGY"; LLDB_ENERGY_LFLAGS = ""; "LLDB_ENERGY_LFLAGS[sdk=macosx.internal]" = "-weak-lpmenergy -weak-lpmsample"; MACOSX_DEPLOYMENT_TARGET = 10.9; OTHER_CFLAGS = ( "$(LLDB_COMPRESSION_CFLAGS)", "$(LLDB_ZLIB_CFLAGS)", ); "OTHER_CFLAGS[sdk=iphoneos*][arch=*]" = ( "-Wparentheses", "-DOS_OBJECT_USE_OBJC=0", "-DDEBUGSERVER_PROGRAM_SYMBOL=debugserver_nonui", "$(LLDB_OS_LOG_CFLAGS)", ); "OTHER_CPLUSPLUSFLAGS[sdk=iphoneos*][arch=*]" = "$(OTHER_CFLAGS)"; OTHER_LDFLAGS = ""; "OTHER_LDFLAGS[sdk=iphoneos*][arch=*]" = ( "-framework", Foundation, "$(LLDB_COMPRESSION_LDFLAGS)", ); "OTHER_LDFLAGS[sdk=macosx*]" = ( "-sectcreate", __TEXT, __info_plist, "$(PROJECT_DIR)/resources/lldb-debugserver-Info.plist", "$(LLDB_ENERGY_LFLAGS)", "$(LLDB_COMPRESSION_LDFLAGS)", "$(LLDB_ZLIB_LDFLAGS)", ); OTHER_MIGFLAGS = "-I$(DERIVED_FILE_DIR)"; PRODUCT_NAME = "debugserver-nonui"; "PROVISIONING_PROFILE[sdk=iphoneos*]" = ""; "PROVISIONING_PROFILE[sdk=macosx*]" = ""; SDKROOT = macosx.internal; "SDKROOT[arch=i386]" = macosx; "SDKROOT[arch=x86_64]" = macosx; "SDKROOT[arch=x86_64h]" = macosx; SKIP_INSTALL = YES; USER_HEADER_SEARCH_PATHS = "./source ../../source $(DERIVED_SOURCES_DIR) ../../include"; ZERO_LINK = NO; }; name = DebugClang; }; 456F67701AD46CE9002850C2 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; CLANG_CXX_LIBRARY = "libc++"; "CODE_SIGN_ENTITLEMENTS[sdk=*]" = "source/debugserver-macosx-entitlements.plist"; "CODE_SIGN_ENTITLEMENTS[sdk=iphoneos*]" = "source/debugserver-entitlements.plist"; "CODE_SIGN_ENTITLEMENTS[sdk=macosx*]" = "source/debugserver-macosx-entitlements.plist"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=macosx*]" = ""; COPY_PHASE_STRIP = YES; CURRENT_PROJECT_VERSION = 360.99.0; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; FRAMEWORK_SEARCH_PATHS = $SDKROOT/System/Library/PrivateFrameworks; "FRAMEWORK_SEARCH_PATHS[sdk=iphoneos*][arch=*]" = ( "$(SDKROOT)/System/Library/PrivateFrameworks", "$(SDKROOT)/Developer/Library/PrivateFrameworks", ); "FRAMEWORK_SEARCH_PATHS[sdk=macosx*][arch=*]" = "$(SDKROOT)/System/Library/PrivateFrameworks"; GCC_C_LANGUAGE_STANDARD = c99; GCC_PREPROCESSOR_DEFINITIONS = LLDB_DEBUGSERVER_RELEASE; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; HEADER_SEARCH_PATHS = /System/Library/Frameworks/System.framework/PrivateHeaders; INSTALL_PATH = /usr/local/bin; LLDB_DEBUGSERVER = 1; LLDB_ENERGY_CFLAGS = ""; "LLDB_ENERGY_CFLAGS[sdk=macosx.internal]" = "-DLLDB_ENERGY"; LLDB_ENERGY_LFLAGS = ""; "LLDB_ENERGY_LFLAGS[sdk=macosx.internal]" = "-weak-lpmenergy -weak-lpmsample"; MACOSX_DEPLOYMENT_TARGET = 10.9; OTHER_CFLAGS = ( "$(LLDB_COMPRESSION_CFLAGS)", "$(LLDB_ZLIB_CFLAGS)", "-DDEBUGSERVER_PROGRAM_SYMBOL=debugserver_nonui", "$(LLDB_OS_LOG_CFLAGS)", ); "OTHER_CFLAGS[sdk=iphoneos*][arch=*]" = ( "-Wparentheses", "-DOS_OBJECT_USE_OBJC=0", "-DDEBUGSERVER_PROGRAM_SYMBOL=debugserver_nonui", "$(LLDB_OS_LOG_CFLAGS)", ); "OTHER_CPLUSPLUSFLAGS[sdk=iphoneos*][arch=*]" = "$(OTHER_CFLAGS)"; OTHER_LDFLAGS = ""; "OTHER_LDFLAGS[sdk=iphoneos*][arch=*]" = ( "-framework", Foundation, "$(LLDB_COMPRESSION_LDFLAGS)", "$(LLDB_ZLIB_LDFLAGS)", ); "OTHER_LDFLAGS[sdk=macosx*]" = ( "-sectcreate", __TEXT, __info_plist, "$(PROJECT_DIR)/resources/lldb-debugserver-Info.plist", "$(LLDB_ENERGY_LFLAGS)", "$(LLDB_COMPRESSION_LDFLAGS)", "$(LLDB_ZLIB_LDFLAGS)", ); OTHER_MIGFLAGS = "-I$(DERIVED_FILE_DIR)"; PRODUCT_NAME = "debugserver-nonui"; "PROVISIONING_PROFILE[sdk=iphoneos*]" = ""; "PROVISIONING_PROFILE[sdk=macosx*]" = ""; SDKROOT = macosx.internal; "SDKROOT[arch=i386]" = macosx; "SDKROOT[arch=x86_64]" = macosx; "SDKROOT[arch=x86_64h]" = macosx; SKIP_INSTALL = YES; USER_HEADER_SEARCH_PATHS = "./source ../../source $(DERIVED_SOURCES_DIR) ../../include"; ZERO_LINK = NO; }; name = Release; }; 456F67711AD46CE9002850C2 /* BuildAndIntegration */ = { isa = XCBuildConfiguration; buildSettings = { CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; CLANG_CXX_LIBRARY = "libc++"; "CODE_SIGN_ENTITLEMENTS[sdk=iphoneos*]" = "source/debugserver-entitlements.plist"; "CODE_SIGN_ENTITLEMENTS[sdk=macosx*]" = "source/debugserver-macosx-entitlements.plist"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "-"; "CODE_SIGN_IDENTITY[sdk=macosx*]" = "-"; COPY_PHASE_STRIP = YES; CURRENT_PROJECT_VERSION = 360.99.0; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; FRAMEWORK_SEARCH_PATHS = $SDKROOT/System/Library/PrivateFrameworks; "FRAMEWORK_SEARCH_PATHS[sdk=iphoneos*][arch=*]" = ( "$(SDKROOT)/System/Library/PrivateFrameworks", "$(SDKROOT)/Developer/Library/PrivateFrameworks", ); "FRAMEWORK_SEARCH_PATHS[sdk=macosx*][arch=*]" = "$(SDKROOT)/System/Library/PrivateFrameworks"; GCC_C_LANGUAGE_STANDARD = c99; GCC_PREPROCESSOR_DEFINITIONS = LLDB_DEBUGSERVER_BUILDANDINTEGRATION; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; HEADER_SEARCH_PATHS = /System/Library/Frameworks/System.framework/PrivateHeaders; INSTALL_PATH = /usr/local/bin; "INSTALL_PATH[sdk=iphoneos*]" = /usr/local/bin; LLDB_DEBUGSERVER = 1; LLDB_ENERGY_CFLAGS = ""; "LLDB_ENERGY_CFLAGS[sdk=macosx*]" = "-DLLDB_ENERGY"; LLDB_ENERGY_LFLAGS = ""; "LLDB_ENERGY_LFLAGS[sdk=macosx*]" = "-weak-lpmenergy -weak-lpmsample"; MACOSX_DEPLOYMENT_TARGET = 10.9; OTHER_CFLAGS = ( "-Wparentheses", "$(LLDB_ENERGY_CFLAGS)", "-DDEBUGSERVER_PROGRAM_SYMBOL=debugserver_nonui", "$(LLDB_OS_LOG_CFLAGS)", ); "OTHER_CFLAGS[sdk=iphoneos*]" = ( "-Wparentheses", "-DOS_OBJECT_USE_OBJC=0", "-DDEBUGSERVER_PROGRAM_SYMBOL=debugserver_nonui", "$(LLDB_OS_LOG_CFLAGS)", ); OTHER_CPLUSPLUSFLAGS = "$(OTHER_CFLAGS)"; "OTHER_CPLUSPLUSFLAGS[sdk=iphoneos*][arch=*]" = "$(OTHER_CFLAGS)"; "OTHER_LDFLAGS[sdk=iphoneos*][arch=*]" = ( "-framework", Foundation, ); "OTHER_LDFLAGS[sdk=macosx*]" = ( "-sectcreate", __TEXT, __info_plist, "$(PROJECT_DIR)/resources/lldb-debugserver-Info.plist", "$(LLDB_ENERGY_LFLAGS)", ); OTHER_MIGFLAGS = "-I$(DERIVED_FILE_DIR)"; PRODUCT_NAME = "debugserver-nonui"; SDKROOT = macosx.internal; SKIP_INSTALL = YES; "SKIP_INSTALL[sdk=iphoneos*]" = NO; STRIP_INSTALLED_PRODUCT = YES; USER_HEADER_SEARCH_PATHS = "./source ../../source $(DERIVED_SOURCES_DIR) ../../include"; ZERO_LINK = NO; }; name = BuildAndIntegration; }; 4968B7A916657FAE00741ABB /* DebugClang */ = { isa = XCBuildConfiguration; buildSettings = { "ARCHS[sdk=iphoneos*]" = ( arm64, armv7, ); "ARCHS[sdk=macosx*]" = "$(ARCHS_STANDARD_64_BIT)"; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = 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; CODE_SIGN_IDENTITY = ""; COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = 360.99.0; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; LLDB_OS_LOG_CFLAGS = "-DLLDB_USE_OS_LOG=$(LLDB_USE_OS_LOG)"; LLDB_USE_OS_LOG = 0; MACOSX_DEPLOYMENT_TARGET = 10.10; ONLY_ACTIVE_ARCH = YES; SDKROOT = macosx.internal; "SDKROOT[arch=i386]" = macosx; "SDKROOT[arch=x86_64]" = macosx; "SDKROOT[arch=x86_64h]" = macosx; STRIP_INSTALLED_PRODUCT = NO; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_BUILDER = "$(USER)"; }; name = DebugClang; }; 4968B7AA16657FAE00741ABB /* DebugClang */ = { isa = XCBuildConfiguration; buildSettings = { CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; CLANG_CXX_LIBRARY = "libc++"; "CODE_SIGN_ENTITLEMENTS[sdk=*]" = "source/debugserver-macosx-entitlements.plist"; "CODE_SIGN_ENTITLEMENTS[sdk=iphoneos*]" = "source/debugserver-entitlements.plist"; "CODE_SIGN_ENTITLEMENTS[sdk=macosx*]" = "source/debugserver-macosx-entitlements.plist"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=macosx*]" = ""; COPY_PHASE_STRIP = YES; CURRENT_PROJECT_VERSION = 360.99.0; FRAMEWORK_SEARCH_PATHS = $SDKROOT/System/Library/PrivateFrameworks; "FRAMEWORK_SEARCH_PATHS[sdk=iphoneos*][arch=*]" = ( "$(SDKROOT)/System/Library/PrivateFrameworks", "$(SDKROOT)/Developer/Library/PrivateFrameworks", ); "FRAMEWORK_SEARCH_PATHS[sdk=macosx*][arch=*]" = "$(SDKROOT)/System/Library/PrivateFrameworks"; GCC_C_LANGUAGE_STANDARD = c99; GCC_DYNAMIC_NO_PIC = NO; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = LLDB_DEBUGSERVER_DEBUG; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; INSTALL_PATH = /usr/bin; LLDB_COMPRESSION_CFLAGS = ""; "LLDB_COMPRESSION_CFLAGS[sdk=appletvos*]" = "-DHAVE_LIBCOMPRESSION=1"; "LLDB_COMPRESSION_CFLAGS[sdk=iphoneos*]" = "-DHAVE_LIBCOMPRESSION=1"; "LLDB_COMPRESSION_CFLAGS[sdk=macosx10.11]" = "-DHAVE_LIBCOMPRESSION=1"; "LLDB_COMPRESSION_CFLAGS[sdk=macosx10.11internal]" = "-DHAVE_LIBCOMPRESSION=1"; "LLDB_COMPRESSION_CFLAGS[sdk=watchos*]" = "-DHAVE_LIBCOMPRESSION=1"; LLDB_COMPRESSION_LDFLAGS = ""; "LLDB_COMPRESSION_LDFLAGS[sdk=appletvos*]" = "-weak-lcompression"; "LLDB_COMPRESSION_LDFLAGS[sdk=iphoneos*]" = "-weak-lcompression"; "LLDB_COMPRESSION_LDFLAGS[sdk=macosx10.11]" = "-weak-lcompression"; "LLDB_COMPRESSION_LDFLAGS[sdk=macosx10.11internal]" = "-weak-lcompression"; "LLDB_COMPRESSION_LDFLAGS[sdk=watchos*]" = "-weak-lcompression"; LLDB_DEBUGSERVER = 1; LLDB_ENERGY_CFLAGS = ""; "LLDB_ENERGY_CFLAGS[sdk=macosx.internal]" = "-DLLDB_ENERGY"; LLDB_ENERGY_LFLAGS = ""; "LLDB_ENERGY_LFLAGS[sdk=macosx.internal]" = "-weak-lpmenergy -weak-lpmsample"; LLDB_ZLIB_CFLAGS = "-DHAVE_LIBZ=1"; LLDB_ZLIB_LDFLAGS = "-lz"; MACOSX_DEPLOYMENT_TARGET = 10.9; OTHER_CFLAGS = ( "-Wparentheses", "$(LLDB_ENERGY_CFLAGS)", "-DDT_VARIANT_$(DT_VARIANT)", "$(LLDB_COMPRESSION_CFLAGS)", "$(LLDB_ZLIB_CFLAGS)", "$(LLDB_OS_LOG_CFLAGS)", ); "OTHER_CFLAGS[sdk=iphoneos*][arch=*]" = ( "-Wparentheses", "-DWITH_LOCKDOWN", "-DWITH_FBS", "-DWITH_BKS", "-DOS_OBJECT_USE_OBJC=0", "$(LLDB_COMPRESSION_CFLAGS)", "$(LLDB_ZLIB_CFLAGS)", "$(LLDB_OS_LOG_CFLAGS)", ); "OTHER_CPLUSPLUSFLAGS[sdk=iphoneos*][arch=*]" = "$(OTHER_CFLAGS)"; "OTHER_LDFLAGS[sdk=iphoneos*][arch=*]" = ( "-framework", SpringBoardServices, "-framework", BackBoardServices, "-llockdown", "-framework", FrontBoardServices, "-framework", MobileCoreServices, "$(LLDB_COMPRESSION_LDFLAGS)", "$(LLDB_ZLIB_LDFLAGS)", ); "OTHER_LDFLAGS[sdk=macosx*]" = ( "-sectcreate", __TEXT, __info_plist, "$(PROJECT_DIR)/resources/lldb-debugserver-Info.plist", "$(LLDB_ENERGY_LFLAGS)", "$(LLDB_COMPRESSION_LDFLAGS)", "$(LLDB_ZLIB_LDFLAGS)", ); OTHER_MIGFLAGS = "-I$(DERIVED_FILE_DIR)"; PRODUCT_NAME = debugserver; "PROVISIONING_PROFILE[sdk=iphoneos*]" = ""; "PROVISIONING_PROFILE[sdk=macosx*]" = ""; SDKROOT = macosx; "SDKROOT[arch=i386]" = macosx; "SDKROOT[arch=x86_64]" = macosx; "SDKROOT[arch=x86_64h]" = macosx; SKIP_INSTALL = YES; USER_HEADER_SEARCH_PATHS = "./source ../../source $(DERIVED_SOURCES_DIR) ../../include"; ZERO_LINK = NO; }; name = DebugClang; }; 940AD5251B1FE3B10051E88F /* DebugPresubmission */ = { isa = XCBuildConfiguration; buildSettings = { "ARCHS[sdk=iphoneos*]" = ( arm64, armv7, ); "ARCHS[sdk=macosx*]" = "$(ARCHS_STANDARD_64_BIT)"; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = 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; CODE_SIGN_IDENTITY = ""; COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = 360.99.0; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; LLDB_OS_LOG_CFLAGS = "-DLLDB_USE_OS_LOG=$(LLDB_USE_OS_LOG)"; LLDB_USE_OS_LOG = 0; MACOSX_DEPLOYMENT_TARGET = 10.10; ONLY_ACTIVE_ARCH = YES; SDKROOT = macosx.internal; "SDKROOT[arch=i386]" = macosx; "SDKROOT[arch=x86_64]" = macosx; "SDKROOT[arch=x86_64h]" = macosx; STRIP_INSTALLED_PRODUCT = NO; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_BUILDER = "$(USER)"; }; name = DebugPresubmission; }; 940AD5261B1FE3B10051E88F /* DebugPresubmission */ = { isa = XCBuildConfiguration; buildSettings = { CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; CLANG_CXX_LIBRARY = "libc++"; "CODE_SIGN_ENTITLEMENTS[sdk=*]" = "source/debugserver-macosx-entitlements.plist"; "CODE_SIGN_ENTITLEMENTS[sdk=iphoneos*]" = "source/debugserver-entitlements.plist"; "CODE_SIGN_ENTITLEMENTS[sdk=macosx*]" = "source/debugserver-macosx-entitlements.plist"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=macosx*]" = ""; COPY_PHASE_STRIP = YES; CURRENT_PROJECT_VERSION = 360.99.0; FRAMEWORK_SEARCH_PATHS = $SDKROOT/System/Library/PrivateFrameworks; "FRAMEWORK_SEARCH_PATHS[sdk=iphoneos*][arch=*]" = ( "$(SDKROOT)/System/Library/PrivateFrameworks", "$(SDKROOT)/Developer/Library/PrivateFrameworks", ); "FRAMEWORK_SEARCH_PATHS[sdk=macosx*][arch=*]" = "$(SDKROOT)/System/Library/PrivateFrameworks"; GCC_C_LANGUAGE_STANDARD = c99; GCC_DYNAMIC_NO_PIC = NO; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = LLDB_DEBUGSERVER_DEBUG; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; INSTALL_PATH = /usr/bin; LLDB_COMPRESSION_CFLAGS = ""; "LLDB_COMPRESSION_CFLAGS[sdk=appletvos*]" = "-DHAVE_LIBCOMPRESSION=1"; "LLDB_COMPRESSION_CFLAGS[sdk=iphoneos*]" = "-DHAVE_LIBCOMPRESSION=1"; "LLDB_COMPRESSION_CFLAGS[sdk=macosx10.11]" = "-DHAVE_LIBCOMPRESSION=1"; "LLDB_COMPRESSION_CFLAGS[sdk=macosx10.11internal]" = "-DHAVE_LIBCOMPRESSION=1"; "LLDB_COMPRESSION_CFLAGS[sdk=watchos*]" = "-DHAVE_LIBCOMPRESSION=1"; LLDB_COMPRESSION_LDFLAGS = ""; "LLDB_COMPRESSION_LDFLAGS[sdk=appletvos*]" = "-weak-lcompression"; "LLDB_COMPRESSION_LDFLAGS[sdk=iphoneos*]" = "-weak-lcompression"; "LLDB_COMPRESSION_LDFLAGS[sdk=macosx10.11]" = "-weak-lcompression"; "LLDB_COMPRESSION_LDFLAGS[sdk=macosx10.11internal]" = "-weak-lcompression"; "LLDB_COMPRESSION_LDFLAGS[sdk=watchos*]" = "-weak-lcompression"; LLDB_DEBUGSERVER = 1; LLDB_ENERGY_CFLAGS = ""; "LLDB_ENERGY_CFLAGS[sdk=macosx.internal]" = "-DLLDB_ENERGY"; LLDB_ENERGY_LFLAGS = ""; "LLDB_ENERGY_LFLAGS[sdk=macosx.internal]" = "-weak-lpmenergy -weak-lpmsample"; LLDB_ZLIB_CFLAGS = "-DHAVE_LIBZ=1"; LLDB_ZLIB_LDFLAGS = "-lz"; MACOSX_DEPLOYMENT_TARGET = 10.9; OTHER_CFLAGS = ( "-Wparentheses", "$(LLDB_ENERGY_CFLAGS)", "$(LLDB_COMPRESSION_CFLAGS)", "$(LLDB_ZLIB_CFLAGS)", "$(LLDB_OS_LOG_CFLAGS)", ); "OTHER_CFLAGS[sdk=iphoneos*][arch=*]" = ( "-Wparentheses", "-DWITH_LOCKDOWN", "-DWITH_FBS", "-DWITH_BKS", "-DOS_OBJECT_USE_OBJC=0", "$(LLDB_COMPRESSION_CFLAGS)", "$(LLDB_ZLIB_CFLAGS)", "$(LLDB_OS_LOG_CFLAGS)", ); "OTHER_CPLUSPLUSFLAGS[sdk=iphoneos*][arch=*]" = "$(OTHER_CFLAGS)"; "OTHER_LDFLAGS[sdk=iphoneos*][arch=*]" = ( "-framework", SpringBoardServices, "-framework", BackBoardServices, "-llockdown", "-framework", FrontBoardServices, "-framework", MobileCoreServices, "$(LLDB_COMPRESSION_LDFLAGS)", "$(LLDB_ZLIB_LDFLAGS)", ); "OTHER_LDFLAGS[sdk=macosx*]" = ( "-sectcreate", __TEXT, __info_plist, "$(PROJECT_DIR)/resources/lldb-debugserver-Info.plist", "$(LLDB_ENERGY_LFLAGS)", "$(LLDB_COMPRESSION_LDFLAGS)", "$(LLDB_ZLIB_LDFLAGS)", ); OTHER_MIGFLAGS = "-I$(DERIVED_FILE_DIR)"; PRODUCT_NAME = debugserver; "PROVISIONING_PROFILE[sdk=iphoneos*]" = ""; "PROVISIONING_PROFILE[sdk=macosx*]" = ""; SDKROOT = macosx; "SDKROOT[arch=i386]" = macosx; "SDKROOT[arch=x86_64]" = macosx; "SDKROOT[arch=x86_64h]" = macosx; SKIP_INSTALL = YES; USER_HEADER_SEARCH_PATHS = "./source ../../source $(DERIVED_SOURCES_DIR) ../../include"; ZERO_LINK = NO; }; name = DebugPresubmission; }; 940AD5271B1FE3B10051E88F /* DebugPresubmission */ = { isa = XCBuildConfiguration; buildSettings = { CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; CLANG_CXX_LIBRARY = "libc++"; "CODE_SIGN_ENTITLEMENTS[sdk=*]" = "source/debugserver-macosx-entitlements.plist"; "CODE_SIGN_ENTITLEMENTS[sdk=iphoneos*]" = "source/debugserver-entitlements.plist"; "CODE_SIGN_ENTITLEMENTS[sdk=macosx*]" = "source/debugserver-macosx-entitlements.plist"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=macosx*]" = ""; COPY_PHASE_STRIP = YES; CURRENT_PROJECT_VERSION = 360.99.0; FRAMEWORK_SEARCH_PATHS = $SDKROOT/System/Library/PrivateFrameworks; "FRAMEWORK_SEARCH_PATHS[sdk=iphoneos*][arch=*]" = ( "$(SDKROOT)/System/Library/PrivateFrameworks", "$(SDKROOT)/Developer/Library/PrivateFrameworks", ); "FRAMEWORK_SEARCH_PATHS[sdk=macosx*][arch=*]" = "$(SDKROOT)/System/Library/PrivateFrameworks"; GCC_C_LANGUAGE_STANDARD = c99; GCC_DYNAMIC_NO_PIC = NO; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = LLDB_DEBUGSERVER_DEBUG; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; INSTALL_PATH = /usr/local/bin; LLDB_DEBUGSERVER = 1; LLDB_ENERGY_CFLAGS = ""; "LLDB_ENERGY_CFLAGS[sdk=macosx.internal]" = "-DLLDB_ENERGY"; LLDB_ENERGY_LFLAGS = ""; "LLDB_ENERGY_LFLAGS[sdk=macosx.internal]" = "-weak-lpmenergy -weak-lpmsample"; MACOSX_DEPLOYMENT_TARGET = 10.9; OTHER_CFLAGS = ( "-Wparentheses", "$(LLDB_ENERGY_CFLAGS)", "-DDEBUGSERVER_PROGRAM_SYMBOL=debugserver_nonui", "$(LLDB_OS_LOG_CFLAGS)", ); "OTHER_CFLAGS[sdk=iphoneos*][arch=*]" = ( "-Wparentheses", "-DOS_OBJECT_USE_OBJC=0", "-DDEBUGSERVER_PROGRAM_SYMBOL=debugserver_nonui", "$(LLDB_OS_LOG_CFLAGS)", ); "OTHER_CPLUSPLUSFLAGS[sdk=iphoneos*][arch=*]" = "$(OTHER_CFLAGS)"; "OTHER_LDFLAGS[sdk=iphoneos*][arch=*]" = ( "-framework", Foundation, ); "OTHER_LDFLAGS[sdk=macosx*]" = ( "-sectcreate", __TEXT, __info_plist, "$(PROJECT_DIR)/resources/lldb-debugserver-Info.plist", "$(LLDB_ENERGY_LFLAGS)", ); OTHER_MIGFLAGS = "-I$(DERIVED_FILE_DIR)"; PRODUCT_NAME = "debugserver-nonui"; "PROVISIONING_PROFILE[sdk=iphoneos*]" = ""; "PROVISIONING_PROFILE[sdk=macosx*]" = ""; SDKROOT = macosx.internal; "SDKROOT[arch=i386]" = macosx; "SDKROOT[arch=x86_64]" = macosx; "SDKROOT[arch=x86_64h]" = macosx; SKIP_INSTALL = YES; USER_HEADER_SEARCH_PATHS = "./source ../../source $(DERIVED_SOURCES_DIR) ../../include"; ZERO_LINK = NO; }; name = DebugPresubmission; }; 94BA9B361B1A7C5700035A23 /* CustomSwift-Debug */ = { isa = XCBuildConfiguration; buildSettings = { PRODUCT_NAME = "lldb-debugserver-nonui"; }; name = "CustomSwift-Debug"; }; 94BA9B371B1A7C5700035A23 /* CustomSwift-Release */ = { isa = XCBuildConfiguration; buildSettings = { PRODUCT_NAME = "lldb-debugserver-nonui"; }; name = "CustomSwift-Release"; }; 94D72C871ADF10AA00A3F718 /* CustomSwift-Debug */ = { isa = XCBuildConfiguration; buildSettings = { "ARCHS[sdk=iphoneos*]" = ( arm64, armv7, ); "ARCHS[sdk=macosx*]" = "$(ARCHS_STANDARD_64_BIT)"; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = 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; CODE_SIGN_IDENTITY = ""; COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = 360.99.0; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; LLDB_OS_LOG_CFLAGS = "-DLLDB_USE_OS_LOG=$(LLDB_USE_OS_LOG)"; LLDB_USE_OS_LOG = 0; MACOSX_DEPLOYMENT_TARGET = 10.10; ONLY_ACTIVE_ARCH = YES; SDKROOT = macosx.internal; "SDKROOT[arch=i386]" = macosx; "SDKROOT[arch=x86_64]" = macosx; "SDKROOT[arch=x86_64h]" = macosx; STRIP_INSTALLED_PRODUCT = NO; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_BUILDER = "$(USER)"; }; name = "CustomSwift-Debug"; }; 94D72C881ADF10AA00A3F718 /* CustomSwift-Debug */ = { isa = XCBuildConfiguration; buildSettings = { CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; CLANG_CXX_LIBRARY = "libc++"; "CODE_SIGN_ENTITLEMENTS[sdk=*]" = "source/debugserver-macosx-entitlements.plist"; "CODE_SIGN_ENTITLEMENTS[sdk=iphoneos*]" = "source/debugserver-entitlements.plist"; "CODE_SIGN_ENTITLEMENTS[sdk=macosx*]" = "source/debugserver-macosx-entitlements.plist"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=macosx*]" = ""; COPY_PHASE_STRIP = YES; CURRENT_PROJECT_VERSION = 360.99.0; FRAMEWORK_SEARCH_PATHS = $SDKROOT/System/Library/PrivateFrameworks; "FRAMEWORK_SEARCH_PATHS[sdk=iphoneos*][arch=*]" = ( "$(SDKROOT)/System/Library/PrivateFrameworks", "$(SDKROOT)/Developer/Library/PrivateFrameworks", ); "FRAMEWORK_SEARCH_PATHS[sdk=macosx*][arch=*]" = "$(SDKROOT)/System/Library/PrivateFrameworks"; GCC_C_LANGUAGE_STANDARD = c99; GCC_DYNAMIC_NO_PIC = NO; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = LLDB_DEBUGSERVER_DEBUG; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; INSTALL_PATH = /usr/bin; LLDB_COMPRESSION_CFLAGS = ""; LLDB_COMPRESSION_LDFLAGS = ""; LLDB_DEBUGSERVER = 1; LLDB_ENERGY_CFLAGS = ""; "LLDB_ENERGY_CFLAGS[sdk=macosx.internal]" = "-DLLDB_ENERGY"; LLDB_ENERGY_LFLAGS = ""; "LLDB_ENERGY_LFLAGS[sdk=macosx.internal]" = "-weak-lpmenergy -weak-lpmsample"; LLDB_ZLIB_CFLAGS = "-DHAVE_LIBZ=1"; LLDB_ZLIB_LDFLAGS = "-lz"; MACOSX_DEPLOYMENT_TARGET = 10.9; OTHER_CFLAGS = ( "-Wparentheses", "$(LLDB_ENERGY_CFLAGS)", "-DDT_VARIANT_$(DT_VARIANT)", "$(LLDB_COMPRESSION_CFLAGS)", "$(LLDB_ZLIB_CFLAGS)", "$(LLDB_OS_LOG_CFLAGS)", ); "OTHER_CFLAGS[sdk=iphoneos*][arch=*]" = ( "-Wparentheses", "-DWITH_LOCKDOWN", "-DWITH_BKS", "-DWITH_FBS", "-DOS_OBJECT_USE_OBJC=0", "$(LLDB_COMPRESSION_CFLAGS)", "$(LLDB_ZLIB_CFLAGS)", "$(LLDB_OS_LOG_CFLAGS)", ); "OTHER_CPLUSPLUSFLAGS[sdk=iphoneos*][arch=*]" = "$(OTHER_CFLAGS)"; OTHER_LDFLAGS = ""; "OTHER_LDFLAGS[sdk=iphoneos*][arch=*]" = ( "-framework", SpringBoardServices, "-framework", BackBoardServices, "-llockdown", "-framework", FrontBoardServices, "-framework", MobileCoreServices, "$(LLDB_COMPRESSION_LDFLAGS)", "$(LLDB_ZLIB_LDFLAGS)", ); "OTHER_LDFLAGS[sdk=macosx*]" = ( "-sectcreate", __TEXT, __info_plist, "$(PROJECT_DIR)/resources/lldb-debugserver-Info.plist", "$(LLDB_ENERGY_LFLAGS)", "$(LLDB_COMPRESSION_LDFLAGS)", "$(LLDB_ZLIB_LDFLAGS)", ); OTHER_MIGFLAGS = "-I$(DERIVED_FILE_DIR)"; PRODUCT_NAME = debugserver; "PROVISIONING_PROFILE[sdk=iphoneos*]" = ""; "PROVISIONING_PROFILE[sdk=macosx*]" = ""; SDKROOT = macosx; "SDKROOT[arch=i386]" = macosx; "SDKROOT[arch=x86_64]" = macosx; "SDKROOT[arch=x86_64h]" = macosx; SKIP_INSTALL = YES; USER_HEADER_SEARCH_PATHS = "./source ../../source $(DERIVED_SOURCES_DIR) ../../include"; ZERO_LINK = NO; }; name = "CustomSwift-Debug"; }; 94D72C891ADF10B000A3F718 /* CustomSwift-Release */ = { isa = XCBuildConfiguration; buildSettings = { "ARCHS[sdk=iphoneos*]" = ( armv7, armv7s, ); "ARCHS[sdk=macosx*]" = "$(ARCHS_STANDARD_64_BIT)"; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = 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; CURRENT_PROJECT_VERSION = 360.99.0; DEAD_CODE_STRIPPING = YES; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; LLDB_OS_LOG_CFLAGS = "-DLLDB_USE_OS_LOG=$(LLDB_USE_OS_LOG)"; LLDB_USE_OS_LOG = 0; MACOSX_DEPLOYMENT_TARGET = 10.10; ONLY_ACTIVE_ARCH = YES; SDKROOT = macosx.internal; "SDKROOT[arch=i386]" = macosx; "SDKROOT[arch=x86_64]" = macosx; "SDKROOT[arch=x86_64h]" = macosx; STRIPFLAGS = "-x"; STRIP_STYLE = debugging; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_BUILDER = "$(USER)"; }; name = "CustomSwift-Release"; }; 94D72C8A1ADF10B000A3F718 /* CustomSwift-Release */ = { isa = XCBuildConfiguration; buildSettings = { CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; CLANG_CXX_LIBRARY = "libc++"; "CODE_SIGN_ENTITLEMENTS[sdk=*]" = "source/debugserver-macosx-entitlements.plist"; "CODE_SIGN_ENTITLEMENTS[sdk=iphoneos*]" = "source/debugserver-entitlements.plist"; "CODE_SIGN_ENTITLEMENTS[sdk=macosx*]" = "source/debugserver-macosx-entitlements.plist"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=macosx*]" = ""; COPY_PHASE_STRIP = YES; CURRENT_PROJECT_VERSION = 360.99.0; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; FRAMEWORK_SEARCH_PATHS = $SDKROOT/System/Library/PrivateFrameworks; "FRAMEWORK_SEARCH_PATHS[sdk=iphoneos*][arch=*]" = ( "$(SDKROOT)/System/Library/PrivateFrameworks", "$(SDKROOT)/Developer/Library/PrivateFrameworks", ); "FRAMEWORK_SEARCH_PATHS[sdk=macosx*][arch=*]" = "$(SDKROOT)/System/Library/PrivateFrameworks"; GCC_C_LANGUAGE_STANDARD = c99; GCC_PREPROCESSOR_DEFINITIONS = LLDB_DEBUGSERVER_RELEASE; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; HEADER_SEARCH_PATHS = /System/Library/Frameworks/System.framework/PrivateHeaders; INSTALL_PATH = /usr/bin; LLDB_COMPRESSION_CFLAGS = ""; LLDB_COMPRESSION_LDFLAGS = ""; LLDB_DEBUGSERVER = 1; LLDB_ENERGY_CFLAGS = ""; "LLDB_ENERGY_CFLAGS[sdk=macosx.internal]" = "-DLLDB_ENERGY"; LLDB_ENERGY_LFLAGS = ""; "LLDB_ENERGY_LFLAGS[sdk=macosx.internal]" = "-weak-lpmenergy -weak-lpmsample"; LLDB_ZLIB_CFLAGS = "-DHAVE_LIBZ=1"; LLDB_ZLIB_LDFLAGS = "-lz"; MACOSX_DEPLOYMENT_TARGET = 10.9; OTHER_CFLAGS = ( "-Wparentheses", "$(LLDB_ENERGY_CFLAGS)", "-DDT_VARIANT_$(DT_VARIANT)", "$(LLDB_COMPRESSION_CFLAGS)", "$(LLDB_ZLIB_CFLAGS)", "$(LLDB_OS_LOG_CFLAGS)", ); "OTHER_CFLAGS[sdk=iphoneos*][arch=*]" = ( "-Wparentheses", "-DWITH_LOCKDOWN", "-DWITH_FBS", "-DWITH_BKS", "-DOS_OBJECT_USE_OBJC=0", "$(LLDB_COMPRESSION_CFLAGS)", "$(LLDB_ZLIB_CFLAGS)", "$(LLDB_OS_LOG_CFLAGS)", ); "OTHER_CPLUSPLUSFLAGS[sdk=iphoneos*][arch=*]" = "$(OTHER_CFLAGS)"; "OTHER_LDFLAGS[sdk=iphoneos*][arch=*]" = ( "-framework", SpringBoardServices, "-framework", BackBoardServices, "-llockdown", "-framework", FrontBoardServices, "-framework", MobileCoreServices, "$(LLDB_COMPRESSION_LDFLAGS)", "$(LLDB_ZLIB_LDFLAGS)", ); "OTHER_LDFLAGS[sdk=macosx*]" = ( "-sectcreate", __TEXT, __info_plist, "$(PROJECT_DIR)/resources/lldb-debugserver-Info.plist", "$(LLDB_ENERGY_LFLAGS)", "$(LLDB_COMPRESSION_LDFLAGS)", "$(LLDB_ZLIB_LDFLAGS)", ); OTHER_MIGFLAGS = "-I$(DERIVED_FILE_DIR)"; PRODUCT_NAME = debugserver; "PROVISIONING_PROFILE[sdk=iphoneos*]" = ""; "PROVISIONING_PROFILE[sdk=macosx*]" = ""; SDKROOT = macosx; "SDKROOT[arch=i386]" = macosx; "SDKROOT[arch=x86_64]" = macosx; "SDKROOT[arch=x86_64h]" = macosx; SKIP_INSTALL = YES; USER_HEADER_SEARCH_PATHS = "./source ../../source $(DERIVED_SOURCES_DIR) ../../include"; ZERO_LINK = NO; }; name = "CustomSwift-Release"; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ 1DEB914E08733D8E0010E9CD /* Build configuration list for PBXProject "debugserver" */ = { isa = XCConfigurationList; buildConfigurations = ( 1DEB914F08733D8E0010E9CD /* Debug */, 94D72C871ADF10AA00A3F718 /* CustomSwift-Debug */, 4968B7A916657FAE00741ABB /* DebugClang */, 940AD5251B1FE3B10051E88F /* DebugPresubmission */, 1DEB915008733D8E0010E9CD /* Release */, 94D72C891ADF10B000A3F718 /* CustomSwift-Release */, 262419A11198A93E00067686 /* BuildAndIntegration */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = BuildAndIntegration; }; 26CE05A4115C31ED0022F371 /* Build configuration list for PBXNativeTarget "debugserver" */ = { isa = XCConfigurationList; buildConfigurations = ( 26CE0596115C31C30022F371 /* Debug */, 94D72C881ADF10AA00A3F718 /* CustomSwift-Debug */, 4968B7AA16657FAE00741ABB /* DebugClang */, 940AD5261B1FE3B10051E88F /* DebugPresubmission */, 26CE0597115C31C30022F371 /* Release */, 94D72C8A1ADF10B000A3F718 /* CustomSwift-Release */, 262419A21198A93E00067686 /* BuildAndIntegration */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = BuildAndIntegration; }; 456F676D1AD46CE9002850C2 /* Build configuration list for PBXNativeTarget "debugserver-mini" */ = { isa = XCConfigurationList; buildConfigurations = ( 456F676E1AD46CE9002850C2 /* Debug */, 456F676F1AD46CE9002850C2 /* DebugClang */, 940AD5271B1FE3B10051E88F /* DebugPresubmission */, 456F67701AD46CE9002850C2 /* Release */, 456F67711AD46CE9002850C2 /* BuildAndIntegration */, 94BA9B361B1A7C5700035A23 /* CustomSwift-Debug */, 94BA9B371B1A7C5700035A23 /* CustomSwift-Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = BuildAndIntegration; }; /* End XCConfigurationList section */ }; rootObject = 08FB7793FE84155DC02AAC07 /* Project object */; } Index: vendor/lldb/dist/tools/debugserver/source/CMakeLists.txt =================================================================== --- vendor/lldb/dist/tools/debugserver/source/CMakeLists.txt (revision 317691) +++ vendor/lldb/dist/tools/debugserver/source/CMakeLists.txt (revision 317692) @@ -1,126 +1,127 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR}/..) include_directories(${LLDB_SOURCE_DIR}/source) include_directories(MacOSX/DarwinLog) include_directories(MacOSX) #include_directories(${CMAKE_CURRENT_BINARY_DIR}/MacOSX) set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++ -Wl,-sectcreate,__TEXT,__info_plist,${CMAKE_CURRENT_SOURCE_DIR}/../resources/lldb-debugserver-Info.plist") check_cxx_compiler_flag("-Wno-gnu-zero-variadic-macro-arguments" CXX_SUPPORTS_NO_GNU_ZERO_VARIADIC_MACRO_ARGUMENTS) if (CXX_SUPPORTS_NO_GNU_ZERO_VARIADIC_MACRO_ARGUMENTS) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-gnu-zero-variadic-macro-arguments") endif () check_cxx_compiler_flag("-Wno-zero-length-array" CXX_SUPPORTS_NO_ZERO_LENGTH_ARRAY) if (CXX_SUPPORTS_NO_ZERO_LENGTH_ARRAY) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-zero-length-array") endif () check_cxx_compiler_flag("-Wno-extended-offsetof" CXX_SUPPORTS_NO_EXTENDED_OFFSETOF) if (CXX_SUPPORTS_NO_EXTENDED_OFFSETOF) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-extended-offsetof") endif () find_library(COCOA_LIBRARY Cocoa) add_subdirectory(MacOSX) 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}) target_link_libraries(lldbDebugserverCommon INTERFACE ${COCOA_LIBRARY} lldbDebugserverMacOSX_I386 lldbDebugserverMacOSX_X86_64 lldbDebugserverMacOSX_DarwinLog) set(LLVM_OPTIONAL_SOURCES ${lldbDebugserverCommonSources}) add_lldb_tool(debugserver INCLUDE_IN_FRAMEWORK debugserver.cpp LINK_LIBS lldbDebugserverCommon ) set(LLDB_CODESIGN_IDENTITY "lldb_codesign" CACHE STRING "Identity used for code signing. Set to empty string to skip the signing step.") if (NOT ("${LLDB_CODESIGN_IDENTITY}" STREQUAL "")) execute_process( COMMAND xcrun -f codesign_allocate OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE CODESIGN_ALLOCATE ) add_custom_command(TARGET debugserver POST_BUILD COMMAND ${CMAKE_COMMAND} -E env CODESIGN_ALLOCATE=${CODESIGN_ALLOCATE} codesign --force --sign ${LLDB_CODESIGN_IDENTITY} $ WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/bin ) endif() Index: vendor/lldb/dist/tools/debugserver/source/RNBSocket.cpp =================================================================== --- vendor/lldb/dist/tools/debugserver/source/RNBSocket.cpp (revision 317691) +++ vendor/lldb/dist/tools/debugserver/source/RNBSocket.cpp (revision 317692) @@ -1,386 +1,376 @@ //===-- RNBSocket.cpp -------------------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // Created by Greg Clayton on 12/12/07. // //===----------------------------------------------------------------------===// #include "RNBSocket.h" #include "DNBError.h" #include "DNBLog.h" #include #include #include +#include #include #include #include +#include #include +#include +#include "lldb/Host/SocketAddress.h" + #ifdef WITH_LOCKDOWN #include "lockdown.h" #endif /* Once we have a RNBSocket object with a port # specified, this function is called to wait for an incoming connection. This function blocks while waiting for that connection. */ bool ResolveIPV4HostName(const char *hostname, in_addr_t &addr) { if (hostname == NULL || hostname[0] == '\0' || strcmp(hostname, "localhost") == 0 || strcmp(hostname, "127.0.0.1") == 0) { addr = htonl(INADDR_LOOPBACK); return true; } else if (strcmp(hostname, "*") == 0) { addr = htonl(INADDR_ANY); return true; } else { // See if an IP address was specified as numbers int inet_pton_result = ::inet_pton(AF_INET, hostname, &addr); if (inet_pton_result == 1) return true; struct hostent *host_entry = gethostbyname(hostname); if (host_entry) { std::string ip_str( ::inet_ntoa(*(struct in_addr *)*host_entry->h_addr_list)); inet_pton_result = ::inet_pton(AF_INET, ip_str.c_str(), &addr); if (inet_pton_result == 1) return true; } } return false; } rnb_err_t RNBSocket::Listen(const char *listen_host, uint16_t port, PortBoundCallback callback, const void *callback_baton) { // DNBLogThreadedIf(LOG_RNB_COMM, "%8u RNBSocket::%s called", // (uint32_t)m_timer.ElapsedMicroSeconds(true), __FUNCTION__); // Disconnect without saving errno Disconnect(false); - // Now figure out the hostname that will be attaching and palce it into - struct sockaddr_in listen_addr; - ::memset(&listen_addr, 0, sizeof listen_addr); - listen_addr.sin_len = sizeof listen_addr; - listen_addr.sin_family = AF_INET; - listen_addr.sin_port = htons(port); - listen_addr.sin_addr.s_addr = INADDR_ANY; - - if (!ResolveIPV4HostName(listen_host, listen_addr.sin_addr.s_addr)) { - DNBLogThreaded("error: failed to resolve connecting host '%s'", - listen_host); + DNBError err; + int queue_id = kqueue(); + if (queue_id < 0) { + err.SetError(errno, DNBError::MachKernel); + err.LogThreaded("error: failed to create kqueue."); return rnb_err; } - DNBError err; - int listen_fd = ::socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); - if (listen_fd == -1) - err.SetError(errno, DNBError::POSIX); + std::map sockets; + auto addresses = lldb_private::SocketAddress::GetAddressInfo( + listen_host, NULL, AF_UNSPEC, SOCK_STREAM, IPPROTO_TCP); - if (err.Fail() || DNBLogCheckLogBit(LOG_RNB_COMM)) - err.LogThreaded("::socket ( domain = AF_INET, type = SOCK_STREAM, protocol " - "= IPPROTO_TCP ) => socket = %i", - listen_fd); + for (auto address : addresses) { + int sock_fd = ::socket(address.GetFamily(), SOCK_STREAM, IPPROTO_TCP); + if (sock_fd == -1) + continue; - if (err.Fail()) - return rnb_err; + SetSocketOption(sock_fd, SOL_SOCKET, SO_REUSEADDR, 1); - // enable local address reuse - SetSocketOption(listen_fd, SOL_SOCKET, SO_REUSEADDR, 1); + address.SetPort(port); - struct sockaddr_in sa; - ::memset(&sa, 0, sizeof sa); - sa.sin_len = sizeof sa; - sa.sin_family = AF_INET; - sa.sin_port = htons(port); - sa.sin_addr.s_addr = INADDR_ANY; // Let incoming connections bind to any host - // network interface (this is NOT who can - // connect to us) - int error = ::bind(listen_fd, (struct sockaddr *)&sa, sizeof(sa)); - if (error == -1) - err.SetError(errno, DNBError::POSIX); + int error = ::bind(sock_fd, &address.sockaddr(), address.GetLength()); + if (error == -1) { + ClosePort(sock_fd, false); + continue; + } - if (err.Fail() || DNBLogCheckLogBit(LOG_RNB_COMM)) - err.LogThreaded( - "::bind ( socket = %i, (struct sockaddr *) &sa, sizeof(sa)) )", - listen_fd); + error = ::listen(sock_fd, 5); + if (error == -1) { + ClosePort(sock_fd, false); + continue; + } - if (err.Fail()) { - ClosePort(listen_fd, false); - return rnb_err; + // We were asked to listen on port zero which means we must now read the + // actual port that was given to us as port zero is a special code for "find + // an open port for me". This will only execute on the first socket created, + // subesquent sockets will reuse this port number. + if (port == 0) { + socklen_t sa_len = address.GetLength(); + if (getsockname(sock_fd, &address.sockaddr(), &sa_len) == 0) + port = address.GetPort(); + } + + sockets[sock_fd] = address; } - error = ::listen(listen_fd, 5); - if (error == -1) + if (sockets.size() == 0) { err.SetError(errno, DNBError::POSIX); - - if (err.Fail() || DNBLogCheckLogBit(LOG_RNB_COMM)) - err.LogThreaded("::listen ( socket = %i, backlog = 1 )", listen_fd); - - if (err.Fail()) { - ClosePort(listen_fd, false); + err.LogThreaded("::listen or ::bind failed"); return rnb_err; } - if (callback) { - // We were asked to listen on port zero which means we - // must now read the actual port that was given to us - // as port zero is a special code for "find an open port - // for me". - if (port == 0) { - socklen_t sa_len = sizeof(sa); - if (getsockname(listen_fd, (struct sockaddr *)&sa, &sa_len) == 0) { - port = ntohs(sa.sin_port); - callback(callback_baton, port); - } - } else { - callback(callback_baton, port); - } + if (callback) + callback(callback_baton, port); + + std::vector events; + events.resize(sockets.size()); + int i = 0; + for (auto socket : sockets) { + EV_SET(&events[i++], socket.first, EVFILT_READ, EV_ADD, 0, 0, 0); } - struct sockaddr_in accept_addr; - ::memset(&accept_addr, 0, sizeof accept_addr); - accept_addr.sin_len = sizeof accept_addr; - bool accept_connection = false; // Loop until we are happy with our connection while (!accept_connection) { - socklen_t accept_addr_len = sizeof accept_addr; - m_fd = - ::accept(listen_fd, (struct sockaddr *)&accept_addr, &accept_addr_len); - if (m_fd == -1) - err.SetError(errno, DNBError::POSIX); + struct kevent event_list[4]; + int num_events = + kevent(queue_id, events.data(), events.size(), event_list, 4, NULL); - if (err.Fail() || DNBLogCheckLogBit(LOG_RNB_COMM)) - err.LogThreaded( - "::accept ( socket = %i, address = %p, address_len = %u )", listen_fd, - &accept_addr, accept_addr_len); + if (num_events < 0) { + err.SetError(errno, DNBError::MachKernel); + err.LogThreaded("error: kevent() failed."); + } - if (err.Fail()) - break; + for (int i = 0; i < num_events; ++i) { + auto sock_fd = event_list[i].ident; + auto socket_pair = sockets.find(sock_fd); + if (socket_pair == sockets.end()) + continue; - if (listen_addr.sin_addr.s_addr == INADDR_ANY) - accept_connection = true; - else { - if (accept_addr_len == listen_addr.sin_len && - accept_addr.sin_addr.s_addr == listen_addr.sin_addr.s_addr) { + lldb_private::SocketAddress &addr_in = socket_pair->second; + lldb_private::SocketAddress accept_addr; + socklen_t sa_len = accept_addr.GetMaxLength(); + m_fd = ::accept(sock_fd, &accept_addr.sockaddr(), &sa_len); + + if (m_fd == -1) { + err.SetError(errno, DNBError::POSIX); + err.LogThreaded("error: Socket accept failed."); + } + + if (addr_in.IsAnyAddr()) accept_connection = true; - } else { - ::close(m_fd); - m_fd = -1; - const uint8_t *accept_ip = - (const uint8_t *)&accept_addr.sin_addr.s_addr; - const uint8_t *listen_ip = - (const uint8_t *)&listen_addr.sin_addr.s_addr; - ::fprintf(stderr, "error: rejecting incoming connection from " - "%u.%u.%u.%u (expecting %u.%u.%u.%u)\n", - accept_ip[0], accept_ip[1], accept_ip[2], accept_ip[3], - listen_ip[0], listen_ip[1], listen_ip[2], listen_ip[3]); - DNBLogThreaded("error: rejecting connection from %u.%u.%u.%u " - "(expecting %u.%u.%u.%u)", - accept_ip[0], accept_ip[1], accept_ip[2], accept_ip[3], - listen_ip[0], listen_ip[1], listen_ip[2], listen_ip[3]); + else { + if (accept_addr == addr_in) + accept_connection = true; + else { + ::close(m_fd); + m_fd = -1; + ::fprintf( + stderr, + "error: rejecting incoming connection from %s (expecting %s)\n", + accept_addr.GetIPAddress().c_str(), + addr_in.GetIPAddress().c_str()); + DNBLogThreaded("error: rejecting connection from %s (expecting %s)\n", + accept_addr.GetIPAddress().c_str(), + addr_in.GetIPAddress().c_str()); + } } } + if (err.Fail()) + break; } + for (auto socket : sockets) { + int ListenFd = socket.first; + ClosePort(ListenFd, false); + } - ClosePort(listen_fd, false); - - if (err.Fail()) { + if (err.Fail()) return rnb_err; - } else { - // Keep our TCP packets coming without any delays. - SetSocketOption(m_fd, IPPROTO_TCP, TCP_NODELAY, 1); - } + // Keep our TCP packets coming without any delays. + SetSocketOption(m_fd, IPPROTO_TCP, TCP_NODELAY, 1); + return rnb_success; } rnb_err_t RNBSocket::Connect(const char *host, uint16_t port) { + auto result = rnb_err; Disconnect(false); - // Create the socket - m_fd = ::socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); - if (m_fd == -1) - return rnb_err; + auto addresses = lldb_private::SocketAddress::GetAddressInfo( + host, NULL, AF_UNSPEC, SOCK_STREAM, IPPROTO_TCP); - // Enable local address reuse - SetSocketOption(m_fd, SOL_SOCKET, SO_REUSEADDR, 1); + for (auto address : addresses) { + m_fd = ::socket(address.GetFamily(), SOCK_STREAM, IPPROTO_TCP); + if (m_fd == -1) + continue; - struct sockaddr_in sa; - ::memset(&sa, 0, sizeof(sa)); - sa.sin_family = AF_INET; - sa.sin_port = htons(port); + // Enable local address reuse + SetSocketOption(m_fd, SOL_SOCKET, SO_REUSEADDR, 1); - if (!ResolveIPV4HostName(host, sa.sin_addr.s_addr)) { - DNBLogThreaded("error: failed to resolve host '%s'", host); - Disconnect(false); - return rnb_err; - } + address.SetPort(port); - if (-1 == ::connect(m_fd, (const struct sockaddr *)&sa, sizeof(sa))) { - Disconnect(false); - return rnb_err; - } + if (-1 == ::connect(m_fd, &address.sockaddr(), address.GetLength())) { + Disconnect(false); + continue; + } + SetSocketOption(m_fd, IPPROTO_TCP, TCP_NODELAY, 1); - // Keep our TCP packets coming without any delays. - SetSocketOption(m_fd, IPPROTO_TCP, TCP_NODELAY, 1); - return rnb_success; + result = rnb_success; + break; + } + return result; } rnb_err_t RNBSocket::useFD(int fd) { if (fd < 0) { DNBLogThreadedIf(LOG_RNB_COMM, "Bad file descriptor passed in."); return rnb_err; } m_fd = fd; return rnb_success; } #ifdef WITH_LOCKDOWN rnb_err_t RNBSocket::ConnectToService() { DNBLog("Connecting to com.apple.%s service...", DEBUGSERVER_PROGRAM_NAME); // Disconnect from any previous connections Disconnect(false); if (::secure_lockdown_checkin(&m_ld_conn, NULL, NULL) != kLDESuccess) { DNBLogThreadedIf(LOG_RNB_COMM, "::secure_lockdown_checkin(&m_fd, NULL, NULL) failed"); m_fd = -1; return rnb_not_connected; } m_fd = ::lockdown_get_socket(m_ld_conn); if (m_fd == -1) { DNBLogThreadedIf(LOG_RNB_COMM, "::lockdown_get_socket() failed"); return rnb_not_connected; } m_fd_from_lockdown = true; return rnb_success; } #endif rnb_err_t RNBSocket::OpenFile(const char *path) { DNBError err; m_fd = open(path, O_RDWR); if (m_fd == -1) { err.SetError(errno, DNBError::POSIX); err.LogThreaded("can't open file '%s'", path); return rnb_not_connected; } else { struct termios stdin_termios; if (::tcgetattr(m_fd, &stdin_termios) == 0) { stdin_termios.c_lflag &= ~ECHO; // Turn off echoing stdin_termios.c_lflag &= ~ICANON; // Get one char at a time ::tcsetattr(m_fd, TCSANOW, &stdin_termios); } } return rnb_success; } int RNBSocket::SetSocketOption(int fd, int level, int option_name, int option_value) { return ::setsockopt(fd, level, option_name, &option_value, sizeof(option_value)); } rnb_err_t RNBSocket::Disconnect(bool save_errno) { #ifdef WITH_LOCKDOWN if (m_fd_from_lockdown) { m_fd_from_lockdown = false; m_fd = -1; lockdown_disconnect(m_ld_conn); return rnb_success; } #endif return ClosePort(m_fd, save_errno); } rnb_err_t RNBSocket::Read(std::string &p) { char buf[1024]; p.clear(); // Note that BUF is on the stack so we must be careful to keep any // writes to BUF from overflowing or we'll have security issues. if (m_fd == -1) return rnb_err; // DNBLogThreadedIf(LOG_RNB_COMM, "%8u RNBSocket::%s calling read()", // (uint32_t)m_timer.ElapsedMicroSeconds(true), __FUNCTION__); DNBError err; ssize_t bytesread = read(m_fd, buf, sizeof(buf)); if (bytesread <= 0) err.SetError(errno, DNBError::POSIX); else p.append(buf, bytesread); if (err.Fail() || DNBLogCheckLogBit(LOG_RNB_COMM)) err.LogThreaded("::read ( %i, %p, %llu ) => %i", m_fd, buf, sizeof(buf), (uint64_t)bytesread); // Our port went away - we have to mark this so IsConnected will return the // truth. if (bytesread == 0) { m_fd = -1; return rnb_not_connected; } else if (bytesread == -1) { m_fd = -1; return rnb_err; } // Strip spaces from the end of the buffer while (!p.empty() && isspace(p[p.size() - 1])) p.erase(p.size() - 1); // Most data in the debugserver packets valid printable characters... DNBLogThreadedIf(LOG_RNB_COMM, "read: %s", p.c_str()); return rnb_success; } rnb_err_t RNBSocket::Write(const void *buffer, size_t length) { if (m_fd == -1) return rnb_err; DNBError err; ssize_t bytessent = write(m_fd, buffer, length); if (bytessent < 0) err.SetError(errno, DNBError::POSIX); if (err.Fail() || DNBLogCheckLogBit(LOG_RNB_COMM)) err.LogThreaded("::write ( socket = %i, buffer = %p, length = %llu) => %i", m_fd, buffer, length, (uint64_t)bytessent); if (bytessent < 0) return rnb_err; if ((size_t)bytessent != length) return rnb_err; DNBLogThreadedIf( LOG_RNB_PACKETS, "putpkt: %*s", (int)length, (char *) buffer); // All data is string based in debugserver, so this is safe DNBLogThreadedIf(LOG_RNB_COMM, "sent: %*s", (int)length, (char *)buffer); return rnb_success; } rnb_err_t RNBSocket::ClosePort(int &fd, bool save_errno) { int close_err = 0; if (fd > 0) { errno = 0; close_err = close(fd); fd = -1; } return close_err != 0 ? rnb_err : rnb_success; } Index: vendor/lldb/dist/tools/debugserver/source/debugserver.cpp =================================================================== --- vendor/lldb/dist/tools/debugserver/source/debugserver.cpp (revision 317691) +++ vendor/lldb/dist/tools/debugserver/source/debugserver.cpp (revision 317692) @@ -1,1672 +1,1680 @@ //===-- debugserver.cpp -----------------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #include #include #include // for _NSGetEnviron() #include #include #include #include #include #include #include #include #include #include #include #include #include #include #if defined(__APPLE__) #include extern "C" int proc_set_wakemon_params(pid_t, int, int); // SPI #endif #include "CFString.h" #include "DNB.h" #include "DNBLog.h" #include "DNBTimer.h" #include "OsLogger.h" #include "PseudoTerminal.h" #include "RNBContext.h" #include "RNBRemote.h" #include "RNBServices.h" #include "RNBSocket.h" #include "SysSignal.h" // Global PID in case we get a signal and need to stop the process... nub_process_t g_pid = INVALID_NUB_PROCESS; //---------------------------------------------------------------------- // Run loop modes which determine which run loop function will be called //---------------------------------------------------------------------- typedef enum { eRNBRunLoopModeInvalid = 0, eRNBRunLoopModeGetStartModeFromRemoteProtocol, eRNBRunLoopModeInferiorAttaching, eRNBRunLoopModeInferiorLaunching, eRNBRunLoopModeInferiorExecuting, eRNBRunLoopModePlatformMode, eRNBRunLoopModeExit } RNBRunLoopMode; //---------------------------------------------------------------------- // Global Variables //---------------------------------------------------------------------- RNBRemoteSP g_remoteSP; static int g_lockdown_opt = 0; static int g_applist_opt = 0; static nub_launch_flavor_t g_launch_flavor = eLaunchFlavorDefault; int g_disable_aslr = 0; int g_isatty = 0; bool g_detach_on_error = true; #define RNBLogSTDOUT(fmt, ...) \ do { \ if (g_isatty) { \ fprintf(stdout, fmt, ##__VA_ARGS__); \ } else { \ _DNBLog(0, fmt, ##__VA_ARGS__); \ } \ } while (0) #define RNBLogSTDERR(fmt, ...) \ do { \ if (g_isatty) { \ fprintf(stderr, fmt, ##__VA_ARGS__); \ } else { \ _DNBLog(0, fmt, ##__VA_ARGS__); \ } \ } while (0) //---------------------------------------------------------------------- // Get our program path and arguments from the remote connection. // We will need to start up the remote connection without a PID, get the // arguments, wait for the new process to finish launching and hit its // entry point, and then return the run loop mode that should come next. //---------------------------------------------------------------------- RNBRunLoopMode RNBRunLoopGetStartModeFromRemote(RNBRemote *remote) { std::string packet; if (remote) { RNBContext &ctx = remote->Context(); uint32_t event_mask = RNBContext::event_read_packet_available | RNBContext::event_read_thread_exiting; // Spin waiting to get the A packet. while (1) { DNBLogThreadedIf(LOG_RNB_MAX, "%s ctx.Events().WaitForSetEvents( 0x%08x ) ...", __FUNCTION__, event_mask); nub_event_t set_events = ctx.Events().WaitForSetEvents(event_mask); DNBLogThreadedIf(LOG_RNB_MAX, "%s ctx.Events().WaitForSetEvents( 0x%08x ) => 0x%08x", __FUNCTION__, event_mask, set_events); if (set_events & RNBContext::event_read_thread_exiting) { RNBLogSTDERR("error: packet read thread exited.\n"); return eRNBRunLoopModeExit; } if (set_events & RNBContext::event_read_packet_available) { rnb_err_t err = rnb_err; RNBRemote::PacketEnum type; err = remote->HandleReceivedPacket(&type); // check if we tried to attach to a process if (type == RNBRemote::vattach || type == RNBRemote::vattachwait || type == RNBRemote::vattachorwait) { if (err == rnb_success) { RNBLogSTDOUT("Attach succeeded, ready to debug.\n"); return eRNBRunLoopModeInferiorExecuting; } else { RNBLogSTDERR("error: attach failed.\n"); return eRNBRunLoopModeExit; } } if (err == rnb_success) { // If we got our arguments we are ready to launch using the arguments // and any environment variables we received. if (type == RNBRemote::set_argv) { return eRNBRunLoopModeInferiorLaunching; } } else if (err == rnb_not_connected) { RNBLogSTDERR("error: connection lost.\n"); return eRNBRunLoopModeExit; } else { // a catch all for any other gdb remote packets that failed DNBLogThreadedIf(LOG_RNB_MINIMAL, "%s Error getting packet.", __FUNCTION__); continue; } DNBLogThreadedIf(LOG_RNB_MINIMAL, "#### %s", __FUNCTION__); } else { DNBLogThreadedIf(LOG_RNB_MINIMAL, "%s Connection closed before getting \"A\" packet.", __FUNCTION__); return eRNBRunLoopModeExit; } } } return eRNBRunLoopModeExit; } //---------------------------------------------------------------------- // This run loop mode will wait for the process to launch and hit its // entry point. It will currently ignore all events except for the // process state changed event, where it watches for the process stopped // or crash process state. //---------------------------------------------------------------------- RNBRunLoopMode RNBRunLoopLaunchInferior(RNBRemote *remote, const char *stdin_path, const char *stdout_path, const char *stderr_path, bool no_stdio) { RNBContext &ctx = remote->Context(); // The Process stuff takes a c array, the RNBContext has a vector... // So make up a c array. DNBLogThreadedIf(LOG_RNB_MINIMAL, "%s Launching '%s'...", __FUNCTION__, ctx.ArgumentAtIndex(0)); size_t inferior_argc = ctx.ArgumentCount(); // Initialize inferior_argv with inferior_argc + 1 NULLs std::vector inferior_argv(inferior_argc + 1, NULL); size_t i; for (i = 0; i < inferior_argc; i++) inferior_argv[i] = ctx.ArgumentAtIndex(i); // Pass the environment array the same way: size_t inferior_envc = ctx.EnvironmentCount(); // Initialize inferior_argv with inferior_argc + 1 NULLs std::vector inferior_envp(inferior_envc + 1, NULL); for (i = 0; i < inferior_envc; i++) inferior_envp[i] = ctx.EnvironmentAtIndex(i); // Our launch type hasn't been set to anything concrete, so we need to // figure our how we are going to launch automatically. nub_launch_flavor_t launch_flavor = g_launch_flavor; if (launch_flavor == eLaunchFlavorDefault) { // Our default launch method is posix spawn launch_flavor = eLaunchFlavorPosixSpawn; #if defined WITH_FBS // Check if we have an app bundle, if so launch using BackBoard Services. if (strstr(inferior_argv[0], ".app")) { launch_flavor = eLaunchFlavorFBS; } #elif defined WITH_BKS // Check if we have an app bundle, if so launch using BackBoard Services. if (strstr(inferior_argv[0], ".app")) { launch_flavor = eLaunchFlavorBKS; } #elif defined WITH_SPRINGBOARD // Check if we have an app bundle, if so launch using SpringBoard. if (strstr(inferior_argv[0], ".app")) { launch_flavor = eLaunchFlavorSpringBoard; } #endif } ctx.SetLaunchFlavor(launch_flavor); char resolved_path[PATH_MAX]; // If we fail to resolve the path to our executable, then just use what we // were given and hope for the best if (!DNBResolveExecutablePath(inferior_argv[0], resolved_path, sizeof(resolved_path))) ::strncpy(resolved_path, inferior_argv[0], sizeof(resolved_path)); char launch_err_str[PATH_MAX]; launch_err_str[0] = '\0'; const char *cwd = (ctx.GetWorkingDirPath() != NULL ? ctx.GetWorkingDirPath() : ctx.GetWorkingDirectory()); const char *process_event = ctx.GetProcessEvent(); nub_process_t pid = DNBProcessLaunch( resolved_path, &inferior_argv[0], &inferior_envp[0], cwd, stdin_path, stdout_path, stderr_path, no_stdio, launch_flavor, g_disable_aslr, process_event, launch_err_str, sizeof(launch_err_str)); g_pid = pid; if (pid == INVALID_NUB_PROCESS && strlen(launch_err_str) > 0) { DNBLogThreaded("%s DNBProcessLaunch() returned error: '%s'", __FUNCTION__, launch_err_str); ctx.LaunchStatus().SetError(-1, DNBError::Generic); ctx.LaunchStatus().SetErrorString(launch_err_str); } else if (pid == INVALID_NUB_PROCESS) { DNBLogThreaded( "%s DNBProcessLaunch() failed to launch process, unknown failure", __FUNCTION__); ctx.LaunchStatus().SetError(-1, DNBError::Generic); ctx.LaunchStatus().SetErrorString(""); } else { ctx.LaunchStatus().Clear(); } if (remote->Comm().IsConnected()) { // It we are connected already, the next thing gdb will do is ask // whether the launch succeeded, and if not, whether there is an // error code. So we need to fetch one packet from gdb before we wait // on the stop from the target. uint32_t event_mask = RNBContext::event_read_packet_available; nub_event_t set_events = ctx.Events().WaitForSetEvents(event_mask); if (set_events & RNBContext::event_read_packet_available) { rnb_err_t err = rnb_err; RNBRemote::PacketEnum type; err = remote->HandleReceivedPacket(&type); if (err != rnb_success) { DNBLogThreadedIf(LOG_RNB_MINIMAL, "%s Error getting packet.", __FUNCTION__); return eRNBRunLoopModeExit; } if (type != RNBRemote::query_launch_success) { DNBLogThreadedIf(LOG_RNB_MINIMAL, "%s Didn't get the expected qLaunchSuccess packet.", __FUNCTION__); } } } while (pid != INVALID_NUB_PROCESS) { // Wait for process to start up and hit entry point DNBLogThreadedIf(LOG_RNB_EVENTS, "%s DNBProcessWaitForEvent (%4.4x, " "eEventProcessRunningStateChanged | " "eEventProcessStoppedStateChanged, true, " "INFINITE)...", __FUNCTION__, pid); nub_event_t set_events = DNBProcessWaitForEvents(pid, eEventProcessRunningStateChanged | eEventProcessStoppedStateChanged, true, NULL); DNBLogThreadedIf(LOG_RNB_EVENTS, "%s DNBProcessWaitForEvent (%4.4x, " "eEventProcessRunningStateChanged | " "eEventProcessStoppedStateChanged, true, " "INFINITE) => 0x%8.8x", __FUNCTION__, pid, set_events); if (set_events == 0) { pid = INVALID_NUB_PROCESS; g_pid = pid; } else { if (set_events & (eEventProcessRunningStateChanged | eEventProcessStoppedStateChanged)) { nub_state_t pid_state = DNBProcessGetState(pid); DNBLogThreadedIf( LOG_RNB_EVENTS, "%s process %4.4x state changed (eEventProcessStateChanged): %s", __FUNCTION__, pid, DNBStateAsString(pid_state)); switch (pid_state) { case eStateInvalid: case eStateUnloaded: case eStateAttaching: case eStateLaunching: case eStateSuspended: break; // Ignore case eStateRunning: case eStateStepping: // Still waiting to stop at entry point... break; case eStateStopped: case eStateCrashed: ctx.SetProcessID(pid); return eRNBRunLoopModeInferiorExecuting; case eStateDetached: case eStateExited: pid = INVALID_NUB_PROCESS; g_pid = pid; return eRNBRunLoopModeExit; } } DNBProcessResetEvents(pid, set_events); } } return eRNBRunLoopModeExit; } //---------------------------------------------------------------------- // This run loop mode will wait for the process to launch and hit its // entry point. It will currently ignore all events except for the // process state changed event, where it watches for the process stopped // or crash process state. //---------------------------------------------------------------------- RNBRunLoopMode RNBRunLoopLaunchAttaching(RNBRemote *remote, nub_process_t attach_pid, nub_process_t &pid) { RNBContext &ctx = remote->Context(); DNBLogThreadedIf(LOG_RNB_MINIMAL, "%s Attaching to pid %i...", __FUNCTION__, attach_pid); char err_str[1024]; pid = DNBProcessAttach(attach_pid, NULL, err_str, sizeof(err_str)); g_pid = pid; if (pid == INVALID_NUB_PROCESS) { ctx.LaunchStatus().SetError(-1, DNBError::Generic); if (err_str[0]) ctx.LaunchStatus().SetErrorString(err_str); return eRNBRunLoopModeExit; } else { ctx.SetProcessID(pid); return eRNBRunLoopModeInferiorExecuting; } } //---------------------------------------------------------------------- // Watch for signals: // SIGINT: so we can halt our inferior. (disabled for now) // SIGPIPE: in case our child process dies //---------------------------------------------------------------------- int g_sigint_received = 0; int g_sigpipe_received = 0; void signal_handler(int signo) { DNBLogThreadedIf(LOG_RNB_MINIMAL, "%s (%s)", __FUNCTION__, SysSignal::Name(signo)); switch (signo) { case SIGINT: g_sigint_received++; if (g_pid != INVALID_NUB_PROCESS) { // Only send a SIGINT once... if (g_sigint_received == 1) { switch (DNBProcessGetState(g_pid)) { case eStateRunning: case eStateStepping: DNBProcessSignal(g_pid, SIGSTOP); return; default: break; } } } exit(SIGINT); break; case SIGPIPE: g_sigpipe_received = 1; break; } } // Return the new run loop mode based off of the current process state RNBRunLoopMode HandleProcessStateChange(RNBRemote *remote, bool initialize) { RNBContext &ctx = remote->Context(); nub_process_t pid = ctx.ProcessID(); if (pid == INVALID_NUB_PROCESS) { DNBLogThreadedIf(LOG_RNB_MINIMAL, "#### %s error: pid invalid, exiting...", __FUNCTION__); return eRNBRunLoopModeExit; } nub_state_t pid_state = DNBProcessGetState(pid); DNBLogThreadedIf(LOG_RNB_MINIMAL, "%s (&remote, initialize=%i) pid_state = %s", __FUNCTION__, (int)initialize, DNBStateAsString(pid_state)); switch (pid_state) { case eStateInvalid: case eStateUnloaded: // Something bad happened return eRNBRunLoopModeExit; break; case eStateAttaching: case eStateLaunching: return eRNBRunLoopModeInferiorExecuting; case eStateSuspended: case eStateCrashed: case eStateStopped: // If we stop due to a signal, so clear the fact that we got a SIGINT // so we can stop ourselves again (but only while our inferior // process is running..) g_sigint_received = 0; if (initialize == false) { // Compare the last stop count to our current notion of a stop count // to make sure we don't notify more than once for a given stop. nub_size_t prev_pid_stop_count = ctx.GetProcessStopCount(); bool pid_stop_count_changed = ctx.SetProcessStopCount(DNBProcessGetStopCount(pid)); if (pid_stop_count_changed) { remote->FlushSTDIO(); if (ctx.GetProcessStopCount() == 1) { DNBLogThreadedIf( LOG_RNB_MINIMAL, "%s (&remote, initialize=%i) pid_state = %s " "pid_stop_count %llu (old %llu)) Notify??? no, " "first stop...", __FUNCTION__, (int)initialize, DNBStateAsString(pid_state), (uint64_t)ctx.GetProcessStopCount(), (uint64_t)prev_pid_stop_count); } else { DNBLogThreadedIf(LOG_RNB_MINIMAL, "%s (&remote, initialize=%i) " "pid_state = %s pid_stop_count " "%llu (old %llu)) Notify??? YES!!!", __FUNCTION__, (int)initialize, DNBStateAsString(pid_state), (uint64_t)ctx.GetProcessStopCount(), (uint64_t)prev_pid_stop_count); remote->NotifyThatProcessStopped(); } } else { DNBLogThreadedIf( LOG_RNB_MINIMAL, "%s (&remote, initialize=%i) pid_state = %s " "pid_stop_count %llu (old %llu)) Notify??? " "skipping...", __FUNCTION__, (int)initialize, DNBStateAsString(pid_state), (uint64_t)ctx.GetProcessStopCount(), (uint64_t)prev_pid_stop_count); } } return eRNBRunLoopModeInferiorExecuting; case eStateStepping: case eStateRunning: return eRNBRunLoopModeInferiorExecuting; case eStateExited: remote->HandlePacket_last_signal(NULL); case eStateDetached: return eRNBRunLoopModeExit; } // Catch all... return eRNBRunLoopModeExit; } // This function handles the case where our inferior program is stopped and // we are waiting for gdb remote protocol packets. When a packet occurs that // makes the inferior run, we need to leave this function with a new state // as the return code. RNBRunLoopMode RNBRunLoopInferiorExecuting(RNBRemote *remote) { DNBLogThreadedIf(LOG_RNB_MINIMAL, "#### %s", __FUNCTION__); RNBContext &ctx = remote->Context(); // Init our mode and set 'is_running' based on the current process state RNBRunLoopMode mode = HandleProcessStateChange(remote, true); while (ctx.ProcessID() != INVALID_NUB_PROCESS) { std::string set_events_str; uint32_t event_mask = ctx.NormalEventBits(); if (!ctx.ProcessStateRunning()) { // Clear some bits if we are not running so we don't send any async // packets event_mask &= ~RNBContext::event_proc_stdio_available; event_mask &= ~RNBContext::event_proc_profile_data; // When we enable async structured data packets over another logical // channel, // this can be relaxed. event_mask &= ~RNBContext::event_darwin_log_data_available; } // We want to make sure we consume all process state changes and have // whomever is notifying us to wait for us to reset the event bit before // continuing. // ctx.Events().SetResetAckMask (RNBContext::event_proc_state_changed); DNBLogThreadedIf(LOG_RNB_EVENTS, "%s ctx.Events().WaitForSetEvents(0x%08x) ...", __FUNCTION__, event_mask); nub_event_t set_events = ctx.Events().WaitForSetEvents(event_mask); DNBLogThreadedIf(LOG_RNB_EVENTS, "%s ctx.Events().WaitForSetEvents(0x%08x) => 0x%08x (%s)", __FUNCTION__, event_mask, set_events, ctx.EventsAsString(set_events, set_events_str)); if (set_events) { if ((set_events & RNBContext::event_proc_thread_exiting) || (set_events & RNBContext::event_proc_stdio_available)) { remote->FlushSTDIO(); } if (set_events & RNBContext::event_proc_profile_data) { remote->SendAsyncProfileData(); } if (set_events & RNBContext::event_darwin_log_data_available) { remote->SendAsyncDarwinLogData(); } if (set_events & RNBContext::event_read_packet_available) { // handleReceivedPacket will take care of resetting the // event_read_packet_available events when there are no more... set_events ^= RNBContext::event_read_packet_available; if (ctx.ProcessStateRunning()) { if (remote->HandleAsyncPacket() == rnb_not_connected) { // TODO: connect again? Exit? } } else { if (remote->HandleReceivedPacket() == rnb_not_connected) { // TODO: connect again? Exit? } } } if (set_events & RNBContext::event_proc_state_changed) { mode = HandleProcessStateChange(remote, false); ctx.Events().ResetEvents(RNBContext::event_proc_state_changed); set_events ^= RNBContext::event_proc_state_changed; } if (set_events & RNBContext::event_proc_thread_exiting) { mode = eRNBRunLoopModeExit; } if (set_events & RNBContext::event_read_thread_exiting) { // Out remote packet receiving thread exited, exit for now. if (ctx.HasValidProcessID()) { // TODO: We should add code that will leave the current process // in its current state and listen for another connection... if (ctx.ProcessStateRunning()) { if (ctx.GetDetachOnError()) { DNBLog("debugserver's event read thread is exiting, detaching " "from the inferior process."); DNBProcessDetach(ctx.ProcessID()); } else { DNBLog("debugserver's event read thread is exiting, killing the " "inferior process."); DNBProcessKill(ctx.ProcessID()); } } else { if (ctx.GetDetachOnError()) { DNBLog("debugserver's event read thread is exiting, detaching " "from the inferior process."); DNBProcessDetach(ctx.ProcessID()); } } } mode = eRNBRunLoopModeExit; } } // Reset all event bits that weren't reset for now... if (set_events != 0) ctx.Events().ResetEvents(set_events); if (mode != eRNBRunLoopModeInferiorExecuting) break; } return mode; } RNBRunLoopMode RNBRunLoopPlatform(RNBRemote *remote) { RNBRunLoopMode mode = eRNBRunLoopModePlatformMode; RNBContext &ctx = remote->Context(); while (mode == eRNBRunLoopModePlatformMode) { std::string set_events_str; const uint32_t event_mask = RNBContext::event_read_packet_available | RNBContext::event_read_thread_exiting; DNBLogThreadedIf(LOG_RNB_EVENTS, "%s ctx.Events().WaitForSetEvents(0x%08x) ...", __FUNCTION__, event_mask); nub_event_t set_events = ctx.Events().WaitForSetEvents(event_mask); DNBLogThreadedIf(LOG_RNB_EVENTS, "%s ctx.Events().WaitForSetEvents(0x%08x) => 0x%08x (%s)", __FUNCTION__, event_mask, set_events, ctx.EventsAsString(set_events, set_events_str)); if (set_events) { if (set_events & RNBContext::event_read_packet_available) { if (remote->HandleReceivedPacket() == rnb_not_connected) mode = eRNBRunLoopModeExit; } if (set_events & RNBContext::event_read_thread_exiting) { mode = eRNBRunLoopModeExit; } ctx.Events().ResetEvents(set_events); } } return eRNBRunLoopModeExit; } //---------------------------------------------------------------------- // Convenience function to set up the remote listening port // Returns 1 for success 0 for failure. //---------------------------------------------------------------------- static void PortWasBoundCallbackUnixSocket(const void *baton, in_port_t port) { //::printf ("PortWasBoundCallbackUnixSocket (baton = %p, port = %u)\n", baton, //port); const char *unix_socket_name = (const char *)baton; if (unix_socket_name && unix_socket_name[0]) { // We were given a unix socket name to use to communicate the port // that we ended up binding to back to our parent process struct sockaddr_un saddr_un; int s = ::socket(AF_UNIX, SOCK_STREAM, 0); if (s < 0) { perror("error: socket (AF_UNIX, SOCK_STREAM, 0)"); exit(1); } saddr_un.sun_family = AF_UNIX; ::strncpy(saddr_un.sun_path, unix_socket_name, sizeof(saddr_un.sun_path) - 1); saddr_un.sun_path[sizeof(saddr_un.sun_path) - 1] = '\0'; saddr_un.sun_len = SUN_LEN(&saddr_un); if (::connect(s, (struct sockaddr *)&saddr_un, static_cast(SUN_LEN(&saddr_un))) < 0) { perror("error: connect (socket, &saddr_un, saddr_un_len)"); exit(1); } //::printf ("connect () sucess!!\n"); // We were able to connect to the socket, now write our PID so whomever // launched us will know this process's ID RNBLogSTDOUT("Listening to port %i...\n", port); char pid_str[64]; const int pid_str_len = ::snprintf(pid_str, sizeof(pid_str), "%u", port); const ssize_t bytes_sent = ::send(s, pid_str, pid_str_len, 0); if (pid_str_len != bytes_sent) { perror("error: send (s, pid_str, pid_str_len, 0)"); exit(1); } //::printf ("send () sucess!!\n"); // We are done with the socket close(s); } } static void PortWasBoundCallbackNamedPipe(const void *baton, uint16_t port) { const char *named_pipe = (const char *)baton; if (named_pipe && named_pipe[0]) { int fd = ::open(named_pipe, O_WRONLY); if (fd > -1) { char port_str[64]; const ssize_t port_str_len = ::snprintf(port_str, sizeof(port_str), "%u", port); // Write the port number as a C string with the NULL terminator ::write(fd, port_str, port_str_len + 1); close(fd); } } } static int ConnectRemote(RNBRemote *remote, const char *host, int port, bool reverse_connect, const char *named_pipe_path, const char *unix_socket_name) { if (!remote->Comm().IsConnected()) { if (reverse_connect) { if (port == 0) { DNBLogThreaded( "error: invalid port supplied for reverse connection: %i.\n", port); return 0; } if (remote->Comm().Connect(host, port) != rnb_success) { DNBLogThreaded("Failed to reverse connect to %s:%i.\n", host, port); return 0; } } else { if (port != 0) RNBLogSTDOUT("Listening to port %i for a connection from %s...\n", port, host ? host : "127.0.0.1"); if (unix_socket_name && unix_socket_name[0]) { if (remote->Comm().Listen(host, port, PortWasBoundCallbackUnixSocket, unix_socket_name) != rnb_success) { RNBLogSTDERR("Failed to get connection from a remote gdb process.\n"); return 0; } } else { if (remote->Comm().Listen(host, port, PortWasBoundCallbackNamedPipe, named_pipe_path) != rnb_success) { RNBLogSTDERR("Failed to get connection from a remote gdb process.\n"); return 0; } } } remote->StartReadRemoteDataThread(); } return 1; } //---------------------------------------------------------------------- // ASL Logging callback that can be registered with DNBLogSetLogCallback //---------------------------------------------------------------------- void ASLLogCallback(void *baton, uint32_t flags, const char *format, va_list args) { if (format == NULL) return; static aslmsg g_aslmsg = NULL; if (g_aslmsg == NULL) { g_aslmsg = ::asl_new(ASL_TYPE_MSG); char asl_key_sender[PATH_MAX]; snprintf(asl_key_sender, sizeof(asl_key_sender), "com.apple.%s-%s", DEBUGSERVER_PROGRAM_NAME, DEBUGSERVER_VERSION_STR); ::asl_set(g_aslmsg, ASL_KEY_SENDER, asl_key_sender); } int asl_level; if (flags & DNBLOG_FLAG_FATAL) asl_level = ASL_LEVEL_CRIT; else if (flags & DNBLOG_FLAG_ERROR) asl_level = ASL_LEVEL_ERR; else if (flags & DNBLOG_FLAG_WARNING) asl_level = ASL_LEVEL_WARNING; else if (flags & DNBLOG_FLAG_VERBOSE) asl_level = ASL_LEVEL_WARNING; // ASL_LEVEL_INFO; else asl_level = ASL_LEVEL_WARNING; // ASL_LEVEL_DEBUG; ::asl_vlog(NULL, g_aslmsg, asl_level, format, args); } //---------------------------------------------------------------------- // FILE based Logging callback that can be registered with // DNBLogSetLogCallback //---------------------------------------------------------------------- void FileLogCallback(void *baton, uint32_t flags, const char *format, va_list args) { if (baton == NULL || format == NULL) return; ::vfprintf((FILE *)baton, format, args); ::fprintf((FILE *)baton, "\n"); ::fflush((FILE *)baton); } void show_usage_and_exit(int exit_code) { RNBLogSTDERR( "Usage:\n %s host:port [program-name program-arg1 program-arg2 ...]\n", DEBUGSERVER_PROGRAM_NAME); RNBLogSTDERR(" %s /path/file [program-name program-arg1 program-arg2 ...]\n", DEBUGSERVER_PROGRAM_NAME); RNBLogSTDERR(" %s host:port --attach=\n", DEBUGSERVER_PROGRAM_NAME); RNBLogSTDERR(" %s /path/file --attach=\n", DEBUGSERVER_PROGRAM_NAME); RNBLogSTDERR(" %s host:port --attach=\n", DEBUGSERVER_PROGRAM_NAME); RNBLogSTDERR(" %s /path/file --attach=\n", DEBUGSERVER_PROGRAM_NAME); exit(exit_code); } //---------------------------------------------------------------------- // option descriptors for getopt_long_only() //---------------------------------------------------------------------- static struct option g_long_options[] = { {"attach", required_argument, NULL, 'a'}, {"arch", required_argument, NULL, 'A'}, {"debug", no_argument, NULL, 'g'}, {"kill-on-error", no_argument, NULL, 'K'}, {"verbose", 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'}, {"log-flags", required_argument, NULL, 'f'}, {"launch", required_argument, NULL, 'x'}, // Valid values are "auto", // "posix-spawn", "fork-exec", // "springboard" (arm only) {"waitfor", required_argument, NULL, 'w'}, // Wait for a process whose name starts with ARG {"waitfor-interval", required_argument, NULL, 'i'}, // Time in usecs to wait between sampling the pid list when waiting // for a process by name {"waitfor-duration", required_argument, NULL, 'd'}, // The time in seconds to wait for a process to show up by name {"native-regs", no_argument, NULL, 'r'}, // Specify to use the native // registers instead of the gdb // defaults for the architecture. {"stdio-path", required_argument, NULL, 's'}, // Set the STDIO path to be used when launching applications (STDIN, // STDOUT and STDERR) (only if debugserver launches the process) {"stdin-path", required_argument, NULL, 'I'}, // Set the STDIN path to be used when launching applications (only if // debugserver launches the process) {"stdout-path", required_argument, NULL, 'O'}, // Set the STDOUT path to be used when launching applications (only // if debugserver launches the process) {"stderr-path", required_argument, NULL, 'E'}, // Set the STDERR path to be used when launching applications (only // if debugserver launches the process) {"no-stdio", no_argument, NULL, 'n'}, // Do not set up any stdio (perhaps the program is a GUI program) // (only if debugserver launches the process) {"setsid", no_argument, NULL, 'S'}, // call setsid() to make debugserver run in its own session {"disable-aslr", no_argument, NULL, 'D'}, // Use _POSIX_SPAWN_DISABLE_ASLR // to avoid shared library // randomization {"working-dir", required_argument, NULL, 'W'}, // The working directory that the inferior process should have (only // if debugserver launches the process) {"platform", required_argument, NULL, 'p'}, // Put this executable into a remote platform mode {"unix-socket", required_argument, NULL, 'u'}, // If we need to handshake with our parent process, an option will be // passed down that specifies a unix socket name to use {"fd", required_argument, NULL, 'FDSC'}, // A file descriptor was passed to this process when spawned that // is already open and ready for communication {"named-pipe", required_argument, NULL, 'P'}, {"reverse-connect", no_argument, NULL, 'R'}, {"env", required_argument, NULL, 'e'}, // When debugserver launches the process, set a single environment // entry as specified by the option value ("./debugserver -e FOO=1 -e // BAR=2 localhost:1234 -- /bin/ls") {"forward-env", no_argument, NULL, 'F'}, // When debugserver launches the process, forward debugserver's // current environment variables to the child process ("./debugserver // -F localhost:1234 -- /bin/ls" {NULL, 0, NULL, 0}}; //---------------------------------------------------------------------- // main //---------------------------------------------------------------------- int main(int argc, char *argv[]) { // If debugserver is launched with DYLD_INSERT_LIBRARIES, unset it so we // don't spawn child processes with this enabled. unsetenv("DYLD_INSERT_LIBRARIES"); const char *argv_sub_zero = argv[0]; // save a copy of argv[0] for error reporting post-launch #if defined(__APPLE__) pthread_setname_np("main thread"); #if defined(__arm__) || defined(__arm64__) || defined(__aarch64__) struct sched_param thread_param; int thread_sched_policy; if (pthread_getschedparam(pthread_self(), &thread_sched_policy, &thread_param) == 0) { thread_param.sched_priority = 47; pthread_setschedparam(pthread_self(), thread_sched_policy, &thread_param); } ::proc_set_wakemon_params( getpid(), 500, 0); // Allow up to 500 wakeups/sec to avoid EXC_RESOURCE for normal use. #endif #endif g_isatty = ::isatty(STDIN_FILENO); // ::printf ("uid=%u euid=%u gid=%u egid=%u\n", // getuid(), // geteuid(), // getgid(), // getegid()); // signal (SIGINT, signal_handler); signal(SIGPIPE, signal_handler); signal(SIGHUP, signal_handler); // We're always sitting in waitpid or kevent waiting on our target process' // death, // we don't need no stinking SIGCHLD's... sigset_t sigset; sigemptyset(&sigset); sigaddset(&sigset, SIGCHLD); sigprocmask(SIG_BLOCK, &sigset, NULL); g_remoteSP.reset(new RNBRemote()); RNBRemote *remote = g_remoteSP.get(); if (remote == NULL) { RNBLogSTDERR("error: failed to create a remote connection class\n"); return -1; } RNBContext &ctx = remote->Context(); int i; int attach_pid = INVALID_NUB_PROCESS; FILE *log_file = NULL; uint32_t log_flags = 0; // Parse our options int ch; int long_option_index = 0; int debug = 0; int communication_fd = -1; std::string compile_options; std::string waitfor_pid_name; // Wait for a process that starts with this name std::string attach_pid_name; std::string arch_name; std::string working_dir; // The new working directory to use for the inferior std::string unix_socket_name; // If we need to handshake with our parent // process, an option will be passed down that // specifies a unix socket name to use std::string named_pipe_path; // If we need to handshake with our parent // process, an option will be passed down that // specifies a named pipe to use useconds_t waitfor_interval = 1000; // Time in usecs between process lists // polls when waiting for a process by // name, default 1 msec. useconds_t waitfor_duration = 0; // Time in seconds to wait for a process by name, 0 means wait forever. bool no_stdio = false; bool reverse_connect = false; // Set to true by an option to indicate we // should reverse connect to the host:port // supplied as the first debugserver argument #if !defined(DNBLOG_ENABLED) compile_options += "(no-logging) "; #endif RNBRunLoopMode start_mode = eRNBRunLoopModeExit; char short_options[512]; uint32_t short_options_idx = 0; // Handle the two case that don't have short options in g_long_options short_options[short_options_idx++] = 'k'; short_options[short_options_idx++] = 't'; for (i = 0; g_long_options[i].name != NULL; ++i) { if (isalpha(g_long_options[i].val)) { short_options[short_options_idx++] = g_long_options[i].val; switch (g_long_options[i].has_arg) { default: case no_argument: break; case optional_argument: short_options[short_options_idx++] = ':'; // Fall through to required_argument case below... case required_argument: short_options[short_options_idx++] = ':'; break; } } } // NULL terminate the short option string. short_options[short_options_idx++] = '\0'; #if __GLIBC__ optind = 0; #else optreset = 1; optind = 1; #endif while ((ch = getopt_long_only(argc, argv, short_options, g_long_options, &long_option_index)) != -1) { DNBLogDebug("option: ch == %c (0x%2.2x) --%s%c%s\n", ch, (uint8_t)ch, g_long_options[long_option_index].name, g_long_options[long_option_index].has_arg ? '=' : ' ', optarg ? optarg : ""); switch (ch) { case 0: // Any optional that auto set themselves will return 0 break; case 'A': if (optarg && optarg[0]) arch_name.assign(optarg); break; case 'a': if (optarg && optarg[0]) { if (isdigit(optarg[0])) { char *end = NULL; attach_pid = static_cast(strtoul(optarg, &end, 0)); if (end == NULL || *end != '\0') { RNBLogSTDERR("error: invalid pid option '%s'\n", optarg); exit(4); } } else { attach_pid_name = optarg; } start_mode = eRNBRunLoopModeInferiorAttaching; } break; // --waitfor=NAME case 'w': if (optarg && optarg[0]) { waitfor_pid_name = optarg; start_mode = eRNBRunLoopModeInferiorAttaching; } break; // --waitfor-interval=USEC case 'i': if (optarg && optarg[0]) { char *end = NULL; waitfor_interval = static_cast(strtoul(optarg, &end, 0)); if (end == NULL || *end != '\0') { RNBLogSTDERR("error: invalid waitfor-interval option value '%s'.\n", optarg); exit(6); } } break; // --waitfor-duration=SEC case 'd': if (optarg && optarg[0]) { char *end = NULL; waitfor_duration = static_cast(strtoul(optarg, &end, 0)); if (end == NULL || *end != '\0') { RNBLogSTDERR("error: invalid waitfor-duration option value '%s'.\n", optarg); exit(7); } } break; case 'K': g_detach_on_error = false; break; case 'W': if (optarg && optarg[0]) working_dir.assign(optarg); break; case 'x': if (optarg && optarg[0]) { if (strcasecmp(optarg, "auto") == 0) g_launch_flavor = eLaunchFlavorDefault; else if (strcasestr(optarg, "posix") == optarg) g_launch_flavor = eLaunchFlavorPosixSpawn; else if (strcasestr(optarg, "fork") == optarg) g_launch_flavor = eLaunchFlavorForkExec; #ifdef WITH_SPRINGBOARD else if (strcasestr(optarg, "spring") == optarg) g_launch_flavor = eLaunchFlavorSpringBoard; #endif #ifdef WITH_BKS else if (strcasestr(optarg, "backboard") == optarg) g_launch_flavor = eLaunchFlavorBKS; #endif #ifdef WITH_FBS else if (strcasestr(optarg, "frontboard") == optarg) g_launch_flavor = eLaunchFlavorFBS; #endif else { RNBLogSTDERR("error: invalid TYPE for the --launch=TYPE (-x TYPE) " "option: '%s'\n", optarg); RNBLogSTDERR("Valid values TYPE are:\n"); RNBLogSTDERR( " auto Auto-detect the best launch method to use.\n"); RNBLogSTDERR( " posix Launch the executable using posix_spawn.\n"); RNBLogSTDERR( " fork Launch the executable using fork and exec.\n"); #ifdef WITH_SPRINGBOARD RNBLogSTDERR( " spring Launch the executable through Springboard.\n"); #endif #ifdef WITH_BKS RNBLogSTDERR(" backboard Launch the executable through BackBoard " "Services.\n"); #endif #ifdef WITH_FBS RNBLogSTDERR(" frontboard Launch the executable through FrontBoard " "Services.\n"); #endif exit(5); } } break; case 'l': // Set Log File if (optarg && optarg[0]) { if (strcasecmp(optarg, "stdout") == 0) log_file = stdout; else if (strcasecmp(optarg, "stderr") == 0) log_file = stderr; else { log_file = fopen(optarg, "w"); if (log_file != NULL) setlinebuf(log_file); } if (log_file == NULL) { const char *errno_str = strerror(errno); RNBLogSTDERR( "Failed to open log file '%s' for writing: errno = %i (%s)", optarg, errno, errno_str ? errno_str : "unknown error"); } } break; case 'f': // Log Flags if (optarg && optarg[0]) log_flags = static_cast(strtoul(optarg, NULL, 0)); break; case 'g': debug = 1; DNBLogSetDebug(debug); break; case 't': g_applist_opt = 1; break; case 'k': g_lockdown_opt = 1; break; case 'r': // Do nothing, native regs is the default these days break; case 'R': reverse_connect = true; break; case 'v': DNBLogSetVerbose(1); break; case 's': ctx.GetSTDIN().assign(optarg); ctx.GetSTDOUT().assign(optarg); ctx.GetSTDERR().assign(optarg); break; case 'I': ctx.GetSTDIN().assign(optarg); break; case 'O': ctx.GetSTDOUT().assign(optarg); break; case 'E': ctx.GetSTDERR().assign(optarg); break; case 'n': no_stdio = true; break; case 'S': // Put debugserver into a new session. Terminals group processes // into sessions and when a special terminal key sequences // (like control+c) are typed they can cause signals to go out to // all processes in a session. Using this --setsid (-S) option // will cause debugserver to run in its own sessions and be free // from such issues. // // This is useful when debugserver is spawned from a command // line application that uses debugserver to do the debugging, // yet that application doesn't want debugserver receiving the // signals sent to the session (i.e. dying when anyone hits ^C). setsid(); break; case 'D': g_disable_aslr = 1; break; case 'p': start_mode = eRNBRunLoopModePlatformMode; break; case 'u': unix_socket_name.assign(optarg); break; case 'P': named_pipe_path.assign(optarg); break; case 'e': // Pass a single specified environment variable down to the process that // gets launched remote->Context().PushEnvironment(optarg); break; case 'F': // Pass the current environment down to the process that gets launched { char **host_env = *_NSGetEnviron(); char *env_entry; size_t i; for (i = 0; (env_entry = host_env[i]) != NULL; ++i) remote->Context().PushEnvironment(env_entry); } break; case 'FDSC': // File descriptor passed to this process during fork/exec and is already // open and ready for communication. communication_fd = atoi(optarg); break; } } if (arch_name.empty()) { #if defined(__arm__) arch_name.assign("arm"); #endif } else { DNBSetArchitecture(arch_name.c_str()); } // if (arch_name.empty()) // { // fprintf(stderr, "error: no architecture was specified\n"); // exit (8); // } // Skip any options we consumed with getopt_long_only argc -= optind; argv += optind; if (!working_dir.empty()) { if (remote->Context().SetWorkingDirectory(working_dir.c_str()) == false) { RNBLogSTDERR("error: working directory doesn't exist '%s'.\n", working_dir.c_str()); exit(8); } } remote->Context().SetDetachOnError(g_detach_on_error); remote->Initialize(); // It is ok for us to set NULL as the logfile (this will disable any logging) if (log_file != NULL) { DNBLogSetLogCallback(FileLogCallback, log_file); // If our log file was set, yet we have no log flags, log everything! if (log_flags == 0) log_flags = LOG_ALL | LOG_RNB_ALL; DNBLogSetLogMask(log_flags); } else { // Enable DNB logging // if os_log() support is available, log through that. auto log_callback = OsLogger::GetLogFunction(); if (log_callback) { DNBLogSetLogCallback(log_callback, nullptr); DNBLog("debugserver will use os_log for internal logging."); } else { // Fall back to ASL support. DNBLogSetLogCallback(ASLLogCallback, NULL); DNBLog("debugserver will use ASL for internal logging."); } DNBLogSetLogMask(log_flags); } if (DNBLogEnabled()) { for (i = 0; i < argc; i++) DNBLogDebug("argv[%i] = %s", i, argv[i]); } // as long as we're dropping remotenub in as a replacement for gdbserver, // explicitly note that this is not gdbserver. RNBLogSTDOUT("%s-%s %sfor %s.\n", DEBUGSERVER_PROGRAM_NAME, DEBUGSERVER_VERSION_STR, compile_options.c_str(), RNB_ARCH); std::string host; int port = INT32_MAX; char str[PATH_MAX]; str[0] = '\0'; if (g_lockdown_opt == 0 && g_applist_opt == 0 && communication_fd == -1) { // Make sure we at least have port if (argc < 1) { show_usage_and_exit(1); } // accept 'localhost:' prefix on port number - - int items_scanned = ::sscanf(argv[0], "%[^:]:%i", str, &port); - if (items_scanned == 2) { - host = str; + std::string host_specifier = argv[0]; + auto colon_location = host_specifier.rfind(':'); + if (colon_location != std::string::npos) { + host = host_specifier.substr(0, colon_location); + std::string port_str = + host_specifier.substr(colon_location + 1, std::string::npos); + char *end_ptr; + port = strtoul(port_str.c_str(), &end_ptr, 0); + if (end_ptr < port_str.c_str() + port_str.size()) + show_usage_and_exit(2); + if (host.front() == '[' && host.back() == ']') + host = host.substr(1, host.size() - 2); DNBLogDebug("host = '%s' port = %i", host.c_str(), port); } else { // No hostname means "localhost" int items_scanned = ::sscanf(argv[0], "%i", &port); if (items_scanned == 1) { host = "127.0.0.1"; DNBLogDebug("host = '%s' port = %i", host.c_str(), port); } else if (argv[0][0] == '/') { port = INT32_MAX; strncpy(str, argv[0], sizeof(str)); } else { show_usage_and_exit(2); } } // We just used the 'host:port' or the '/path/file' arg... argc--; argv++; } // If we know we're waiting to attach, we don't need any of this other info. if (start_mode != eRNBRunLoopModeInferiorAttaching && start_mode != eRNBRunLoopModePlatformMode) { if (argc == 0 || g_lockdown_opt) { if (g_lockdown_opt != 0) { // Work around for SIGPIPE crashes due to posix_spawn issue. // We have to close STDOUT and STDERR, else the first time we // try and do any, we get SIGPIPE and die as posix_spawn is // doing bad things with our file descriptors at the moment. int null = open("/dev/null", O_RDWR); dup2(null, STDOUT_FILENO); dup2(null, STDERR_FILENO); } else if (g_applist_opt != 0) { // List all applications we are able to see std::string applist_plist; int err = ListApplications(applist_plist, false, false); if (err == 0) { fputs(applist_plist.c_str(), stdout); } else { RNBLogSTDERR("error: ListApplications returned error %i\n", err); } // Exit with appropriate error if we were asked to list the applications // with no other args were given (and we weren't trying to do this over // lockdown) return err; } DNBLogDebug("Get args from remote protocol..."); start_mode = eRNBRunLoopModeGetStartModeFromRemoteProtocol; } else { start_mode = eRNBRunLoopModeInferiorLaunching; // Fill in the argv array in the context from the rest of our args. // Skip the name of this executable and the port number for (int i = 0; i < argc; i++) { DNBLogDebug("inferior_argv[%i] = '%s'", i, argv[i]); ctx.PushArgument(argv[i]); } } } if (start_mode == eRNBRunLoopModeExit) return -1; RNBRunLoopMode mode = start_mode; char err_str[1024] = {'\0'}; while (mode != eRNBRunLoopModeExit) { switch (mode) { case eRNBRunLoopModeGetStartModeFromRemoteProtocol: #ifdef WITH_LOCKDOWN if (g_lockdown_opt) { if (!remote->Comm().IsConnected()) { if (remote->Comm().ConnectToService() != rnb_success) { RNBLogSTDERR( "Failed to get connection from a remote gdb process.\n"); mode = eRNBRunLoopModeExit; } else if (g_applist_opt != 0) { // List all applications we are able to see std::string applist_plist; if (ListApplications(applist_plist, false, false) == 0) { DNBLogDebug("Task list: %s", applist_plist.c_str()); remote->Comm().Write(applist_plist.c_str(), applist_plist.size()); // Issue a read that will never yield any data until the other // side // closes the socket so this process doesn't just exit and cause // the // socket to close prematurely on the other end and cause data // loss. std::string buf; remote->Comm().Read(buf); } remote->Comm().Disconnect(false); mode = eRNBRunLoopModeExit; break; } else { // Start watching for remote packets remote->StartReadRemoteDataThread(); } } } else #endif if (port != INT32_MAX) { if (!ConnectRemote(remote, host.c_str(), port, reverse_connect, named_pipe_path.c_str(), unix_socket_name.c_str())) mode = eRNBRunLoopModeExit; } else if (str[0] == '/') { if (remote->Comm().OpenFile(str)) mode = eRNBRunLoopModeExit; } else if (communication_fd >= 0) { // We were passed a file descriptor to use during fork/exec that is // already open // in our process, so lets just use it! if (remote->Comm().useFD(communication_fd)) mode = eRNBRunLoopModeExit; else remote->StartReadRemoteDataThread(); } if (mode != eRNBRunLoopModeExit) { RNBLogSTDOUT("Got a connection, waiting for process information for " "launching or attaching.\n"); mode = RNBRunLoopGetStartModeFromRemote(remote); } break; case eRNBRunLoopModeInferiorAttaching: if (!waitfor_pid_name.empty()) { // Set our end wait time if we are using a waitfor-duration // option that may have been specified struct timespec attach_timeout_abstime, *timeout_ptr = NULL; if (waitfor_duration != 0) { DNBTimer::OffsetTimeOfDay(&attach_timeout_abstime, waitfor_duration, 0); timeout_ptr = &attach_timeout_abstime; } nub_launch_flavor_t launch_flavor = g_launch_flavor; if (launch_flavor == eLaunchFlavorDefault) { // Our default launch method is posix spawn launch_flavor = eLaunchFlavorPosixSpawn; #if defined WITH_FBS // Check if we have an app bundle, if so launch using SpringBoard. if (waitfor_pid_name.find(".app") != std::string::npos) { launch_flavor = eLaunchFlavorFBS; } #elif defined WITH_BKS // Check if we have an app bundle, if so launch using SpringBoard. if (waitfor_pid_name.find(".app") != std::string::npos) { launch_flavor = eLaunchFlavorBKS; } #elif defined WITH_SPRINGBOARD // Check if we have an app bundle, if so launch using SpringBoard. if (waitfor_pid_name.find(".app") != std::string::npos) { launch_flavor = eLaunchFlavorSpringBoard; } #endif } ctx.SetLaunchFlavor(launch_flavor); bool ignore_existing = false; RNBLogSTDOUT("Waiting to attach to process %s...\n", waitfor_pid_name.c_str()); nub_process_t pid = DNBProcessAttachWait( waitfor_pid_name.c_str(), launch_flavor, ignore_existing, timeout_ptr, waitfor_interval, err_str, sizeof(err_str)); g_pid = pid; if (pid == INVALID_NUB_PROCESS) { ctx.LaunchStatus().SetError(-1, DNBError::Generic); if (err_str[0]) ctx.LaunchStatus().SetErrorString(err_str); RNBLogSTDERR("error: failed to attach to process named: \"%s\" %s\n", waitfor_pid_name.c_str(), err_str); mode = eRNBRunLoopModeExit; } else { ctx.SetProcessID(pid); mode = eRNBRunLoopModeInferiorExecuting; } } else if (attach_pid != INVALID_NUB_PROCESS) { RNBLogSTDOUT("Attaching to process %i...\n", attach_pid); nub_process_t attached_pid; mode = RNBRunLoopLaunchAttaching(remote, attach_pid, attached_pid); if (mode != eRNBRunLoopModeInferiorExecuting) { const char *error_str = remote->Context().LaunchStatus().AsString(); RNBLogSTDERR("error: failed to attach process %i: %s\n", attach_pid, error_str ? error_str : "unknown error."); mode = eRNBRunLoopModeExit; } } else if (!attach_pid_name.empty()) { struct timespec attach_timeout_abstime, *timeout_ptr = NULL; if (waitfor_duration != 0) { DNBTimer::OffsetTimeOfDay(&attach_timeout_abstime, waitfor_duration, 0); timeout_ptr = &attach_timeout_abstime; } RNBLogSTDOUT("Attaching to process %s...\n", attach_pid_name.c_str()); nub_process_t pid = DNBProcessAttachByName( attach_pid_name.c_str(), timeout_ptr, err_str, sizeof(err_str)); g_pid = pid; if (pid == INVALID_NUB_PROCESS) { ctx.LaunchStatus().SetError(-1, DNBError::Generic); if (err_str[0]) ctx.LaunchStatus().SetErrorString(err_str); RNBLogSTDERR("error: failed to attach to process named: \"%s\" %s\n", waitfor_pid_name.c_str(), err_str); mode = eRNBRunLoopModeExit; } else { ctx.SetProcessID(pid); mode = eRNBRunLoopModeInferiorExecuting; } } else { RNBLogSTDERR( "error: asked to attach with empty name and invalid PID.\n"); mode = eRNBRunLoopModeExit; } if (mode != eRNBRunLoopModeExit) { if (port != INT32_MAX) { if (!ConnectRemote(remote, host.c_str(), port, reverse_connect, named_pipe_path.c_str(), unix_socket_name.c_str())) mode = eRNBRunLoopModeExit; } else if (str[0] == '/') { if (remote->Comm().OpenFile(str)) mode = eRNBRunLoopModeExit; } else if (communication_fd >= 0) { // We were passed a file descriptor to use during fork/exec that is // already open // in our process, so lets just use it! if (remote->Comm().useFD(communication_fd)) mode = eRNBRunLoopModeExit; else remote->StartReadRemoteDataThread(); } if (mode != eRNBRunLoopModeExit) RNBLogSTDOUT("Waiting for debugger instructions for process %d.\n", attach_pid); } break; case eRNBRunLoopModeInferiorLaunching: { mode = RNBRunLoopLaunchInferior(remote, ctx.GetSTDINPath(), ctx.GetSTDOUTPath(), ctx.GetSTDERRPath(), no_stdio); if (mode == eRNBRunLoopModeInferiorExecuting) { if (port != INT32_MAX) { if (!ConnectRemote(remote, host.c_str(), port, reverse_connect, named_pipe_path.c_str(), unix_socket_name.c_str())) mode = eRNBRunLoopModeExit; } else if (str[0] == '/') { if (remote->Comm().OpenFile(str)) mode = eRNBRunLoopModeExit; } else if (communication_fd >= 0) { // We were passed a file descriptor to use during fork/exec that is // already open // in our process, so lets just use it! if (remote->Comm().useFD(communication_fd)) mode = eRNBRunLoopModeExit; else remote->StartReadRemoteDataThread(); } if (mode != eRNBRunLoopModeExit) { const char *proc_name = ""; if (ctx.ArgumentCount() > 0) proc_name = ctx.ArgumentAtIndex(0); RNBLogSTDOUT("Got a connection, launched process %s (pid = %d).\n", proc_name, ctx.ProcessID()); } } else { const char *error_str = remote->Context().LaunchStatus().AsString(); RNBLogSTDERR("error: failed to launch process %s: %s\n", argv_sub_zero, error_str ? error_str : "unknown error."); } } break; case eRNBRunLoopModeInferiorExecuting: mode = RNBRunLoopInferiorExecuting(remote); break; case eRNBRunLoopModePlatformMode: if (port != INT32_MAX) { if (!ConnectRemote(remote, host.c_str(), port, reverse_connect, named_pipe_path.c_str(), unix_socket_name.c_str())) mode = eRNBRunLoopModeExit; } else if (str[0] == '/') { if (remote->Comm().OpenFile(str)) mode = eRNBRunLoopModeExit; } else if (communication_fd >= 0) { // We were passed a file descriptor to use during fork/exec that is // already open // in our process, so lets just use it! if (remote->Comm().useFD(communication_fd)) mode = eRNBRunLoopModeExit; else remote->StartReadRemoteDataThread(); } if (mode != eRNBRunLoopModeExit) mode = RNBRunLoopPlatform(remote); break; default: mode = eRNBRunLoopModeExit; case eRNBRunLoopModeExit: break; } } remote->StopReadRemoteDataThread(); remote->Context().SetProcessID(INVALID_NUB_PROCESS); RNBLogSTDOUT("Exiting.\n"); return 0; } Index: vendor/lldb/dist/tools/lldb-server/Acceptor.cpp =================================================================== --- vendor/lldb/dist/tools/lldb-server/Acceptor.cpp (revision 317691) +++ vendor/lldb/dist/tools/lldb-server/Acceptor.cpp (revision 317692) @@ -1,137 +1,136 @@ //===-- Acceptor.cpp --------------------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #include "Acceptor.h" #include "llvm/ADT/StringRef.h" #include "llvm/Support/ScopedPrinter.h" #include "lldb/Host/ConnectionFileDescriptor.h" #include "lldb/Host/common/TCPSocket.h" #include "lldb/Utility/StreamString.h" #include "lldb/Utility/UriParser.h" using namespace lldb; using namespace lldb_private; using namespace lldb_private::lldb_server; using namespace llvm; namespace { struct SocketScheme { const char *m_scheme; const Socket::SocketProtocol m_protocol; }; SocketScheme socket_schemes[] = { {"tcp", Socket::ProtocolTcp}, {"udp", Socket::ProtocolUdp}, {"unix", Socket::ProtocolUnixDomain}, {"unix-abstract", Socket::ProtocolUnixAbstract}, }; bool FindProtocolByScheme(const char *scheme, Socket::SocketProtocol &protocol) { for (auto s : socket_schemes) { if (!strcmp(s.m_scheme, scheme)) { protocol = s.m_protocol; return true; } } return false; } const char *FindSchemeByProtocol(const Socket::SocketProtocol protocol) { for (auto s : socket_schemes) { if (s.m_protocol == protocol) return s.m_scheme; } return nullptr; } } Error Acceptor::Listen(int backlog) { return m_listener_socket_up->Listen(StringRef(m_name), backlog); } Error Acceptor::Accept(const bool child_processes_inherit, Connection *&conn) { Socket *conn_socket = nullptr; - auto error = m_listener_socket_up->Accept( - StringRef(m_name), child_processes_inherit, conn_socket); + auto error = m_listener_socket_up->Accept(conn_socket); if (error.Success()) conn = new ConnectionFileDescriptor(conn_socket); return error; } Socket::SocketProtocol Acceptor::GetSocketProtocol() const { return m_listener_socket_up->GetSocketProtocol(); } const char *Acceptor::GetSocketScheme() const { return FindSchemeByProtocol(GetSocketProtocol()); } std::string Acceptor::GetLocalSocketId() const { return m_local_socket_id(); } std::unique_ptr Acceptor::Create(StringRef name, const bool child_processes_inherit, Error &error) { error.Clear(); Socket::SocketProtocol socket_protocol = Socket::ProtocolUnixDomain; int port; StringRef scheme, host, path; // Try to match socket name as URL - e.g., tcp://localhost:5555 if (UriParser::Parse(name, scheme, host, port, path)) { if (!FindProtocolByScheme(scheme.str().c_str(), socket_protocol)) error.SetErrorStringWithFormat("Unknown protocol scheme \"%s\"", scheme.str().c_str()); else name = name.drop_front(scheme.size() + strlen("://")); } else { std::string host_str; std::string port_str; int32_t port = INT32_MIN; // Try to match socket name as $host:port - e.g., localhost:5555 if (Socket::DecodeHostAndPort(name, host_str, port_str, port, nullptr)) socket_protocol = Socket::ProtocolTcp; } if (error.Fail()) return std::unique_ptr(); std::unique_ptr listener_socket_up = Socket::Create(socket_protocol, child_processes_inherit, error); LocalSocketIdFunc local_socket_id; if (error.Success()) { if (listener_socket_up->GetSocketProtocol() == Socket::ProtocolTcp) { TCPSocket *tcp_socket = static_cast(listener_socket_up.get()); local_socket_id = [tcp_socket]() { auto local_port = tcp_socket->GetLocalPortNumber(); return (local_port != 0) ? llvm::to_string(local_port) : ""; }; } else { const std::string socket_name = name; local_socket_id = [socket_name]() { return socket_name; }; } return std::unique_ptr( new Acceptor(std::move(listener_socket_up), name, local_socket_id)); } return std::unique_ptr(); } Acceptor::Acceptor(std::unique_ptr &&listener_socket, StringRef name, const LocalSocketIdFunc &local_socket_id) : m_listener_socket_up(std::move(listener_socket)), m_name(name.str()), m_local_socket_id(local_socket_id) {} Index: vendor/lldb/dist/unittests/Host/SocketTest.cpp =================================================================== --- vendor/lldb/dist/unittests/Host/SocketTest.cpp (revision 317691) +++ vendor/lldb/dist/unittests/Host/SocketTest.cpp (revision 317692) @@ -1,209 +1,222 @@ //===-- SocketTest.cpp ------------------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #include #include #include #include "gtest/gtest.h" #include "lldb/Host/Config.h" #include "lldb/Host/Socket.h" #include "lldb/Host/common/TCPSocket.h" #include "lldb/Host/common/UDPSocket.h" #ifndef LLDB_DISABLE_POSIX #include "lldb/Host/posix/DomainSocket.h" #endif using namespace lldb_private; class SocketTest : public testing::Test { public: void SetUp() override { #if defined(_MSC_VER) WSADATA data; ::WSAStartup(MAKEWORD(2, 2), &data); #endif } void TearDown() override { #if defined(_MSC_VER) ::WSACleanup(); #endif } protected: static void AcceptThread(Socket *listen_socket, const char *listen_remote_address, bool child_processes_inherit, Socket **accept_socket, Error *error) { - *error = listen_socket->Accept(listen_remote_address, - child_processes_inherit, *accept_socket); + *error = listen_socket->Accept(*accept_socket); } template void CreateConnectedSockets( const char *listen_remote_address, const std::function &get_connect_addr, std::unique_ptr *a_up, std::unique_ptr *b_up) { bool child_processes_inherit = false; Error error; std::unique_ptr listen_socket_up( - new SocketType(child_processes_inherit, error)); + new SocketType(true, child_processes_inherit)); EXPECT_FALSE(error.Fail()); error = listen_socket_up->Listen(listen_remote_address, 5); EXPECT_FALSE(error.Fail()); EXPECT_TRUE(listen_socket_up->IsValid()); Error accept_error; Socket *accept_socket; std::thread accept_thread(AcceptThread, listen_socket_up.get(), listen_remote_address, child_processes_inherit, &accept_socket, &accept_error); std::string connect_remote_address = get_connect_addr(*listen_socket_up); std::unique_ptr connect_socket_up( - new SocketType(child_processes_inherit, error)); + new SocketType(true, child_processes_inherit)); EXPECT_FALSE(error.Fail()); error = connect_socket_up->Connect(connect_remote_address); EXPECT_FALSE(error.Fail()); EXPECT_TRUE(connect_socket_up->IsValid()); a_up->swap(connect_socket_up); EXPECT_TRUE(error.Success()); EXPECT_NE(nullptr, a_up->get()); EXPECT_TRUE((*a_up)->IsValid()); accept_thread.join(); b_up->reset(static_cast(accept_socket)); EXPECT_TRUE(accept_error.Success()); EXPECT_NE(nullptr, b_up->get()); EXPECT_TRUE((*b_up)->IsValid()); listen_socket_up.reset(); } }; TEST_F(SocketTest, DecodeHostAndPort) { std::string host_str; std::string port_str; int32_t port; Error error; EXPECT_TRUE(Socket::DecodeHostAndPort("localhost:1138", host_str, port_str, port, &error)); EXPECT_STREQ("localhost", host_str.c_str()); EXPECT_STREQ("1138", port_str.c_str()); EXPECT_EQ(1138, port); EXPECT_TRUE(error.Success()); EXPECT_FALSE(Socket::DecodeHostAndPort("google.com:65536", host_str, port_str, port, &error)); EXPECT_TRUE(error.Fail()); EXPECT_STREQ("invalid host:port specification: 'google.com:65536'", error.AsCString()); EXPECT_FALSE(Socket::DecodeHostAndPort("google.com:-1138", host_str, port_str, port, &error)); EXPECT_TRUE(error.Fail()); EXPECT_STREQ("invalid host:port specification: 'google.com:-1138'", error.AsCString()); EXPECT_FALSE(Socket::DecodeHostAndPort("google.com:65536", host_str, port_str, port, &error)); EXPECT_TRUE(error.Fail()); EXPECT_STREQ("invalid host:port specification: 'google.com:65536'", error.AsCString()); EXPECT_TRUE( Socket::DecodeHostAndPort("12345", host_str, port_str, port, &error)); EXPECT_STREQ("", host_str.c_str()); EXPECT_STREQ("12345", port_str.c_str()); EXPECT_EQ(12345, port); EXPECT_TRUE(error.Success()); EXPECT_TRUE( Socket::DecodeHostAndPort("*:0", host_str, port_str, port, &error)); EXPECT_STREQ("*", host_str.c_str()); EXPECT_STREQ("0", port_str.c_str()); EXPECT_EQ(0, port); EXPECT_TRUE(error.Success()); EXPECT_TRUE( Socket::DecodeHostAndPort("*:65535", host_str, port_str, port, &error)); EXPECT_STREQ("*", host_str.c_str()); EXPECT_STREQ("65535", port_str.c_str()); EXPECT_EQ(65535, port); + EXPECT_TRUE(error.Success()); + + EXPECT_TRUE( + Socket::DecodeHostAndPort("[::1]:12345", host_str, port_str, port, &error)); + EXPECT_STREQ("::1", host_str.c_str()); + EXPECT_STREQ("12345", port_str.c_str()); + EXPECT_EQ(12345, port); + EXPECT_TRUE(error.Success()); + + EXPECT_TRUE( + Socket::DecodeHostAndPort("[abcd:12fg:AF58::1]:12345", host_str, port_str, port, &error)); + EXPECT_STREQ("abcd:12fg:AF58::1", host_str.c_str()); + EXPECT_STREQ("12345", port_str.c_str()); + EXPECT_EQ(12345, port); EXPECT_TRUE(error.Success()); } #ifndef LLDB_DISABLE_POSIX TEST_F(SocketTest, DomainListenConnectAccept) { char *file_name_str = tempnam(nullptr, nullptr); EXPECT_NE(nullptr, file_name_str); const std::string file_name(file_name_str); free(file_name_str); std::unique_ptr socket_a_up; std::unique_ptr socket_b_up; CreateConnectedSockets( file_name.c_str(), [=](const DomainSocket &) { return file_name; }, &socket_a_up, &socket_b_up); } #endif TEST_F(SocketTest, TCPListen0ConnectAccept) { std::unique_ptr socket_a_up; std::unique_ptr socket_b_up; CreateConnectedSockets( "127.0.0.1:0", [=](const TCPSocket &s) { char connect_remote_address[64]; snprintf(connect_remote_address, sizeof(connect_remote_address), "localhost:%u", s.GetLocalPortNumber()); return std::string(connect_remote_address); }, &socket_a_up, &socket_b_up); } TEST_F(SocketTest, TCPGetAddress) { std::unique_ptr socket_a_up; std::unique_ptr socket_b_up; CreateConnectedSockets( "127.0.0.1:0", [=](const TCPSocket &s) { char connect_remote_address[64]; snprintf(connect_remote_address, sizeof(connect_remote_address), "localhost:%u", s.GetLocalPortNumber()); return std::string(connect_remote_address); }, &socket_a_up, &socket_b_up); EXPECT_EQ(socket_a_up->GetLocalPortNumber(), socket_b_up->GetRemotePortNumber()); EXPECT_EQ(socket_b_up->GetLocalPortNumber(), socket_a_up->GetRemotePortNumber()); EXPECT_NE(socket_a_up->GetLocalPortNumber(), socket_b_up->GetLocalPortNumber()); EXPECT_STREQ("127.0.0.1", socket_a_up->GetRemoteIPAddress().c_str()); EXPECT_STREQ("127.0.0.1", socket_b_up->GetRemoteIPAddress().c_str()); } TEST_F(SocketTest, UDPConnect) { Socket *socket; bool child_processes_inherit = false; auto error = UDPSocket::Connect("127.0.0.1:0", child_processes_inherit, socket); std::unique_ptr socket_up(socket); EXPECT_TRUE(error.Success()); EXPECT_TRUE(socket_up->IsValid()); } Index: vendor/lldb/dist/unittests/ObjectFile/ELF/CMakeLists.txt =================================================================== --- vendor/lldb/dist/unittests/ObjectFile/ELF/CMakeLists.txt (revision 317691) +++ vendor/lldb/dist/unittests/ObjectFile/ELF/CMakeLists.txt (revision 317692) @@ -1,7 +1,17 @@ add_lldb_unittest(ObjectFileELFTests TestELFHeader.cpp + TestObjectFileELF.cpp LINK_LIBS lldbPluginObjectFileELF + lldbPluginSymbolVendorELF lldbCore ) + +add_dependencies(ObjectFileELFTests yaml2obj) +add_definitions(-DYAML2OBJ="$") + +set(test_inputs + sections-resolve-consistently.yaml + ) +add_unittest_inputs(ObjectFileELFTests "${test_inputs}") Index: vendor/lldb/dist/unittests/ObjectFile/ELF/Inputs/sections-resolve-consistently.yaml =================================================================== --- vendor/lldb/dist/unittests/ObjectFile/ELF/Inputs/sections-resolve-consistently.yaml (nonexistent) +++ vendor/lldb/dist/unittests/ObjectFile/ELF/Inputs/sections-resolve-consistently.yaml (revision 317692) @@ -0,0 +1,50 @@ +--- !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: + Global: + - Name: Y + Type: STT_OBJECT + Section: .data + Value: 0x0000000000601000 + Size: 0x0000000000000004 + - Name: _start + Type: STT_FUNC + Section: .text + Value: 0x0000000000400180 + Size: 0x0000000000000014 + - Name: X + Type: STT_OBJECT + Section: .bss + Value: 0x0000000000601004 + Size: 0x0000000000000004 +... Index: vendor/lldb/dist/unittests/ObjectFile/ELF/TestObjectFileELF.cpp =================================================================== --- vendor/lldb/dist/unittests/ObjectFile/ELF/TestObjectFileELF.cpp (nonexistent) +++ vendor/lldb/dist/unittests/ObjectFile/ELF/TestObjectFileELF.cpp (revision 317692) @@ -0,0 +1,105 @@ +//===-- TestObjectFileELF.cpp -----------------------------------*- C++ -*-===// +// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "Plugins/ObjectFile/ELF/ObjectFileELF.h" +#include "lldb/Core/Module.h" +#include "lldb/Core/ModuleSpec.h" +#include "lldb/Core/Section.h" +#include "lldb/Host/HostInfo.h" +#include "llvm/Support/FileUtilities.h" +#include "llvm/Support/Path.h" +#include "llvm/Support/Program.h" +#include "llvm/Support/raw_ostream.h" +#include "gtest/gtest.h" + +#include "Plugins/SymbolVendor/ELF/SymbolVendorELF.h" + +extern const char *TestMainArgv0; + +using namespace lldb_private; +using namespace lldb; + +class ObjectFileELFTest : public testing::Test { +public: + void SetUp() override { + HostInfo::Initialize(); + ObjectFileELF::Initialize(); + SymbolVendorELF::Initialize(); + + m_inputs_folder = llvm::sys::path::parent_path(TestMainArgv0); + llvm::sys::path::append(m_inputs_folder, "Inputs"); + llvm::sys::fs::make_absolute(m_inputs_folder); + } + + void TearDown() override { + SymbolVendorELF::Terminate(); + ObjectFileELF::Terminate(); + HostInfo::Terminate(); + } + +protected: + llvm::SmallString<128> m_inputs_folder; +}; + +#define ASSERT_NO_ERROR(x) \ + if (std::error_code ASSERT_NO_ERROR_ec = x) { \ + llvm::SmallString<128> MessageStorage; \ + llvm::raw_svector_ostream Message(MessageStorage); \ + Message << #x ": did not return errc::success.\n" \ + << "error number: " << ASSERT_NO_ERROR_ec.value() << "\n" \ + << "error message: " << ASSERT_NO_ERROR_ec.message() << "\n"; \ + GTEST_FATAL_FAILURE_(MessageStorage.c_str()); \ + } else { \ + } + +TEST_F(ObjectFileELFTest, SectionsResolveConsistently) { + llvm::SmallString<128> yaml = m_inputs_folder; + llvm::sys::path::append(yaml, "sections-resolve-consistently.yaml"); + llvm::SmallString<128> obj = m_inputs_folder; + ASSERT_NO_ERROR(llvm::sys::fs::createTemporaryFile( + "sections-resolve-consistently-%%%%%%", "obj", obj)); + + llvm::FileRemover remover(obj); + const char *args[] = {YAML2OBJ, yaml.c_str(), nullptr}; + llvm::StringRef obj_ref = obj; + const llvm::StringRef *redirects[] = {nullptr, &obj_ref, nullptr}; + ASSERT_EQ(0, llvm::sys::ExecuteAndWait(YAML2OBJ, args, nullptr, redirects)); + uint64_t size; + ASSERT_NO_ERROR(llvm::sys::fs::file_size(obj, size)); + ASSERT_GT(size, 0u); + + ModuleSpec spec{FileSpec(obj, false)}; + spec.GetSymbolFileSpec().SetFile(obj, false); + auto module_sp = std::make_shared(spec); + SectionList *list = module_sp->GetSectionList(); + ASSERT_NE(nullptr, list); + + auto bss_sp = list->FindSectionByName(ConstString(".bss")); + ASSERT_NE(nullptr, bss_sp); + auto data_sp = list->FindSectionByName(ConstString(".data")); + ASSERT_NE(nullptr, data_sp); + auto text_sp = list->FindSectionByName(ConstString(".text")); + ASSERT_NE(nullptr, text_sp); + + const Symbol *X = module_sp->FindFirstSymbolWithNameAndType(ConstString("X"), + eSymbolTypeAny); + ASSERT_NE(nullptr, X); + EXPECT_EQ(bss_sp, X->GetAddress().GetSection()); + + const Symbol *Y = module_sp->FindFirstSymbolWithNameAndType(ConstString("Y"), + eSymbolTypeAny); + ASSERT_NE(nullptr, Y); + EXPECT_EQ(data_sp, Y->GetAddress().GetSection()); + + const Symbol *start = module_sp->FindFirstSymbolWithNameAndType( + ConstString("_start"), eSymbolTypeAny); + ASSERT_NE(nullptr, start); + EXPECT_EQ(text_sp, start->GetAddress().GetSection()); +} Property changes on: vendor/lldb/dist/unittests/ObjectFile/ELF/TestObjectFileELF.cpp ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: vendor/lldb/dist/unittests/Process/gdb-remote/GDBRemoteTestUtils.cpp =================================================================== --- vendor/lldb/dist/unittests/Process/gdb-remote/GDBRemoteTestUtils.cpp (revision 317691) +++ vendor/lldb/dist/unittests/Process/gdb-remote/GDBRemoteTestUtils.cpp (revision 317692) @@ -1,62 +1,61 @@ //===-- GDBRemoteTestUtils.cpp ----------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #include "GDBRemoteTestUtils.h" #include "lldb/Host/common/TCPSocket.h" #include "lldb/Host/posix/ConnectionFileDescriptorPosix.h" #include namespace lldb_private { namespace process_gdb_remote { void GDBRemoteTest::SetUpTestCase() { #if defined(_MSC_VER) WSADATA data; ::WSAStartup(MAKEWORD(2, 2), &data); #endif } void GDBRemoteTest::TearDownTestCase() { #if defined(_MSC_VER) ::WSACleanup(); #endif } void Connect(GDBRemoteCommunication &client, GDBRemoteCommunication &server) { bool child_processes_inherit = false; Error error; - TCPSocket listen_socket(child_processes_inherit, error); + TCPSocket listen_socket(true, child_processes_inherit); ASSERT_FALSE(error.Fail()); error = listen_socket.Listen("127.0.0.1:0", 5); ASSERT_FALSE(error.Fail()); Socket *accept_socket; std::future accept_error = std::async(std::launch::async, [&] { - return listen_socket.Accept("127.0.0.1:0", child_processes_inherit, - accept_socket); + return listen_socket.Accept(accept_socket); }); char connect_remote_address[64]; snprintf(connect_remote_address, sizeof(connect_remote_address), "connect://localhost:%u", listen_socket.GetLocalPortNumber()); std::unique_ptr conn_ap( new ConnectionFileDescriptor()); ASSERT_EQ(conn_ap->Connect(connect_remote_address, nullptr), lldb::eConnectionStatusSuccess); client.SetConnection(conn_ap.release()); ASSERT_TRUE(accept_error.get().Success()); server.SetConnection(new ConnectionFileDescriptor(accept_socket)); } } // namespace process_gdb_remote } // namespace lldb_private Index: vendor/lldb/dist/unittests/debugserver/RNBSocketTest.cpp =================================================================== --- vendor/lldb/dist/unittests/debugserver/RNBSocketTest.cpp (revision 317691) +++ vendor/lldb/dist/unittests/debugserver/RNBSocketTest.cpp (revision 317692) @@ -1,133 +1,158 @@ //===-- RNBSocketTest.cpp ---------------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #include "gtest/gtest.h" #include #include #include #include "RNBDefs.h" #include "RNBSocket.h" #include "lldb/Host/Socket.h" #include "lldb/Host/StringConvert.h" #include "lldb/Host/common/TCPSocket.h" using namespace lldb_private; std::string hello = "Hello, world!"; std::string goodbye = "Goodbye!"; static void ServerCallbackv4(const void *baton, in_port_t port) { auto child_pid = fork(); if (child_pid == 0) { Socket *client_socket; char addr_buffer[256]; sprintf(addr_buffer, "%s:%d", baton, port); Error err = Socket::TcpConnect(addr_buffer, false, client_socket); if (err.Fail()) abort(); char buffer[32]; size_t read_size = 32; err = client_socket->Read((void *)&buffer[0], read_size); if (err.Fail()) abort(); std::string Recv(&buffer[0], read_size); if (Recv != hello) abort(); size_t write_size = goodbye.length(); err = client_socket->Write(goodbye.c_str(), write_size); if (err.Fail()) abort(); if (write_size != goodbye.length()) abort(); delete client_socket; exit(0); } } void TestSocketListen(const char *addr) { + // Skip IPv6 tests if there isn't a valid interafce + auto addresses = lldb_private::SocketAddress::GetAddressInfo( + addr, NULL, AF_UNSPEC, SOCK_STREAM, IPPROTO_TCP); + if (addresses.size() == 0) + return; + + char addr_wrap[256]; + if (addresses.front().GetFamily() == AF_INET6) + sprintf(addr_wrap, "[%s]", addr); + else + sprintf(addr_wrap, "%s", addr); + RNBSocket server_socket; auto result = - server_socket.Listen(addr, 0, ServerCallbackv4, (const void *)addr); + server_socket.Listen(addr, 0, ServerCallbackv4, (const void *)addr_wrap); ASSERT_TRUE(result == rnb_success); result = server_socket.Write(hello.c_str(), hello.length()); ASSERT_TRUE(result == rnb_success); std::string bye; result = server_socket.Read(bye); ASSERT_TRUE(result == rnb_success); ASSERT_EQ(bye, goodbye); int exit_status; wait(&exit_status); ASSERT_EQ(exit_status, 0); } TEST(RNBSocket, LoopBackListenIPv4) { TestSocketListen("127.0.0.1"); } +TEST(RNBSocket, LoopBackListenIPv6) { TestSocketListen("::1"); } + void TestSocketConnect(const char *addr) { + // Skip IPv6 tests if there isn't a valid interafce + auto addresses = lldb_private::SocketAddress::GetAddressInfo( + addr, NULL, AF_UNSPEC, SOCK_STREAM, IPPROTO_TCP); + if (addresses.size() == 0) + return; + char addr_wrap[256]; - sprintf(addr_wrap, "%s:0", addr); + if (addresses.front().GetFamily() == AF_INET6) + sprintf(addr_wrap, "[%s]:0", addr); + else + sprintf(addr_wrap, "%s:0", addr); Socket *server_socket; Predicate port_predicate; port_predicate.SetValue(0, eBroadcastNever); Error err = Socket::TcpListen(addr_wrap, false, server_socket, &port_predicate); ASSERT_FALSE(err.Fail()); auto port = ((TCPSocket *)server_socket)->GetLocalPortNumber(); auto child_pid = fork(); if (child_pid != 0) { RNBSocket client_socket; auto result = client_socket.Connect(addr, port); ASSERT_TRUE(result == rnb_success); result = client_socket.Write(hello.c_str(), hello.length()); ASSERT_TRUE(result == rnb_success); std::string bye; result = client_socket.Read(bye); ASSERT_TRUE(result == rnb_success); ASSERT_EQ(bye, goodbye); } else { Socket *connected_socket; - err = server_socket->Accept(addr_wrap, false, connected_socket); + err = server_socket->Accept(connected_socket); if (err.Fail()) { llvm::errs() << err.AsCString(); abort(); } char buffer[32]; size_t read_size = 32; err = connected_socket->Read((void *)&buffer[0], read_size); if (err.Fail()) { llvm::errs() << err.AsCString(); abort(); } std::string Recv(&buffer[0], read_size); if (Recv != hello) { llvm::errs() << err.AsCString(); abort(); } size_t write_size = goodbye.length(); err = connected_socket->Write(goodbye.c_str(), write_size); if (err.Fail()) { llvm::errs() << err.AsCString(); abort(); } if (write_size != goodbye.length()) { llvm::errs() << err.AsCString(); abort(); } exit(0); } int exit_status; wait(&exit_status); ASSERT_EQ(exit_status, 0); } TEST(RNBSocket, LoopBackConnectIPv4) { TestSocketConnect("127.0.0.1"); } + +TEST(RNBSocket, LoopBackConnectIPv6) { TestSocketConnect("::1"); }