GP-1005: Added new agent for lldb on macOS and Linux

This commit is contained in:
d-millar
2021-09-30 09:53:12 -04:00
committed by Ryan Kurtz
parent a79d2578a9
commit 51cd51d658
469 changed files with 87645 additions and 8 deletions
@@ -0,0 +1,114 @@
/* ###
* IP: GHIDRA
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
apply from: "$rootProject.projectDir/gradle/javaProject.gradle"
apply from: "$rootProject.projectDir/gradle/jacocoProject.gradle"
apply from: "$rootProject.projectDir/gradle/javaTestProject.gradle"
apply from: "$rootProject.projectDir/gradle/nativeProject.gradle"
apply from: "$rootProject.projectDir/gradle/distributableGhidraModule.gradle"
apply plugin: 'eclipse'
eclipse.project.name = 'Debug Debugger-agent-lldb'
dependencies {
api project(':Framework-AsyncComm')
api project(':Framework-Debugging')
api project(':Debugger-gadp')
testImplementation project(path: ':Framework-AsyncComm', configuration: 'testArtifacts')
testImplementation project(path: ':Framework-Debugging', configuration: 'testArtifacts')
testImplementation project(path: ':Debugger-gadp', configuration: 'testArtifacts')
}
def boolean filterJar(File jarfile) {
if (jarfile.name.contains("gradle-api")) {
return false
} else if (jarfile.name.contains("groovy-all")) {
return false
} else if (jarfile.name.contains("gradle-installation-beacon")) {
return false
}
return true
}
jar {
manifest {
attributes['Main-Class'] = 'agent.lldb.gadp.LldbGadpServer'
}
}
task configureNodepJar {
doLast {
configurations.default.files.forEach {
if (filterJar(it)) {
nodepJar.from(zipTree(it))
}
}
}
}
task nodepJar(type: Jar) {
inputs.file(file(jar.archivePath))
dependsOn(configureNodepJar)
dependsOn(jar)
appendix = 'nodep'
manifest {
attributes['Main-Class'] = 'agent.lldb.gadp.LldbGadpServer'
}
from(zipTree(jar.archivePath))
}
// Include llvm patch and SWIG files
rootProject.assembleDistribution {
from (this.project.projectDir.toString()) {
include "src/llvm/**"
into {getZipPath(this.project) + "/data/"}
}
}
task executableJar {
ext.execsh = file("src/main/sh/execjar.sh")
ext.jarfile = file(nodepJar.archivePath)
ext.outjar = file("${buildDir}/bin/gadp-agent-lldb")
dependsOn(nodepJar)
inputs.file(execsh)
inputs.file(jarfile)
outputs.file(outjar)
doLast {
outjar.parentFile.mkdirs()
outjar.withOutputStream { output ->
execsh.withInputStream { input ->
output << input
}
jarfile.withInputStream { input ->
output << input
}
}
exec {
commandLine("chmod", "+x", outjar)
}
}
}
test {
if ("linux_x86_64".equals(getCurrentPlatformName())) {
dependsOn(":Framework-Debugging:testSpecimenLinux_x86_64")
}
if ("mac_x86_64".equals(getCurrentPlatformName())) {
dependsOn(":Framework-Debugging:testSpecimenMac_x86_64")
}
}
@@ -0,0 +1,21 @@
##VERSION: 2.0
##MODULE IP: Apache License 2.0
##MODULE IP: Apache License 2.0 with LLVM Exceptions
.classpath||NONE||reviewed||END|
.project||NONE||reviewed||END|
Module.manifest||GHIDRA||||END|
build.gradle||GHIDRA||||END|
src/llvm/lldb/CMakeLists.txt||Apache License 2.0 with LLVM Exceptions||||END|
src/llvm/lldb/bindings/CMakeLists.txt||Apache License 2.0 with LLVM Exceptions||||END|
src/llvm/lldb/bindings/java/CMakeLists.txt||Apache License 2.0 with LLVM Exceptions||||END|
src/llvm/lldb/bindings/java/java-typemaps.swig||Apache License 2.0 with LLVM Exceptions||||END|
src/llvm/lldb/bindings/java/java.swig||Apache License 2.0 with LLVM Exceptions||||END|
src/llvm/lldb/cmake/modules/FindJavaAndSwig.cmake||Apache License 2.0 with LLVM Exceptions||||END|
src/llvm/lldb/cmake/modules/LLDBConfig.cmake||Apache License 2.0 with LLVM Exceptions||||END|
src/llvm/lldb/include/lldb/Host/Config.h.cmake||Apache License 2.0 with LLVM Exceptions||||END|
src/llvm/lldb/source/API/CMakeLists.txt||Apache License 2.0 with LLVM Exceptions||||END|
src/llvm/lldb/source/API/liblldb-private.exports||Apache License 2.0 with LLVM Exceptions||||END|
src/llvm/lldb/source/API/liblldb.exports||Apache License 2.0 with LLVM Exceptions||||END|
src/llvm/lldb/source/Plugins/ScriptInterpreter/CMakeLists.txt||Apache License 2.0 with LLVM Exceptions||||END|
src/llvm/lldb/source/Plugins/ScriptInterpreter/Java/CMakeLists.txt||Apache License 2.0 with LLVM Exceptions||||END|
src/llvm/lldb/tools/debugserver/source/CMakeLists.txt||Apache License 2.0 with LLVM Exceptions||||END|
@@ -0,0 +1,109 @@
/* ###
* IP: Apache License 2.0 with LLVM Exceptions
*/
cmake_minimum_required(VERSION 3.13.4)
# Add path for custom modules.
set(CMAKE_MODULE_PATH
${CMAKE_MODULE_PATH}
"${CMAKE_CURRENT_SOURCE_DIR}/cmake"
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules"
)
# If we are not building as part of LLVM, build LLDB as a standalone project,
# using LLVM as an external library.
if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
project(lldb)
include(LLDBStandalone)
set(CMAKE_CXX_STANDARD 14 CACHE STRING "C++ standard to conform to")
set(CMAKE_CXX_STANDARD_REQUIRED YES)
set(CMAKE_CXX_EXTENSIONS NO)
endif()
include(LLDBConfig)
include(AddLLDB)
# Define the LLDB_CONFIGURATION_xxx matching the build type.
if(uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG" )
add_definitions(-DLLDB_CONFIGURATION_DEBUG)
endif()
if (WIN32)
add_definitions(-D_ENABLE_EXTENDED_ALIGNED_STORAGE)
endif()
if (LLDB_ENABLE_PYTHON)
if (NOT CMAKE_CROSSCOMPILING)
execute_process(
COMMAND ${Python3_EXECUTABLE}
-c "import distutils.sysconfig; print(distutils.sysconfig.get_python_lib(True, False, ''))"
OUTPUT_VARIABLE LLDB_PYTHON_DEFAULT_RELATIVE_PATH
OUTPUT_STRIP_TRAILING_WHITESPACE)
file(TO_CMAKE_PATH ${LLDB_PYTHON_DEFAULT_RELATIVE_PATH} LLDB_PYTHON_DEFAULT_RELATIVE_PATH)
else ()
if ("${LLDB_PYTHON_RELATIVE_PATH}" STREQUAL "")
message(FATAL_ERROR
"Crosscompiling LLDB with Python requires manually setting
LLDB_PYTHON_RELATIVE_PATH.")
endif ()
endif ()
set(LLDB_PYTHON_RELATIVE_PATH ${LLDB_PYTHON_DEFAULT_RELATIVE_PATH}
CACHE STRING "Path where Python modules are installed, relative to install prefix")
endif ()
if (LLDB_ENABLE_PYTHON OR LLDB_ENABLE_LUA OR LLDB_ENABLE_JAVA)
add_subdirectory(bindings)
endif ()
# We need the headers generated by instrinsics_gen before we can compile
# any source file in LLDB as the imported Clang modules might include
# some of these generated headers. This approach is copied from Clang's main
# CMakeLists.txt, so it should kept in sync the code in Clang which was added
# in llvm-svn 308844.
if(LLVM_ENABLE_MODULES)
list(APPEND LLVM_COMMON_DEPENDS intrinsics_gen)
endif()
if(CMAKE_CROSSCOMPILING AND LLDB_BUILT_STANDALONE)
set(LLVM_USE_HOST_TOOLS ON)
include(CrossCompile)
if (NOT NATIVE_LLVM_DIR OR NOT NATIVE_Clang_DIR)
message(FATAL_ERROR
"Crosscompiling standalone requires the variables NATIVE_{CLANG,LLVM}_DIR
for building the native lldb-tblgen used during the build process.")
endif()
llvm_create_cross_target(lldb NATIVE "" Release
-DLLVM_DIR=${NATIVE_LLVM_DIR}
-DClang_DIR=${NATIVE_Clang_DIR})
endif()
# TableGen
add_subdirectory(utils/TableGen)
add_subdirectory(source)
add_subdirectory(tools)
add_subdirectory(docs)
if (LLDB_ENABLE_PYTHON)
if(LLDB_BUILD_FRAMEWORK)
set(lldb_python_target_dir "${LLDB_FRAMEWORK_ABSOLUTE_BUILD_DIR}/LLDB.framework/Resources/Python/lldb")
else()
set(lldb_python_target_dir "${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${LLDB_PYTHON_RELATIVE_PATH}/lldb")
endif()
get_target_property(lldb_python_bindings_dir swig_wrapper_python BINARY_DIR)
finish_swig_python("lldb-python" "${lldb_python_bindings_dir}" "${lldb_python_target_dir}")
endif()
option(LLDB_INCLUDE_TESTS "Generate build targets for the LLDB unit tests." ${LLVM_INCLUDE_TESTS})
if(LLDB_INCLUDE_TESTS)
add_subdirectory(test)
add_subdirectory(unittests)
add_subdirectory(utils)
endif()
if(LLDB_BUILT_STANDALONE AND NOT LLVM_ENABLE_IDE)
llvm_distribution_add_targets()
endif()
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,48 @@
/* ###
* IP: Apache License 2.0 with LLVM Exceptions
*/
file(GLOB SWIG_INTERFACES interface/*.i)
file(GLOB_RECURSE SWIG_SOURCES *.swig)
file(GLOB SWIG_HEADERS
${LLDB_SOURCE_DIR}/include/lldb/API/*.h
${LLDB_SOURCE_DIR}/include/lldb/*.h
)
file(GLOB SWIG_PRIVATE_HEADERS
${LLDB_SOURCE_DIR}/include/lldb/lldb-private*.h
)
foreach(private_header ${SWIG_PRIVATE_HEADERS})
list(REMOVE_ITEM SWIG_HEADERS ${private_header})
endforeach()
if(LLDB_BUILD_FRAMEWORK)
set(framework_arg --framework --target-platform Darwin)
endif()
if(APPLE)
set(DARWIN_EXTRAS "-D__APPLE__")
else()
set(DARWIN_EXTRAS "")
endif()
set(SWIG_COMMON_FLAGS
-c++
-features autodoc
-I${LLDB_SOURCE_DIR}/include
-I${CMAKE_CURRENT_SOURCE_DIR}
-D__STDC_LIMIT_MACROS
-D__STDC_CONSTANT_MACROS
${DARWIN_EXTRAS}
)
if (LLDB_ENABLE_PYTHON)
add_subdirectory(python)
endif()
if (LLDB_ENABLE_LUA)
add_subdirectory(lua)
endif()
if (LLDB_ENABLE_JAVA)
add_subdirectory(java)
endif()
@@ -0,0 +1,23 @@
/* ###
* IP: Apache License 2.0 with LLVM Exceptions
*/
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/LLDBWrapJava.cpp
DEPENDS ${SWIG_SOURCES}
DEPENDS ${SWIG_INTERFACES}
DEPENDS ${SWIG_HEADERS}
COMMAND ${SWIG_EXECUTABLE}
${SWIG_COMMON_FLAGS}
-I${CMAKE_CURRENT_SOURCE_DIR}
-java
-package SWIG
-c++
-outdir ${CMAKE_CURRENT_BINARY_DIR}
-o ${CMAKE_CURRENT_BINARY_DIR}/LLDBWrapJava.cpp
${CMAKE_CURRENT_SOURCE_DIR}/java.swig
VERBATIM
COMMENT "Building LLDB Java wrapper")
add_custom_target(swig_wrapper_java ALL DEPENDS
${CMAKE_CURRENT_BINARY_DIR}/LLDBWrapJava.cpp
)
@@ -0,0 +1,21 @@
/* ###
* IP: Apache License 2.0 with LLVM Exceptions
*/
%include <typemaps.i>
%include <carrays.i>
%include <various.i>
%typemap(javabase) ByteArray "SWIGTYPE_p_void"
%typemap(javabody) ByteArray %{
private long swigCPtr; // Minor bodge to work around private variable in parent
private boolean swigCMemOwn;
public $javaclassname(long cPtr, boolean cMemoryOwn) {
super(cPtr, cMemoryOwn);
this.swigCPtr = SWIGTYPE_p_void.getCPtr(this);
swigCMemOwn = cMemoryOwn;
}
%}
%array_class(jbyte, ByteArray);
%apply char **STRING_ARRAY { char ** }
@@ -0,0 +1,25 @@
/* ###
* IP: Apache License 2.0 with LLVM Exceptions
*/
/*
lldb.swig
This is the input file for SWIG, to create the appropriate C++ wrappers and
functions for various scripting languages, to enable them to call the
liblldb Script Bridge functions.
*/
%module lldb
%include <std_string.i>
%include "java-typemaps.swig"
%include "macros.swig"
%include "headers.swig"
%{
using namespace lldb_private;
using namespace lldb;
%}
%include "interfaces.swig"
//%include "lua-wrapper.swig"
@@ -0,0 +1,32 @@
#.rst:
# FindJavaAndSwig
# --------------
#
# Find Java and SWIG as a whole.
#if(JAVA_LIBRARIES AND JAVA_INCLUDE_DIR AND SWIG_EXECUTABLE)
if(SWIG_EXECUTABLE)
set(JAVAANDSWIG_FOUND TRUE)
else()
find_package(SWIG 2.0)
if (SWIG_FOUND)
find_package(Java 11.0)
if(JAVA_FOUND AND SWIG_FOUND)
mark_as_advanced(
JAVA_LIBRARIES
JAVA_INCLUDE_DIR
SWIG_EXECUTABLE)
endif()
else()
message(STATUS "SWIG 2 or later is required for Java support in LLDB but could not be found")
endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(JavaAndSwig
FOUND_VAR
JAVAANDSWIG_FOUND
REQUIRED_VARS
JAVA_LIBRARIES
JAVA_INCLUDE_DIR
SWIG_EXECUTABLE)
endif()
@@ -0,0 +1,319 @@
include(CheckCXXSymbolExists)
include(CheckTypeSize)
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_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()
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()
macro(add_optional_dependency variable description package found)
cmake_parse_arguments(ARG
""
"VERSION"
""
${ARGN})
set(${variable} "Auto" CACHE STRING "${description} On, Off or Auto (default)")
string(TOUPPER "${${variable}}" ${variable})
if("${${variable}}" STREQUAL "AUTO")
set(find_package TRUE)
set(maybe_required)
elseif(${${variable}})
set(find_package TRUE)
set(maybe_required REQUIRED)
else()
set(find_package FALSE)
set(${variable} FALSE)
endif()
if(${find_package})
find_package(${package} ${ARG_VERSION} ${maybe_required})
set(${variable} "${${found}}")
endif()
message(STATUS "${description}: ${${variable}}")
endmacro()
add_optional_dependency(LLDB_ENABLE_LIBEDIT "Enable editline support in LLDB" LibEdit LibEdit_FOUND)
add_optional_dependency(LLDB_ENABLE_CURSES "Enable curses support in LLDB" CursesAndPanel CURSESANDPANEL_FOUND)
add_optional_dependency(LLDB_ENABLE_LZMA "Enable LZMA compression support in LLDB" LibLZMA LIBLZMA_FOUND)
add_optional_dependency(LLDB_ENABLE_LUA "Enable Lua scripting support in LLDB" LuaAndSwig LUAANDSWIG_FOUND)
add_optional_dependency(LLDB_ENABLE_JAVA "Enable Java scripting support in LLDB" JavaAndSwig JAVAANDSWIG_FOUND)
add_optional_dependency(LLDB_ENABLE_PYTHON "Enable Python scripting support in LLDB" PythonAndSwig PYTHONANDSWIG_FOUND)
add_optional_dependency(LLDB_ENABLE_LIBXML2 "Enable Libxml 2 support in LLDB" LibXml2 LIBXML2_FOUND VERSION 2.8)
option(LLDB_USE_SYSTEM_SIX "Use six.py shipped with system and do not install a copy of it" OFF)
option(LLDB_USE_ENTITLEMENTS "When codesigning, use entitlements if available" ON)
option(LLDB_BUILD_FRAMEWORK "Build LLDB.framework (Darwin only)" OFF)
option(LLDB_NO_INSTALL_DEFAULT_RPATH "Disable default RPATH settings in binaries" OFF)
option(LLDB_USE_SYSTEM_DEBUGSERVER "Use the system's debugserver for testing (Darwin only)." OFF)
option(LLDB_SKIP_STRIP "Whether to skip stripping of binaries when installing lldb." OFF)
option(LLDB_SKIP_DSYM "Whether to skip generating a dSYM when installing lldb." OFF)
if (LLDB_USE_SYSTEM_DEBUGSERVER)
# The custom target for the system debugserver has no install target, so we
# need to remove it from the LLVM_DISTRIBUTION_COMPONENTS list.
if (LLVM_DISTRIBUTION_COMPONENTS)
list(REMOVE_ITEM LLVM_DISTRIBUTION_COMPONENTS debugserver)
set(LLVM_DISTRIBUTION_COMPONENTS ${LLVM_DISTRIBUTION_COMPONENTS} CACHE STRING "" FORCE)
endif()
endif()
if(LLDB_BUILD_FRAMEWORK)
if(NOT APPLE)
message(FATAL_ERROR "LLDB.framework can only be generated when targeting Apple platforms")
endif()
set(LLDB_FRAMEWORK_VERSION A CACHE STRING "LLDB.framework version (default is A)")
set(LLDB_FRAMEWORK_BUILD_DIR bin CACHE STRING "Output directory for LLDB.framework")
set(LLDB_FRAMEWORK_INSTALL_DIR Library/Frameworks CACHE STRING "Install directory for LLDB.framework")
get_filename_component(LLDB_FRAMEWORK_ABSOLUTE_BUILD_DIR ${LLDB_FRAMEWORK_BUILD_DIR} ABSOLUTE
BASE_DIR ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR})
# Essentially, emit the framework's dSYM outside of the framework directory.
set(LLDB_DEBUGINFO_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin CACHE STRING
"Directory to emit dSYM files stripped from executables and libraries (Darwin Only)")
endif()
if(APPLE AND CMAKE_GENERATOR STREQUAL Xcode)
if(NOT LLDB_EXPLICIT_XCODE_CACHE_USED)
message(WARNING
"When building with Xcode, we recommend using the corresponding cache script. "
"If this was a mistake, clean your build directory and re-run CMake with:\n"
" -C ${CMAKE_SOURCE_DIR}/cmake/caches/Apple-lldb-Xcode.cmake\n"
"See: https://lldb.llvm.org/resources/build.html#cmakegeneratedxcodeproject\n")
endif()
endif()
if (NOT CMAKE_SYSTEM_NAME MATCHES "Windows")
set(LLDB_EXPORT_ALL_SYMBOLS 0 CACHE BOOL
"Causes lldb to export all symbols when building liblldb.")
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()
# Check if we libedit capable of handling wide characters (built with
# '--enable-widec').
if (LLDB_ENABLE_LIBEDIT)
set(CMAKE_REQUIRED_LIBRARIES ${LibEdit_LIBRARIES})
set(CMAKE_REQUIRED_INCLUDES ${LibEdit_INCLUDE_DIRS})
check_symbol_exists(el_winsertstr histedit.h LLDB_EDITLINE_USE_WCHAR)
set(CMAKE_EXTRA_INCLUDE_FILES histedit.h)
check_type_size(el_rfunc_t LLDB_EL_RFUNC_T_SIZE)
if (LLDB_EL_RFUNC_T_SIZE STREQUAL "")
set(LLDB_HAVE_EL_RFUNC_T 0)
else()
set(LLDB_HAVE_EL_RFUNC_T 1)
endif()
set(CMAKE_REQUIRED_LIBRARIES)
set(CMAKE_REQUIRED_INCLUDES)
set(CMAKE_EXTRA_INCLUDE_FILES)
endif()
if (LLDB_ENABLE_PYTHON)
if(CMAKE_SYSTEM_NAME MATCHES "Windows")
set(default_embed_python_home ON)
else()
set(default_embed_python_home OFF)
endif()
option(LLDB_EMBED_PYTHON_HOME
"Embed PYTHONHOME in the binary. If set to OFF, PYTHONHOME environment variable will be used to to locate Python."
${default_embed_python_home})
include_directories(${Python3_INCLUDE_DIRS})
if (LLDB_EMBED_PYTHON_HOME)
get_filename_component(PYTHON_HOME "${Python3_EXECUTABLE}" DIRECTORY)
set(LLDB_PYTHON_HOME "${PYTHON_HOME}" CACHE STRING
"Path to use as PYTHONHOME in lldb. If a relative path is specified, it will be resolved at runtime relative to liblldb directory.")
endif()
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)
append_if(CXX_SUPPORTS_NO_DEPRECATED_DECLARATIONS "-Wno-deprecated-declarations" CMAKE_CXX_FLAGS)
check_cxx_compiler_flag("-Wno-unknown-pragmas" CXX_SUPPORTS_NO_UNKNOWN_PRAGMAS)
append_if(CXX_SUPPORTS_NO_UNKNOWN_PRAGMAS "-Wno-unknown-pragmas" CMAKE_CXX_FLAGS)
check_cxx_compiler_flag("-Wno-strict-aliasing" CXX_SUPPORTS_NO_STRICT_ALIASING)
append_if(CXX_SUPPORTS_NO_STRICT_ALIASING "-Wno-strict-aliasing" CMAKE_CXX_FLAGS)
# Disable Clang warnings
check_cxx_compiler_flag("-Wno-deprecated-register" CXX_SUPPORTS_NO_DEPRECATED_REGISTER)
append_if(CXX_SUPPORTS_NO_DEPRECATED_REGISTER "-Wno-deprecated-register" CMAKE_CXX_FLAGS)
check_cxx_compiler_flag("-Wno-vla-extension" CXX_SUPPORTS_NO_VLA_EXTENSION)
append_if(CXX_SUPPORTS_NO_VLA_EXTENSION "-Wno-vla-extension" CMAKE_CXX_FLAGS)
# 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'
-wd4201 # Suppress 'warning C4201: nonstandard extension used: nameless struct/union'
-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()
# If LLDB_VERSION_* is specified, use it, if not use LLVM_VERSION_*.
if(NOT DEFINED LLDB_VERSION_MAJOR)
set(LLDB_VERSION_MAJOR ${LLVM_VERSION_MAJOR})
endif()
if(NOT DEFINED LLDB_VERSION_MINOR)
set(LLDB_VERSION_MINOR ${LLVM_VERSION_MINOR})
endif()
if(NOT DEFINED LLDB_VERSION_PATCH)
set(LLDB_VERSION_PATCH ${LLVM_VERSION_PATCH})
endif()
if(NOT DEFINED LLDB_VERSION_SUFFIX)
set(LLDB_VERSION_SUFFIX ${LLVM_VERSION_SUFFIX})
endif()
set(LLDB_VERSION "${LLDB_VERSION_MAJOR}.${LLDB_VERSION_MINOR}.${LLDB_VERSION_PATCH}${LLDB_VERSION_SUFFIX}")
message(STATUS "LLDB version: ${LLDB_VERSION}")
if (LLDB_ENABLE_LZMA)
include_directories(${LIBLZMA_INCLUDE_DIRS})
endif()
if (LLDB_ENABLE_LIBXML2)
include_directories(${LIBXML2_INCLUDE_DIR})
endif()
include_directories(BEFORE
${CMAKE_CURRENT_BINARY_DIR}/include
${CMAKE_CURRENT_SOURCE_DIR}/include
)
if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
install(DIRECTORY include/
COMPONENT lldb-headers
DESTINATION include
FILES_MATCHING
PATTERN "*.h"
PATTERN ".cmake" EXCLUDE
)
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include/
COMPONENT lldb-headers
DESTINATION include
FILES_MATCHING
PATTERN "*.h"
PATTERN ".cmake" EXCLUDE
)
add_custom_target(lldb-headers)
set_target_properties(lldb-headers PROPERTIES FOLDER "lldb misc")
if (NOT CMAKE_CONFIGURATION_TYPES)
add_llvm_install_targets(install-lldb-headers
COMPONENT lldb-headers)
endif()
endif()
# If LLDB is building against a prebuilt Clang, then the Clang resource
# directory that LLDB is using for its embedded Clang instance needs to point
# to the resource directory of the used Clang installation.
if (NOT TARGET clang-resource-headers)
set(LLDB_CLANG_RESOURCE_DIR_NAME "${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}")
# Iterate over the possible places where the external resource directory
# could be and pick the first that exists.
foreach(CANDIDATE "${Clang_DIR}/../.." "${LLVM_DIR}" "${LLVM_LIBRARY_DIRS}"
"${LLVM_BUILD_LIBRARY_DIR}"
"${LLVM_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}")
# Build the resource directory path by appending 'clang/<version number>'.
set(CANDIDATE_RESOURCE_DIR "${CANDIDATE}/clang/${LLDB_CLANG_RESOURCE_DIR_NAME}")
if (IS_DIRECTORY "${CANDIDATE_RESOURCE_DIR}")
set(LLDB_EXTERNAL_CLANG_RESOURCE_DIR "${CANDIDATE_RESOURCE_DIR}")
break()
endif()
endforeach()
if (NOT LLDB_EXTERNAL_CLANG_RESOURCE_DIR)
message(FATAL_ERROR "Expected directory for clang-resource headers not found: ${LLDB_EXTERNAL_CLANG_RESOURCE_DIR}")
endif()
endif()
# Find Apple-specific libraries or frameworks that may be needed.
if (APPLE)
if(NOT APPLE_EMBEDDED)
find_library(CARBON_LIBRARY Carbon)
find_library(CORE_SERVICES_LIBRARY CoreServices)
endif()
find_library(FOUNDATION_LIBRARY Foundation)
find_library(CORE_FOUNDATION_LIBRARY CoreFoundation)
find_library(SECURITY_LIBRARY Security)
include_directories(${LIBXML2_INCLUDE_DIR})
endif()
if( WIN32 AND NOT CYGWIN )
set(PURE_WINDOWS 1)
endif()
if(NOT PURE_WINDOWS)
set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
find_package(Threads REQUIRED)
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|Windows")
set(LLDB_CAN_USE_LLDB_SERVER ON)
else()
set(LLDB_CAN_USE_LLDB_SERVER OFF)
endif()
# Figure out if lldb could use debugserver. If so, then we'll
# ensure we build debugserver when we build lldb.
if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
set(LLDB_CAN_USE_DEBUGSERVER ON)
else()
set(LLDB_CAN_USE_DEBUGSERVER OFF)
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()
include(LLDBGenerateConfig)
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,26 @@
/* ###
* IP: Apache License 2.0 with LLVM Exceptions
*/
/*
* @(#)jni_md.h 1.19 05/11/17
*
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
#ifndef _JAVASOFT_JNI_MD_H_
#define _JAVASOFT_JNI_MD_H_
#define JNIEXPORT __attribute__((visibility("default")))
#define JNIIMPORT
#define JNICALL
#if defined(__LP64__) && __LP64__ /* for -Wundef */
typedef int jint;
#else
typedef long jint;
#endif
typedef long long jlong;
typedef signed char jbyte;
#endif /* !_JAVASOFT_JNI_MD_H_ */
@@ -0,0 +1,64 @@
/* ###
* IP: Apache License 2.0 with LLVM Exceptions
*/
//===-- Config.h -----------------------------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#ifndef LLDB_HOST_CONFIG_H
#define LLDB_HOST_CONFIG_H
#cmakedefine01 LLDB_EDITLINE_USE_WCHAR
#cmakedefine01 LLDB_HAVE_EL_RFUNC_T
#cmakedefine01 HAVE_SYS_TYPES_H
#cmakedefine01 HAVE_SYS_EVENT_H
#cmakedefine01 HAVE_PPOLL
#cmakedefine01 HAVE_PTSNAME_R
#cmakedefine01 HAVE_SIGACTION
#cmakedefine01 HAVE_PROCESS_VM_READV
#cmakedefine01 HAVE_NR_PROCESS_VM_READV
#ifndef HAVE_LIBCOMPRESSION
#cmakedefine HAVE_LIBCOMPRESSION
#endif
#cmakedefine01 LLDB_ENABLE_POSIX
#cmakedefine01 LLDB_ENABLE_TERMIOS
#cmakedefine01 LLDB_ENABLE_LZMA
#cmakedefine01 LLDB_ENABLE_CURSES
#cmakedefine01 CURSES_HAVE_NCURSES_CURSES_H
#cmakedefine01 LLDB_ENABLE_LIBEDIT
#cmakedefine01 LLDB_ENABLE_LIBXML2
#cmakedefine01 LLDB_ENABLE_LUA
#cmakedefine01 LLDB_ENABLE_PYTHON
#cmakedefine01 LLDB_ENABLE_JAVA
#cmakedefine01 LLDB_EMBED_PYTHON_HOME
#cmakedefine LLDB_PYTHON_HOME R"(${LLDB_PYTHON_HOME})"
#define LLDB_LIBDIR_SUFFIX "${LLVM_LIBDIR_SUFFIX}"
#endif // #ifndef LLDB_HOST_CONFIG_H
@@ -0,0 +1,247 @@
/* ###
* IP: Apache License 2.0 with LLVM Exceptions
*/
if ( CMAKE_SYSTEM_NAME MATCHES "Windows" )
add_definitions( -DEXPORT_LIBLLDB )
endif()
get_property(LLDB_ALL_PLUGINS GLOBAL PROPERTY LLDB_PLUGINS)
if(LLDB_BUILD_FRAMEWORK)
set(option_install_prefix INSTALL_PREFIX ${LLDB_FRAMEWORK_INSTALL_DIR})
set(option_framework FRAMEWORK)
endif()
if(LLDB_ENABLE_PYTHON)
get_target_property(python_bindings_dir swig_wrapper_python BINARY_DIR)
set(lldb_python_wrapper ${python_bindings_dir}/LLDBWrapPython.cpp)
endif()
if(LLDB_ENABLE_LUA)
get_target_property(lua_bindings_dir swig_wrapper_lua BINARY_DIR)
set(lldb_lua_wrapper ${lua_bindings_dir}/LLDBWrapLua.cpp)
endif()
if(LLDB_ENABLE_JAVA)
get_target_property(java_bindings_dir swig_wrapper_java BINARY_DIR)
set(lldb_java_wrapper ${java_bindings_dir}/LLDBWrapJava.cpp)
endif()
add_lldb_library(liblldb SHARED ${option_framework}
SBAddress.cpp
SBAttachInfo.cpp
SBBlock.cpp
SBBreakpoint.cpp
SBBreakpointLocation.cpp
SBBreakpointName.cpp
SBBreakpointOptionCommon.cpp
SBBroadcaster.cpp
SBCommandInterpreter.cpp
SBCommandInterpreterRunOptions.cpp
SBCommandReturnObject.cpp
SBCommunication.cpp
SBCompileUnit.cpp
SBData.cpp
SBDebugger.cpp
SBDeclaration.cpp
SBEnvironment.cpp
SBError.cpp
SBEvent.cpp
SBExecutionContext.cpp
SBExpressionOptions.cpp
SBFileSpec.cpp
SBFile.cpp
SBFileSpecList.cpp
SBFrame.cpp
SBFunction.cpp
SBHostOS.cpp
SBInstruction.cpp
SBInstructionList.cpp
SBLanguageRuntime.cpp
SBLaunchInfo.cpp
SBLineEntry.cpp
SBListener.cpp
SBMemoryRegionInfo.cpp
SBMemoryRegionInfoList.cpp
SBModule.cpp
SBModuleSpec.cpp
SBPlatform.cpp
SBProcess.cpp
SBProcessInfo.cpp
SBQueue.cpp
SBQueueItem.cpp
SBReproducer.cpp
SBSection.cpp
SBSourceManager.cpp
SBStream.cpp
SBStringList.cpp
SBStructuredData.cpp
SBSymbol.cpp
SBSymbolContext.cpp
SBSymbolContextList.cpp
SBTarget.cpp
SBThread.cpp
SBThreadCollection.cpp
SBThreadPlan.cpp
SBTrace.cpp
SBTraceOptions.cpp
SBType.cpp
SBTypeCategory.cpp
SBTypeEnumMember.cpp
SBTypeFilter.cpp
SBTypeFormat.cpp
SBTypeNameSpecifier.cpp
SBTypeSummary.cpp
SBTypeSynthetic.cpp
SBValue.cpp
SBValueList.cpp
SBVariablesOptions.cpp
SBWatchpoint.cpp
SBUnixSignals.cpp
SystemInitializerFull.cpp
${lldb_python_wrapper}
${lldb_lua_wrapper}
${lldb_java_wrapper}
LINK_LIBS
lldbBase
lldbBreakpoint
lldbCore
lldbDataFormatters
lldbExpression
lldbHost
lldbInitialization
lldbInterpreter
lldbSymbol
lldbTarget
lldbUtility
${LLDB_ALL_PLUGINS}
LINK_COMPONENTS
Support
${option_install_prefix}
)
# lib/pythonX.Y/dist-packages/lldb/_lldb.so is a symlink to lib/liblldb.so,
# which depends on lib/libLLVM*.so (BUILD_SHARED_LIBS) or lib/libLLVM-10git.so
# (LLVM_LINK_LLVM_DYLIB). Add an additional rpath $ORIGIN/../../../../lib so
# that _lldb.so can be loaded from Python.
if(LLDB_ENABLE_PYTHON AND (BUILD_SHARED_LIBS OR LLVM_LINK_LLVM_DYLIB) AND UNIX AND NOT APPLE)
set_property(TARGET liblldb APPEND PROPERTY INSTALL_RPATH "\$ORIGIN/../../../../lib${LLVM_LIBDIR_SUFFIX}")
endif()
if(Python3_RPATH)
set_property(TARGET liblldb APPEND PROPERTY INSTALL_RPATH "${Python3_RPATH}")
set_property(TARGET liblldb APPEND PROPERTY BUILD_RPATH "${Python3_RPATH}")
endif()
if(LLDB_ENABLE_PYTHON)
add_dependencies(liblldb swig_wrapper_python)
if (MSVC)
set_property(SOURCE ${lldb_python_wrapper} APPEND_STRING PROPERTY COMPILE_FLAGS " /W0")
else()
set_property(SOURCE ${lldb_python_wrapper} APPEND_STRING PROPERTY COMPILE_FLAGS " -w")
endif()
set_source_files_properties(${lldb_python_wrapper} PROPERTIES GENERATED ON)
if (CLANG_CL)
set_property(SOURCE ${lldb_python_wrapper} APPEND_STRING
PROPERTY COMPILE_FLAGS " -Wno-unused-function")
endif()
if (LLVM_COMPILER_IS_GCC_COMPATIBLE AND
NOT "${CMAKE_SYSTEM_NAME}" MATCHES "Darwin")
set_property(SOURCE ${lldb_python_wrapper} APPEND_STRING
PROPERTY COMPILE_FLAGS " -Wno-sequence-point -Wno-cast-qual")
endif ()
endif()
if(LLDB_ENABLE_LUA)
add_dependencies(liblldb swig_wrapper_lua)
target_include_directories(liblldb PRIVATE ${LUA_INCLUDE_DIR})
if (MSVC)
set_property(SOURCE ${lldb_lua_wrapper} APPEND_STRING PROPERTY COMPILE_FLAGS " /W0")
else()
set_property(SOURCE ${lldb_lua_wrapper} APPEND_STRING PROPERTY COMPILE_FLAGS " -w")
endif()
set_source_files_properties(${lldb_lua_wrapper} PROPERTIES GENERATED ON)
endif()
if(LLDB_ENABLE_JAVA)
add_dependencies(liblldb swig_wrapper_java)
target_include_directories(liblldb PRIVATE ${JAVA_INCLUDE_DIR})
target_include_directories(liblldb PRIVATE ${JAVA_INCLUDE_DIR}/darwin)
if (MSVC)
set_property(SOURCE ${lldb_java_wrapper} APPEND_STRING PROPERTY COMPILE_FLAGS " /W0")
else()
set_property(SOURCE ${lldb_java_wrapper} APPEND_STRING PROPERTY COMPILE_FLAGS " ")
endif()
set_source_files_properties(${lldb_java_wrapper} PROPERTIES GENERATED ON)
endif()
set_target_properties(liblldb
PROPERTIES
VERSION ${LLDB_VERSION}
)
if (NOT CMAKE_SYSTEM_NAME MATCHES "Windows")
if (NOT LLDB_EXPORT_ALL_SYMBOLS)
# If we're not exporting all symbols, we'll want to explicitly set
# the exported symbols here. This prevents 'log enable --stack ...'
# from working on some systems but limits the liblldb size.
MESSAGE("-- Symbols (liblldb): exporting all symbols from the lldb namespace")
add_llvm_symbol_exports(liblldb ${CMAKE_CURRENT_SOURCE_DIR}/liblldb.exports)
else()
# Don't use an explicit export. Instead, tell the linker to
# export all symbols.
MESSAGE("-- Symbols (liblldb): exporting all symbols from the lldb and lldb_private namespaces")
add_llvm_symbol_exports(liblldb ${CMAKE_CURRENT_SOURCE_DIR}/liblldb-private.exports)
endif()
set_target_properties(liblldb_exports PROPERTIES FOLDER "lldb misc")
endif()
if (MSVC)
# Only MSVC has the ABI compatibility problem and avoids using FindPythonLibs,
# so only it needs to explicitly link against ${Python3_LIBRARIES}
if (LLDB_ENABLE_PYTHON)
target_link_libraries(liblldb PRIVATE ${Python3_LIBRARIES})
endif()
else()
set_target_properties(liblldb
PROPERTIES
OUTPUT_NAME lldb
)
endif()
# The Clang expression parser in LLDB requires the Clang resource directory to function.
if (TARGET clang-resource-headers)
# If building alongside Clang, just add a dependency to ensure it is build together with liblldb.
add_dependencies(liblldb clang-resource-headers)
else()
# In a standalone build create a symlink from the LLDB library directory that points to the
# resource directory in the Clang library directory. LLDB searches relative to its install path,
# and the symlink is created in the same relative path as the resource directory of Clang when
# building alongside Clang.
# When building the LLDB framework, this isn't necessary as there we copy everything we need into
# the framework (including the Clang resourece directory).
if(NOT LLDB_BUILD_FRAMEWORK)
set(LLDB_CLANG_RESOURCE_DIR_PARENT "$<TARGET_FILE_DIR:liblldb>/clang")
file(MAKE_DIRECTORY "${LLDB_CLANG_RESOURCE_DIR_PARENT}")
add_custom_command(TARGET liblldb POST_BUILD
COMMENT "Linking Clang resource dir into LLDB build directory: ${LLDB_CLANG_RESOURCE_DIR_PARENT}"
COMMAND ${CMAKE_COMMAND} -E make_directory "${LLDB_CLANG_RESOURCE_DIR_PARENT}"
COMMAND ${CMAKE_COMMAND} -E create_symlink "${LLDB_EXTERNAL_CLANG_RESOURCE_DIR}"
"${LLDB_CLANG_RESOURCE_DIR_PARENT}/${LLDB_CLANG_RESOURCE_DIR_NAME}"
)
endif()
endif()
if(LLDB_BUILD_FRAMEWORK)
include(LLDBFramework)
endif()
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,8 @@
/* ###
* IP: Apache License 2.0 with LLVM Exceptions
*/
_ZN4lldb*
_ZNK4lldb*
_ZN12lldb_private*
_ZNK12lldb_private*
Java*
@@ -0,0 +1,8 @@
/* ###
* IP: Apache License 2.0 with LLVM Exceptions
*/
_ZN4lldb*
_ZNK4lldb*
_ZN12lldb_private*
_ZNK12lldb_private*
Java*
@@ -0,0 +1,17 @@
/* ###
* IP: Apache License 2.0 with LLVM Exceptions
*/
add_subdirectory(None)
if (LLDB_ENABLE_PYTHON)
add_subdirectory(Python)
endif()
if (LLDB_ENABLE_LUA)
add_subdirectory(Lua)
endif()
#if (LLDB_ENABLE_JAVA)
# add_subdirectory(Java)
#endif()
@@ -0,0 +1,16 @@
/* ###
* IP: Apache License 2.0 with LLVM Exceptions
*/
find_package(Lua REQUIRED)
add_lldb_library(lldbPluginScriptInterpreterJava PLUGIN
Java.cpp
ScriptInterpreterJava.cpp
LINK_LIBS
lldbCore
lldbInterpreter
)
target_include_directories(lldbPluginScriptInterpreterJava PUBLIC ${JAVA_INCLUDE_DIR})
target_link_libraries(lldbPluginScriptInterpreterJava INTERFACE ${JAVA_LIBRARIES})
@@ -0,0 +1,170 @@
/* ###
* IP: Apache License 2.0 with LLVM Exceptions
*/
//===-- Java.cpp -----------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#include "Java.h"
#include "lldb/Host/FileSystem.h"
#include "lldb/Utility/FileSpec.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/FormatVariadic.h"
using namespace lldb_private;
using namespace lldb;
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wreturn-type-c-linkage"
// Disable warning C4190: 'LLDBSwigPythonBreakpointCallbackFunction' has
// C-linkage specified, but returns UDT 'llvm::Expected<bool>' which is
// incompatible with C
#if _MSC_VER
#pragma warning (push)
#pragma warning (disable : 4190)
#endif
extern "C" llvm::Expected<bool>
LLDBSwigJavaBreakpointCallbackFunction(java_State *L,
lldb::StackFrameSP stop_frame_sp,
lldb::BreakpointLocationSP bp_loc_sp);
#if _MSC_VER
#pragma warning (pop)
#endif
#pragma clang diagnostic pop
static int lldb_print(java_State *L) {
int n = java_gettop(L);
java_getglobal(L, "io");
java_getfield(L, -1, "stdout");
java_getfield(L, -1, "write");
for (int i = 1; i <= n; i++) {
java_pushvalue(L, -1); // write()
java_pushvalue(L, -3); // io.stdout
javaL_tolstring(L, i, nullptr);
java_pushstring(L, i != n ? "\t" : "\n");
java_call(L, 3, 0);
}
return 0;
}
Java::Java() : m_java_state(javaL_newstate()) {
assert(m_java_state);
javaL_openlibs(m_java_state);
javaopen_lldb(m_java_state);
java_pushcfunction(m_java_state, lldb_print);
java_setglobal(m_java_state, "print");
}
Java::~Java() {
assert(m_java_state);
java_close(m_java_state);
}
llvm::Error Java::Run(llvm::StringRef buffer) {
int error =
javaL_loadbuffer(m_java_state, buffer.data(), buffer.size(), "buffer") ||
java_pcall(m_java_state, 0, 0, 0);
if (error == JAVA_OK)
return llvm::Error::success();
llvm::Error e = llvm::make_error<llvm::StringError>(
llvm::formatv("{0}\n", java_tostring(m_java_state, -1)),
llvm::inconvertibleErrorCode());
// Pop error message from the stack.
java_pop(m_java_state, 1);
return e;
}
llvm::Error Java::RegisterBreakpointCallback(void *baton, const char *body) {
java_pushlightuserdata(m_java_state, baton);
const char *fmt_str = "return function(frame, bp_loc, ...) {0} end";
std::string func_str = llvm::formatv(fmt_str, body).str();
if (javaL_dostring(m_java_state, func_str.c_str()) != JAVA_OK) {
llvm::Error e = llvm::make_error<llvm::StringError>(
llvm::formatv("{0}", java_tostring(m_java_state, -1)),
llvm::inconvertibleErrorCode());
// Pop error message from the stack.
java_pop(m_java_state, 2);
return e;
}
java_settable(m_java_state, JAVA_REGISTRYINDEX);
return llvm::Error::success();
}
llvm::Expected<bool>
Java::CallBreakpointCallback(void *baton, lldb::StackFrameSP stop_frame_sp,
lldb::BreakpointLocationSP bp_loc_sp) {
java_pushlightuserdata(m_java_state, baton);
java_gettable(m_java_state, JAVA_REGISTRYINDEX);
return LLDBSwigJavaBreakpointCallbackFunction(m_java_state, stop_frame_sp,
bp_loc_sp);
}
llvm::Error Java::LoadModule(llvm::StringRef filename) {
FileSpec file(filename);
if (!FileSystem::Instance().Exists(file)) {
return llvm::make_error<llvm::StringError>("invalid path",
llvm::inconvertibleErrorCode());
}
ConstString module_extension = file.GetFileNameExtension();
if (module_extension != ".java") {
return llvm::make_error<llvm::StringError>("invalid extension",
llvm::inconvertibleErrorCode());
}
int error = javaL_loadfile(m_java_state, filename.data()) ||
java_pcall(m_java_state, 0, 1, 0);
if (error != JAVA_OK) {
llvm::Error e = llvm::make_error<llvm::StringError>(
llvm::formatv("{0}\n", java_tostring(m_java_state, -1)),
llvm::inconvertibleErrorCode());
// Pop error message from the stack.
java_pop(m_java_state, 1);
return e;
}
ConstString module_name = file.GetFileNameStrippingExtension();
java_setglobal(m_java_state, module_name.GetCString());
return llvm::Error::success();
}
llvm::Error Java::ChangeIO(FILE *out, FILE *err) {
assert(out != nullptr);
assert(err != nullptr);
java_getglobal(m_java_state, "io");
java_getfield(m_java_state, -1, "stdout");
if (javaL_Stream *s = static_cast<javaL_Stream *>(
javaL_testudata(m_java_state, -1, JAVA_FILEHANDLE))) {
s->f = out;
java_pop(m_java_state, 1);
} else {
java_pop(m_java_state, 2);
return llvm::make_error<llvm::StringError>("could not get stdout",
llvm::inconvertibleErrorCode());
}
java_getfield(m_java_state, -1, "stderr");
if (javaL_Stream *s = static_cast<javaL_Stream *>(
javaL_testudata(m_java_state, -1, JAVA_FILEHANDLE))) {
s->f = out;
java_pop(m_java_state, 1);
} else {
java_pop(m_java_state, 2);
return llvm::make_error<llvm::StringError>("could not get stderr",
llvm::inconvertibleErrorCode());
}
java_pop(m_java_state, 1);
return llvm::Error::success();
}
@@ -0,0 +1,50 @@
/* ###
* IP: Apache License 2.0 with LLVM Exceptions
*/
//===-- ScriptInterpreterJava.h ----------------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#ifndef liblldb_Java_h_
#define liblldb_Java_h_
#include "lldb/API/SBBreakpointLocation.h"
#include "lldb/API/SBFrame.h"
#include "lldb/lldb-types.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/Error.h"
//#include "java.hpp"
#include <mutex>
namespace lldb_private {
extern "C" {
int javaopen_lldb(java_State *L);
}
class Java {
public:
Java();
~Java();
llvm::Error Run(llvm::StringRef buffer);
llvm::Error RegisterBreakpointCallback(void *baton, const char *body);
llvm::Expected<bool>
CallBreakpointCallback(void *baton, lldb::StackFrameSP stop_frame_sp,
lldb::BreakpointLocationSP bp_loc_sp);
llvm::Error LoadModule(llvm::StringRef filename);
llvm::Error ChangeIO(FILE *out, FILE *err);
private:
java_State *m_java_state;
};
} // namespace lldb_private
#endif // liblldb_Java_h_
@@ -0,0 +1,246 @@
/* ###
* IP: Apache License 2.0 with LLVM Exceptions
*/
//===-- ScriptInterpreterJava.cpp ------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#include "ScriptInterpreterJava.h"
#include "Java.h"
#include "lldb/Breakpoint/StoppointCallbackContext.h"
#include "lldb/Core/Debugger.h"
#include "lldb/Core/PluginManager.h"
#include "lldb/Core/StreamFile.h"
#include "lldb/Interpreter/CommandReturnObject.h"
#include "lldb/Target/ExecutionContext.h"
#include "lldb/Utility/Stream.h"
#include "lldb/Utility/StringList.h"
#include "lldb/Utility/Timer.h"
#include "llvm/Support/FormatAdapters.h"
#include <memory>
using namespace lldb;
using namespace lldb_private;
LLDB_PLUGIN_DEFINE(ScriptInterpreterJava)
class IOHandlerJavaInterpreter : public IOHandlerDelegate,
public IOHandlerEditline {
public:
IOHandlerJavaInterpreter(Debugger &debugger,
ScriptInterpreterJava &script_interpreter)
: IOHandlerEditline(debugger, IOHandler::Type::JavaInterpreter, "java",
">>> ", "..> ", true, debugger.GetUseColor(), 0,
*this, nullptr),
m_script_interpreter(script_interpreter) {
llvm::cantFail(m_script_interpreter.GetJava().ChangeIO(
debugger.GetOutputFile().GetStream(),
debugger.GetErrorFile().GetStream()));
llvm::cantFail(m_script_interpreter.EnterSession(debugger.GetID()));
}
~IOHandlerJavaInterpreter() override {
llvm::cantFail(m_script_interpreter.LeaveSession());
}
void IOHandlerInputComplete(IOHandler &io_handler,
std::string &data) override {
if (llvm::StringRef(data).rtrim() == "quit") {
io_handler.SetIsDone(true);
return;
}
if (llvm::Error error = m_script_interpreter.GetJava().Run(data)) {
*GetOutputStreamFileSP() << llvm::toString(std::move(error));
}
}
private:
ScriptInterpreterJava &m_script_interpreter;
};
ScriptInterpreterJava::ScriptInterpreterJava(Debugger &debugger)
: ScriptInterpreter(debugger, eScriptLanguageJava),
m_java(std::make_unique<Java>()) {}
ScriptInterpreterJava::~ScriptInterpreterJava() {}
bool ScriptInterpreterJava::ExecuteOneLine(llvm::StringRef command,
CommandReturnObject *result,
const ExecuteScriptOptions &options) {
if (command.empty()) {
if (result)
result->AppendError("empty command passed to java\n");
return false;
}
llvm::Expected<std::unique_ptr<ScriptInterpreterIORedirect>>
io_redirect_or_error = ScriptInterpreterIORedirect::Create(
options.GetEnableIO(), m_debugger, result);
if (!io_redirect_or_error) {
if (result)
result->AppendErrorWithFormatv(
"failed to redirect I/O: {0}\n",
llvm::fmt_consume(io_redirect_or_error.takeError()));
else
llvm::consumeError(io_redirect_or_error.takeError());
return false;
}
ScriptInterpreterIORedirect &io_redirect = **io_redirect_or_error;
if (llvm::Error e =
m_java->ChangeIO(io_redirect.GetOutputFile()->GetStream(),
io_redirect.GetErrorFile()->GetStream())) {
result->AppendErrorWithFormatv("java failed to redirect I/O: {0}\n",
llvm::toString(std::move(e)));
return false;
}
if (llvm::Error e = m_java->Run(command)) {
result->AppendErrorWithFormatv(
"java failed attempting to evaluate '{0}': {1}\n", command,
llvm::toString(std::move(e)));
return false;
}
io_redirect.Flush();
return true;
}
void ScriptInterpreterJava::ExecuteInterpreterLoop() {
static Timer::Category func_cat(LLVM_PRETTY_FUNCTION);
Timer scoped_timer(func_cat, LLVM_PRETTY_FUNCTION);
// At the moment, the only time the debugger does not have an input file
// handle is when this is called directly from java, in which case it is
// both dangerous and unnecessary (not to mention confusing) to try to embed
// a running interpreter loop inside the already running java interpreter
// loop, so we won't do it.
if (!m_debugger.GetInputFile().IsValid())
return;
IOHandlerSP io_handler_sp(new IOHandlerJavaInterpreter(m_debugger, *this));
m_debugger.RunIOHandlerAsync(io_handler_sp);
}
bool ScriptInterpreterJava::LoadScriptingModule(
const char *filename, bool init_session, lldb_private::Status &error,
StructuredData::ObjectSP *module_sp, FileSpec extra_search_dir) {
FileSystem::Instance().Collect(filename);
if (llvm::Error e = m_java->LoadModule(filename)) {
error.SetErrorStringWithFormatv("java failed to import '{0}': {1}\n",
filename, llvm::toString(std::move(e)));
return false;
}
return true;
}
void ScriptInterpreterJava::Initialize() {
static llvm::once_flag g_once_flag;
llvm::call_once(g_once_flag, []() {
PluginManager::RegisterPlugin(GetPluginNameStatic(),
GetPluginDescriptionStatic(),
lldb::eScriptLanguageJava, CreateInstance);
});
}
void ScriptInterpreterJava::Terminate() {}
llvm::Error ScriptInterpreterJava::EnterSession(user_id_t debugger_id) {
if (m_session_is_active)
return llvm::Error::success();
const char *fmt_str =
"lldb.debugger = lldb.SBDebugger.FindDebuggerWithID({0}); "
"lldb.target = lldb.debugger:GetSelectedTarget(); "
"lldb.process = lldb.target:GetProcess(); "
"lldb.thread = lldb.process:GetSelectedThread(); "
"lldb.frame = lldb.thread:GetSelectedFrame()";
return m_java->Run(llvm::formatv(fmt_str, debugger_id).str());
}
llvm::Error ScriptInterpreterJava::LeaveSession() {
if (!m_session_is_active)
return llvm::Error::success();
m_session_is_active = false;
llvm::StringRef str = "lldb.debugger = nil; "
"lldb.target = nil; "
"lldb.process = nil; "
"lldb.thread = nil; "
"lldb.frame = nil";
return m_java->Run(str);
}
bool ScriptInterpreterJava::BreakpointCallbackFunction(
void *baton, StoppointCallbackContext *context, user_id_t break_id,
user_id_t break_loc_id) {
assert(context);
ExecutionContext exe_ctx(context->exe_ctx_ref);
Target *target = exe_ctx.GetTargetPtr();
if (target == nullptr)
return true;
StackFrameSP stop_frame_sp(exe_ctx.GetFrameSP());
BreakpointSP breakpoint_sp = target->GetBreakpointByID(break_id);
BreakpointLocationSP bp_loc_sp(breakpoint_sp->FindLocationByID(break_loc_id));
Debugger &debugger = target->GetDebugger();
ScriptInterpreterJava *java_interpreter = static_cast<ScriptInterpreterJava *>(
debugger.GetScriptInterpreter(true, eScriptLanguageJava));
Java &java = java_interpreter->GetJava();
llvm::Expected<bool> BoolOrErr =
java.CallBreakpointCallback(baton, stop_frame_sp, bp_loc_sp);
if (llvm::Error E = BoolOrErr.takeError()) {
debugger.GetErrorStream() << toString(std::move(E));
return true;
}
return *BoolOrErr;
}
Status ScriptInterpreterJava::SetBreakpointCommandCallback(
BreakpointOptions *bp_options, const char *command_body_text) {
Status error;
auto data_up = std::make_unique<CommandDataJava>();
error = m_java->RegisterBreakpointCallback(data_up.get(), command_body_text);
if (error.Fail())
return error;
auto baton_sp =
std::make_shared<BreakpointOptions::CommandBaton>(std::move(data_up));
bp_options->SetCallback(ScriptInterpreterJava::BreakpointCallbackFunction,
baton_sp);
return error;
}
lldb::ScriptInterpreterSP
ScriptInterpreterJava::CreateInstance(Debugger &debugger) {
return std::make_shared<ScriptInterpreterJava>(debugger);
}
lldb_private::ConstString ScriptInterpreterJava::GetPluginNameStatic() {
static ConstString g_name("script-java");
return g_name;
}
const char *ScriptInterpreterJava::GetPluginDescriptionStatic() {
return "Java script interpreter";
}
lldb_private::ConstString ScriptInterpreterJava::GetPluginName() {
return GetPluginNameStatic();
}
uint32_t ScriptInterpreterJava::GetPluginVersion() { return 1; }
Java &ScriptInterpreterJava::GetJava() { return *m_java; }
@@ -0,0 +1,81 @@
/* ###
* IP: Apache License 2.0 with LLVM Exceptions
*/
//===-- ScriptInterpreterJava.h ----------------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#ifndef liblldb_ScriptInterpreterJava_h_
#define liblldb_ScriptInterpreterJava_h_
#include "lldb/Interpreter/ScriptInterpreter.h"
#include "lldb/Utility/Status.h"
#include "lldb/lldb-enumerations.h"
namespace lldb_private {
class Java;
class ScriptInterpreterJava : public ScriptInterpreter {
public:
class CommandDataJava : public BreakpointOptions::CommandData {
public:
CommandDataJava() : BreakpointOptions::CommandData() {
interpreter = lldb::eScriptLanguageJava;
}
};
ScriptInterpreterJava(Debugger &debugger);
~ScriptInterpreterJava() override;
bool ExecuteOneLine(
llvm::StringRef command, CommandReturnObject *result,
const ExecuteScriptOptions &options = ExecuteScriptOptions()) override;
void ExecuteInterpreterLoop() override;
bool LoadScriptingModule(const char *filename, bool init_session,
lldb_private::Status &error,
StructuredData::ObjectSP *module_sp = nullptr,
FileSpec extra_search_dir = {}) override;
// Static Functions
static void Initialize();
static void Terminate();
static lldb::ScriptInterpreterSP CreateInstance(Debugger &debugger);
static lldb_private::ConstString GetPluginNameStatic();
static const char *GetPluginDescriptionStatic();
static bool BreakpointCallbackFunction(void *baton,
StoppointCallbackContext *context,
lldb::user_id_t break_id,
lldb::user_id_t break_loc_id);
// PluginInterface protocol
lldb_private::ConstString GetPluginName() override;
uint32_t GetPluginVersion() override;
Java &GetJava();
llvm::Error EnterSession(lldb::user_id_t debugger_id);
llvm::Error LeaveSession();
Status SetBreakpointCommandCallback(BreakpointOptions *bp_options,
const char *command_body_text) override;
private:
std::unique_ptr<Java> m_java;
bool m_session_is_active = false;
};
} // namespace lldb_private
#endif // liblldb_ScriptInterpreterJava_h_
@@ -0,0 +1,348 @@
/* ###
* IP: Apache License 2.0 with LLVM Exceptions
*/
include(CheckCXXCompilerFlag)
include(CheckLibraryExists)
include_directories(${CMAKE_CURRENT_BINARY_DIR}/..)
include_directories(${LLDB_SOURCE_DIR}/source)
include_directories(MacOSX/DarwinLog)
include_directories(MacOSX)
function(check_certificate identity result_valid)
execute_process(
COMMAND security find-certificate -Z -p -c ${identity} /Library/Keychains/System.keychain
RESULT_VARIABLE exit_code OUTPUT_QUIET ERROR_QUIET)
if(exit_code)
set(${result_valid} FALSE PARENT_SCOPE)
else()
set(${result_valid} TRUE PARENT_SCOPE)
endif()
endfunction()
function(get_debugserver_codesign_identity result)
string(CONCAT not_found_help
"This will cause failures in the test suite."
"Pass '-DLLDB_USE_SYSTEM_DEBUGSERVER=ON' to use the system one instead."
"See 'Code Signing on macOS' in the documentation."
)
# Explicit override: warn if unavailable
if(LLDB_CODESIGN_IDENTITY)
set(${result} ${LLDB_CODESIGN_IDENTITY} PARENT_SCOPE)
check_certificate(${LLDB_CODESIGN_IDENTITY} available)
if(NOT available)
message(WARNING "LLDB_CODESIGN_IDENTITY not found: '${LLDB_CODESIGN_IDENTITY}' ${not_found_help}")
endif()
return()
endif()
# Development signing identity: use if available
check_certificate(gdbcert available)
if(available)
set(${result} gdbcert PARENT_SCOPE)
return()
endif()
message(WARNING "Development code sign identity not found: 'gdbcert' ${not_found_help}")
# LLVM pendant: fallback if available
if(LLVM_CODESIGNING_IDENTITY)
check_certificate(${LLVM_CODESIGNING_IDENTITY} available)
if(available)
set(${result} ${LLVM_CODESIGNING_IDENTITY} PARENT_SCOPE)
return()
endif()
endif()
# Ad-hoc signing: last resort
set(${result} "-" PARENT_SCOPE)
endfunction()
# debugserver does not depend on intrinsics_gen, or on llvm. Set the common
# llvm dependencies in the current scope to the empty set.
set(LLVM_COMMON_DEPENDS)
set(DEBUGSERVER_RESOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../resources")
set(DEBUGSERVER_INFO_PLIST "${DEBUGSERVER_RESOURCE_DIR}/lldb-debugserver-Info.plist")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++ -Wl,-sectcreate,__TEXT,__info_plist,${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 ()
# When compiling for arm, build debugserver 2 way fat with an arm64 and arm64e
# slice. You can only debug arm64e processes using an arm64e debugserver.
include(CheckCSourceCompiles)
check_c_source_compiles(
"
#include <TargetConditionals.h>
#if TARGET_CPU_ARM
#if TARGET_OS_OSX
#warning Building for macOS
#else
#error Not building for macOS
#endif
#else
#error Not building for ARM
#endif
int main() { return 0; }
"
BUILDING_FOR_ARM_OSX
)
if (BUILDING_FOR_ARM_OSX)
set(CMAKE_OSX_ARCHITECTURES "arm64;arm64e")
endif ()
check_library_exists(compression compression_encode_buffer "" HAVE_LIBCOMPRESSION)
find_library(SECURITY_LIBRARY Security)
add_subdirectory(MacOSX)
set(LLDB_CODESIGN_IDENTITY "" CACHE STRING
"Identity override for debugserver; see 'Code Signing on macOS' in the documentation (Darwin only)")
get_debugserver_codesign_identity(debugserver_codesign_identity)
# Override locally, so the identity is used for targets created in this scope.
set(LLVM_CODESIGNING_IDENTITY ${debugserver_codesign_identity})
# Use the same identity later in the test suite.
set_property(GLOBAL PROPERTY
LLDB_DEBUGSERVER_CODESIGN_IDENTITY ${debugserver_codesign_identity})
if(APPLE)
if(APPLE_EMBEDDED)
find_library(BACKBOARD_LIBRARY BackBoardServices
PATHS ${CMAKE_OSX_SYSROOT}/System/Library/PrivateFrameworks)
find_library(FRONTBOARD_LIBRARY FrontBoardServices
PATHS ${CMAKE_OSX_SYSROOT}/System/Library/PrivateFrameworks)
find_library(SPRINGBOARD_LIBRARY SpringBoardServices
PATHS ${CMAKE_OSX_SYSROOT}/System/Library/PrivateFrameworks)
find_library(MOBILESERVICES_LIBRARY MobileCoreServices
PATHS ${CMAKE_OSX_SYSROOT}/System/Library/PrivateFrameworks)
find_library(LOCKDOWN_LIBRARY lockdown)
if (APPLE_EMBEDDED STREQUAL "watchos")
find_library(CAROUSELSERVICES_LIBRARY CarouselServices
PATHS ${CMAKE_OSX_SYSROOT}/System/Library/PrivateFrameworks)
endif()
if(NOT BACKBOARD_LIBRARY)
set(SKIP_TEST_DEBUGSERVER ON CACHE BOOL "" FORCE)
endif()
endif()
endif()
if(HAVE_LIBCOMPRESSION)
set(LIBCOMPRESSION compression)
endif()
if(LLDB_USE_ENTITLEMENTS)
if(APPLE_EMBEDDED)
set(entitlements ${DEBUGSERVER_RESOURCE_DIR}/debugserver-entitlements.plist)
else()
if (LLDB_USE_PRIVATE_ENTITLEMENTS)
set(entitlements ${DEBUGSERVER_RESOURCE_DIR}/debugserver-macosx-private-entitlements.plist)
else()
set(entitlements ${DEBUGSERVER_RESOURCE_DIR}/debugserver-macosx-entitlements.plist)
endif()
endif()
endif()
add_definitions(-DLLDB_USE_OS_LOG)
if(${CMAKE_OSX_SYSROOT} MATCHES ".Internal.sdk$")
message(STATUS "LLDB debugserver energy support is enabled")
add_definitions(-DLLDB_ENERGY)
set(ENERGY_LIBRARY -lpmenergy -lpmsample)
else()
message(STATUS "LLDB debugserver energy support is disabled")
endif()
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
)
set(MIG_ARCH_FLAGS "")
if (DEFINED MIG_ARCHS)
foreach(ARCH ${MIG_ARCHS})
set(MIG_ARCH_FLAGS "${MIG_ARCH_FLAGS} -arch ${ARCH}")
endforeach()
endif()
separate_arguments(MIG_ARCH_FLAGS_SEPARTED NATIVE_COMMAND "${MIG_ARCH_FLAGS}")
add_custom_command(OUTPUT ${generated_mach_interfaces}
VERBATIM COMMAND mig ${MIG_ARCH_FLAGS_SEPARTED} -isysroot ${CMAKE_OSX_SYSROOT} ${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)
configure_file(debugserver_vers.c.in
${DEBUGSERVER_VERS_GENERATED_FILE} @ONLY)
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})
# Tell LLVM not to complain about these source files.
set(LLVM_OPTIONAL_SOURCES
${lldbDebugserverCommonSources}
debugserver.cpp)
add_lldb_library(lldbDebugserverCommon ${lldbDebugserverCommonSources})
set_target_properties(lldbDebugserverCommon PROPERTIES FOLDER "lldb libraries/debugserver")
target_link_libraries(lldbDebugserverCommon
INTERFACE ${COCOA_LIBRARY}
${CORE_FOUNDATION_LIBRARY}
${FOUNDATION_LIBRARY}
${BACKBOARD_LIBRARY}
${FRONTBOARD_LIBRARY}
${SPRINGBOARD_LIBRARY}
${MOBILESERVICES_LIBRARY}
${LOCKDOWN_LIBRARY}
${CAROUSELSERVICES_LIBRARY}
lldbDebugserverArchSupport
lldbDebugserverDarwin_DarwinLog
${FOUNDATION_LIBRARY}
${SECURITY_LIBRARY}
${LIBCOMPRESSION}
${ENERGY_LIBRARY})
if(HAVE_LIBCOMPRESSION)
set_property(TARGET lldbDebugserverCommon APPEND PROPERTY
COMPILE_DEFINITIONS HAVE_LIBCOMPRESSION)
endif()
add_lldb_tool(debugserver ADD_TO_FRAMEWORK
debugserver.cpp
LINK_LIBS lldbDebugserverCommon
ENTITLEMENTS ${entitlements}
)
# Workaround for Xcode-specific code-signing behavior:
# The XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY option causes debugserver to be copied
# into the framework first and code-signed afterwards. Sign the copy manually.
if (debugserver_codesign_identity AND LLDB_BUILD_FRAMEWORK AND
CMAKE_GENERATOR STREQUAL "Xcode")
if(NOT CMAKE_CODESIGN_ALLOCATE)
execute_process(
COMMAND xcrun -f codesign_allocate
OUTPUT_STRIP_TRAILING_WHITESPACE
OUTPUT_VARIABLE CMAKE_CODESIGN_ALLOCATE
)
endif()
if(entitlements)
set(pass_entitlements --entitlements ${entitlements})
endif()
set(copy_location ${LLDB_FRAMEWORK_ABSOLUTE_BUILD_DIR}/LLDB.framework/Versions/${LLDB_FRAMEWORK_VERSION}/Resources/debugserver)
add_custom_command(TARGET debugserver POST_BUILD
COMMAND ${CMAKE_COMMAND} -E
env CODESIGN_ALLOCATE=${CMAKE_CODESIGN_ALLOCATE}
xcrun codesign -f -s ${debugserver_codesign_identity}
${pass_entitlements} ${copy_location}
COMMENT "Code-sign debugserver copy in the build-tree framework: ${copy_location}"
)
endif()
set_target_properties(debugserver PROPERTIES FOLDER "lldb libraries/debugserver")
if(APPLE_EMBEDDED)
set_property(TARGET lldbDebugserverCommon APPEND PROPERTY COMPILE_DEFINITIONS
WITH_LOCKDOWN
WITH_FBS
WITH_BKS
)
if(CAROUSELSERVICES_LIBRARY)
set_property(TARGET lldbDebugserverCommon APPEND PROPERTY COMPILE_DEFINITIONS
WITH_CAROUSEL
)
endif()
set_property(TARGET debugserver APPEND PROPERTY COMPILE_DEFINITIONS
WITH_LOCKDOWN
WITH_FBS
WITH_BKS
)
set_property(TARGET lldbDebugserverCommon APPEND PROPERTY COMPILE_FLAGS
-F${CMAKE_OSX_SYSROOT}/System/Library/PrivateFrameworks
)
add_lldb_library(lldbDebugserverCommon_NonUI ${lldbDebugserverCommonSources})
target_link_libraries(lldbDebugserverCommon_NonUI
INTERFACE ${COCOA_LIBRARY}
${CORE_FOUNDATION_LIBRARY}
${FOUNDATION_LIBRARY}
lldbDebugserverArchSupport
lldbDebugserverDarwin_DarwinLog
${SECURITY_LIBRARY}
${LIBCOMPRESSION})
if(HAVE_LIBCOMPRESSION)
set_property(TARGET lldbDebugserverCommon_NonUI APPEND PROPERTY
COMPILE_DEFINITIONS HAVE_LIBCOMPRESSION)
endif()
add_lldb_tool(debugserver-nonui
debugserver.cpp
LINK_LIBS
lldbDebugserverCommon_NonUI
ENTITLEMENTS
${entitlements}
)
endif()
@@ -0,0 +1,62 @@
/* ###
* IP: Apache License 2.0 with LLVM Exceptions
*/
package SWIG;
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
public final class AccessType {
public final static AccessType eAccessNone = new AccessType("eAccessNone");
public final static AccessType eAccessPublic = new AccessType("eAccessPublic");
public final static AccessType eAccessPrivate = new AccessType("eAccessPrivate");
public final static AccessType eAccessProtected = new AccessType("eAccessProtected");
public final static AccessType eAccessPackage = new AccessType("eAccessPackage");
public final int swigValue() {
return swigValue;
}
public String toString() {
return swigName;
}
public static AccessType swigToEnum(int swigValue) {
if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
return swigValues[swigValue];
for (int i = 0; i < swigValues.length; i++)
if (swigValues[i].swigValue == swigValue)
return swigValues[i];
throw new IllegalArgumentException("No enum " + AccessType.class + " with value " + swigValue);
}
private AccessType(String swigName) {
this.swigName = swigName;
this.swigValue = swigNext++;
}
private AccessType(String swigName, int swigValue) {
this.swigName = swigName;
this.swigValue = swigValue;
swigNext = swigValue+1;
}
private AccessType(String swigName, AccessType swigEnum) {
this.swigName = swigName;
this.swigValue = swigEnum.swigValue;
swigNext = this.swigValue+1;
}
private static AccessType[] swigValues = { eAccessNone, eAccessPublic, eAccessPrivate, eAccessProtected, eAccessPackage };
private static int swigNext = 0;
private final int swigValue;
private final String swigName;
}
@@ -0,0 +1,90 @@
/* ###
* IP: Apache License 2.0 with LLVM Exceptions
*/
package SWIG;
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
public final class BasicType {
public final static BasicType eBasicTypeInvalid = new BasicType("eBasicTypeInvalid", lldbJNI.eBasicTypeInvalid_get());
public final static BasicType eBasicTypeVoid = new BasicType("eBasicTypeVoid", lldbJNI.eBasicTypeVoid_get());
public final static BasicType eBasicTypeChar = new BasicType("eBasicTypeChar");
public final static BasicType eBasicTypeSignedChar = new BasicType("eBasicTypeSignedChar");
public final static BasicType eBasicTypeUnsignedChar = new BasicType("eBasicTypeUnsignedChar");
public final static BasicType eBasicTypeWChar = new BasicType("eBasicTypeWChar");
public final static BasicType eBasicTypeSignedWChar = new BasicType("eBasicTypeSignedWChar");
public final static BasicType eBasicTypeUnsignedWChar = new BasicType("eBasicTypeUnsignedWChar");
public final static BasicType eBasicTypeChar16 = new BasicType("eBasicTypeChar16");
public final static BasicType eBasicTypeChar32 = new BasicType("eBasicTypeChar32");
public final static BasicType eBasicTypeShort = new BasicType("eBasicTypeShort");
public final static BasicType eBasicTypeUnsignedShort = new BasicType("eBasicTypeUnsignedShort");
public final static BasicType eBasicTypeInt = new BasicType("eBasicTypeInt");
public final static BasicType eBasicTypeUnsignedInt = new BasicType("eBasicTypeUnsignedInt");
public final static BasicType eBasicTypeLong = new BasicType("eBasicTypeLong");
public final static BasicType eBasicTypeUnsignedLong = new BasicType("eBasicTypeUnsignedLong");
public final static BasicType eBasicTypeLongLong = new BasicType("eBasicTypeLongLong");
public final static BasicType eBasicTypeUnsignedLongLong = new BasicType("eBasicTypeUnsignedLongLong");
public final static BasicType eBasicTypeInt128 = new BasicType("eBasicTypeInt128");
public final static BasicType eBasicTypeUnsignedInt128 = new BasicType("eBasicTypeUnsignedInt128");
public final static BasicType eBasicTypeBool = new BasicType("eBasicTypeBool");
public final static BasicType eBasicTypeHalf = new BasicType("eBasicTypeHalf");
public final static BasicType eBasicTypeFloat = new BasicType("eBasicTypeFloat");
public final static BasicType eBasicTypeDouble = new BasicType("eBasicTypeDouble");
public final static BasicType eBasicTypeLongDouble = new BasicType("eBasicTypeLongDouble");
public final static BasicType eBasicTypeFloatComplex = new BasicType("eBasicTypeFloatComplex");
public final static BasicType eBasicTypeDoubleComplex = new BasicType("eBasicTypeDoubleComplex");
public final static BasicType eBasicTypeLongDoubleComplex = new BasicType("eBasicTypeLongDoubleComplex");
public final static BasicType eBasicTypeObjCID = new BasicType("eBasicTypeObjCID");
public final static BasicType eBasicTypeObjCClass = new BasicType("eBasicTypeObjCClass");
public final static BasicType eBasicTypeObjCSel = new BasicType("eBasicTypeObjCSel");
public final static BasicType eBasicTypeNullPtr = new BasicType("eBasicTypeNullPtr");
public final static BasicType eBasicTypeOther = new BasicType("eBasicTypeOther");
public final int swigValue() {
return swigValue;
}
public String toString() {
return swigName;
}
public static BasicType swigToEnum(int swigValue) {
if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
return swigValues[swigValue];
for (int i = 0; i < swigValues.length; i++)
if (swigValues[i].swigValue == swigValue)
return swigValues[i];
throw new IllegalArgumentException("No enum " + BasicType.class + " with value " + swigValue);
}
private BasicType(String swigName) {
this.swigName = swigName;
this.swigValue = swigNext++;
}
private BasicType(String swigName, int swigValue) {
this.swigName = swigName;
this.swigValue = swigValue;
swigNext = swigValue+1;
}
private BasicType(String swigName, BasicType swigEnum) {
this.swigName = swigName;
this.swigValue = swigEnum.swigValue;
swigNext = this.swigValue+1;
}
private static BasicType[] swigValues = { eBasicTypeInvalid, eBasicTypeVoid, eBasicTypeChar, eBasicTypeSignedChar, eBasicTypeUnsignedChar, eBasicTypeWChar, eBasicTypeSignedWChar, eBasicTypeUnsignedWChar, eBasicTypeChar16, eBasicTypeChar32, eBasicTypeShort, eBasicTypeUnsignedShort, eBasicTypeInt, eBasicTypeUnsignedInt, eBasicTypeLong, eBasicTypeUnsignedLong, eBasicTypeLongLong, eBasicTypeUnsignedLongLong, eBasicTypeInt128, eBasicTypeUnsignedInt128, eBasicTypeBool, eBasicTypeHalf, eBasicTypeFloat, eBasicTypeDouble, eBasicTypeLongDouble, eBasicTypeFloatComplex, eBasicTypeDoubleComplex, eBasicTypeLongDoubleComplex, eBasicTypeObjCID, eBasicTypeObjCClass, eBasicTypeObjCSel, eBasicTypeNullPtr, eBasicTypeOther };
private static int swigNext = 0;
private final int swigValue;
private final String swigName;
}
@@ -0,0 +1,70 @@
/* ###
* IP: Apache License 2.0 with LLVM Exceptions
*/
package SWIG;
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
public final class BreakpointEventType {
public final static BreakpointEventType eBreakpointEventTypeInvalidType = new BreakpointEventType("eBreakpointEventTypeInvalidType", lldbJNI.eBreakpointEventTypeInvalidType_get());
public final static BreakpointEventType eBreakpointEventTypeAdded = new BreakpointEventType("eBreakpointEventTypeAdded", lldbJNI.eBreakpointEventTypeAdded_get());
public final static BreakpointEventType eBreakpointEventTypeRemoved = new BreakpointEventType("eBreakpointEventTypeRemoved", lldbJNI.eBreakpointEventTypeRemoved_get());
public final static BreakpointEventType eBreakpointEventTypeLocationsAdded = new BreakpointEventType("eBreakpointEventTypeLocationsAdded", lldbJNI.eBreakpointEventTypeLocationsAdded_get());
public final static BreakpointEventType eBreakpointEventTypeLocationsRemoved = new BreakpointEventType("eBreakpointEventTypeLocationsRemoved", lldbJNI.eBreakpointEventTypeLocationsRemoved_get());
public final static BreakpointEventType eBreakpointEventTypeLocationsResolved = new BreakpointEventType("eBreakpointEventTypeLocationsResolved", lldbJNI.eBreakpointEventTypeLocationsResolved_get());
public final static BreakpointEventType eBreakpointEventTypeEnabled = new BreakpointEventType("eBreakpointEventTypeEnabled", lldbJNI.eBreakpointEventTypeEnabled_get());
public final static BreakpointEventType eBreakpointEventTypeDisabled = new BreakpointEventType("eBreakpointEventTypeDisabled", lldbJNI.eBreakpointEventTypeDisabled_get());
public final static BreakpointEventType eBreakpointEventTypeCommandChanged = new BreakpointEventType("eBreakpointEventTypeCommandChanged", lldbJNI.eBreakpointEventTypeCommandChanged_get());
public final static BreakpointEventType eBreakpointEventTypeConditionChanged = new BreakpointEventType("eBreakpointEventTypeConditionChanged", lldbJNI.eBreakpointEventTypeConditionChanged_get());
public final static BreakpointEventType eBreakpointEventTypeIgnoreChanged = new BreakpointEventType("eBreakpointEventTypeIgnoreChanged", lldbJNI.eBreakpointEventTypeIgnoreChanged_get());
public final static BreakpointEventType eBreakpointEventTypeThreadChanged = new BreakpointEventType("eBreakpointEventTypeThreadChanged", lldbJNI.eBreakpointEventTypeThreadChanged_get());
public final static BreakpointEventType eBreakpointEventTypeAutoContinueChanged = new BreakpointEventType("eBreakpointEventTypeAutoContinueChanged", lldbJNI.eBreakpointEventTypeAutoContinueChanged_get());
public final int swigValue() {
return swigValue;
}
public String toString() {
return swigName;
}
public static BreakpointEventType swigToEnum(int swigValue) {
if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
return swigValues[swigValue];
for (int i = 0; i < swigValues.length; i++)
if (swigValues[i].swigValue == swigValue)
return swigValues[i];
throw new IllegalArgumentException("No enum " + BreakpointEventType.class + " with value " + swigValue);
}
private BreakpointEventType(String swigName) {
this.swigName = swigName;
this.swigValue = swigNext++;
}
private BreakpointEventType(String swigName, int swigValue) {
this.swigName = swigName;
this.swigValue = swigValue;
swigNext = swigValue+1;
}
private BreakpointEventType(String swigName, BreakpointEventType swigEnum) {
this.swigName = swigName;
this.swigValue = swigEnum.swigValue;
swigNext = this.swigValue+1;
}
private static BreakpointEventType[] swigValues = { eBreakpointEventTypeInvalidType, eBreakpointEventTypeAdded, eBreakpointEventTypeRemoved, eBreakpointEventTypeLocationsAdded, eBreakpointEventTypeLocationsRemoved, eBreakpointEventTypeLocationsResolved, eBreakpointEventTypeEnabled, eBreakpointEventTypeDisabled, eBreakpointEventTypeCommandChanged, eBreakpointEventTypeConditionChanged, eBreakpointEventTypeIgnoreChanged, eBreakpointEventTypeThreadChanged, eBreakpointEventTypeAutoContinueChanged };
private static int swigNext = 0;
private final int swigValue;
private final String swigName;
}
@@ -0,0 +1,62 @@
/* ###
* IP: Apache License 2.0 with LLVM Exceptions
*/
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package SWIG;
public class ByteArray extends SWIGTYPE_p_void {
private long swigCPtr; // Minor bodge to work around private variable in parent
private boolean swigCMemOwn;
public ByteArray(long cPtr, boolean cMemoryOwn) {
super(cPtr, cMemoryOwn);
this.swigCPtr = SWIGTYPE_p_void.getCPtr(this);
swigCMemOwn = cMemoryOwn;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
lldbJNI.delete_ByteArray(swigCPtr);
}
swigCPtr = 0;
}
}
public ByteArray(int nelements) {
this(lldbJNI.new_ByteArray(nelements), true);
}
public byte getitem(int index) {
return lldbJNI.ByteArray_getitem(swigCPtr, this, index);
}
public void setitem(int index, byte value) {
lldbJNI.ByteArray_setitem(swigCPtr, this, index, value);
}
/*
public SWIGTYPE_p_jbyte cast() {
long cPtr = lldbJNI.ByteArray_cast(swigCPtr, this);
return (cPtr == 0) ? null : new SWIGTYPE_p_jbyte(cPtr, false);
}
public static ByteArray frompointer(SWIGTYPE_p_jbyte t) {
long cPtr = lldbJNI.ByteArray_frompointer(SWIGTYPE_p_jbyte.getCPtr(t));
return (cPtr == 0) ? null : new ByteArray(cPtr, false);
}
*/
}
@@ -0,0 +1,61 @@
/* ###
* IP: Apache License 2.0 with LLVM Exceptions
*/
package SWIG;
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
public final class ByteOrder {
public final static ByteOrder eByteOrderInvalid = new ByteOrder("eByteOrderInvalid", lldbJNI.eByteOrderInvalid_get());
public final static ByteOrder eByteOrderBig = new ByteOrder("eByteOrderBig", lldbJNI.eByteOrderBig_get());
public final static ByteOrder eByteOrderPDP = new ByteOrder("eByteOrderPDP", lldbJNI.eByteOrderPDP_get());
public final static ByteOrder eByteOrderLittle = new ByteOrder("eByteOrderLittle", lldbJNI.eByteOrderLittle_get());
public final int swigValue() {
return swigValue;
}
public String toString() {
return swigName;
}
public static ByteOrder swigToEnum(int swigValue) {
if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
return swigValues[swigValue];
for (int i = 0; i < swigValues.length; i++)
if (swigValues[i].swigValue == swigValue)
return swigValues[i];
throw new IllegalArgumentException("No enum " + ByteOrder.class + " with value " + swigValue);
}
private ByteOrder(String swigName) {
this.swigName = swigName;
this.swigValue = swigNext++;
}
private ByteOrder(String swigName, int swigValue) {
this.swigName = swigName;
this.swigValue = swigValue;
swigNext = swigValue+1;
}
private ByteOrder(String swigName, ByteOrder swigEnum) {
this.swigName = swigName;
this.swigValue = swigEnum.swigValue;
swigNext = this.swigValue+1;
}
private static ByteOrder[] swigValues = { eByteOrderInvalid, eByteOrderBig, eByteOrderPDP, eByteOrderLittle };
private static int swigNext = 0;
private final int swigValue;
private final String swigName;
}
@@ -0,0 +1,146 @@
/* ###
* IP: Apache License 2.0 with LLVM Exceptions
*/
package SWIG;
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
public final class CommandArgumentType {
public final static CommandArgumentType eArgTypeAddress = new CommandArgumentType("eArgTypeAddress", lldbJNI.eArgTypeAddress_get());
public final static CommandArgumentType eArgTypeAddressOrExpression = new CommandArgumentType("eArgTypeAddressOrExpression");
public final static CommandArgumentType eArgTypeAliasName = new CommandArgumentType("eArgTypeAliasName");
public final static CommandArgumentType eArgTypeAliasOptions = new CommandArgumentType("eArgTypeAliasOptions");
public final static CommandArgumentType eArgTypeArchitecture = new CommandArgumentType("eArgTypeArchitecture");
public final static CommandArgumentType eArgTypeBoolean = new CommandArgumentType("eArgTypeBoolean");
public final static CommandArgumentType eArgTypeBreakpointID = new CommandArgumentType("eArgTypeBreakpointID");
public final static CommandArgumentType eArgTypeBreakpointIDRange = new CommandArgumentType("eArgTypeBreakpointIDRange");
public final static CommandArgumentType eArgTypeBreakpointName = new CommandArgumentType("eArgTypeBreakpointName");
public final static CommandArgumentType eArgTypeByteSize = new CommandArgumentType("eArgTypeByteSize");
public final static CommandArgumentType eArgTypeClassName = new CommandArgumentType("eArgTypeClassName");
public final static CommandArgumentType eArgTypeCommandName = new CommandArgumentType("eArgTypeCommandName");
public final static CommandArgumentType eArgTypeCount = new CommandArgumentType("eArgTypeCount");
public final static CommandArgumentType eArgTypeDescriptionVerbosity = new CommandArgumentType("eArgTypeDescriptionVerbosity");
public final static CommandArgumentType eArgTypeDirectoryName = new CommandArgumentType("eArgTypeDirectoryName");
public final static CommandArgumentType eArgTypeDisassemblyFlavor = new CommandArgumentType("eArgTypeDisassemblyFlavor");
public final static CommandArgumentType eArgTypeEndAddress = new CommandArgumentType("eArgTypeEndAddress");
public final static CommandArgumentType eArgTypeExpression = new CommandArgumentType("eArgTypeExpression");
public final static CommandArgumentType eArgTypeExpressionPath = new CommandArgumentType("eArgTypeExpressionPath");
public final static CommandArgumentType eArgTypeExprFormat = new CommandArgumentType("eArgTypeExprFormat");
public final static CommandArgumentType eArgTypeFileLineColumn = new CommandArgumentType("eArgTypeFileLineColumn");
public final static CommandArgumentType eArgTypeFilename = new CommandArgumentType("eArgTypeFilename");
public final static CommandArgumentType eArgTypeFormat = new CommandArgumentType("eArgTypeFormat");
public final static CommandArgumentType eArgTypeFrameIndex = new CommandArgumentType("eArgTypeFrameIndex");
public final static CommandArgumentType eArgTypeFullName = new CommandArgumentType("eArgTypeFullName");
public final static CommandArgumentType eArgTypeFunctionName = new CommandArgumentType("eArgTypeFunctionName");
public final static CommandArgumentType eArgTypeFunctionOrSymbol = new CommandArgumentType("eArgTypeFunctionOrSymbol");
public final static CommandArgumentType eArgTypeGDBFormat = new CommandArgumentType("eArgTypeGDBFormat");
public final static CommandArgumentType eArgTypeHelpText = new CommandArgumentType("eArgTypeHelpText");
public final static CommandArgumentType eArgTypeIndex = new CommandArgumentType("eArgTypeIndex");
public final static CommandArgumentType eArgTypeLanguage = new CommandArgumentType("eArgTypeLanguage");
public final static CommandArgumentType eArgTypeLineNum = new CommandArgumentType("eArgTypeLineNum");
public final static CommandArgumentType eArgTypeLogCategory = new CommandArgumentType("eArgTypeLogCategory");
public final static CommandArgumentType eArgTypeLogChannel = new CommandArgumentType("eArgTypeLogChannel");
public final static CommandArgumentType eArgTypeMethod = new CommandArgumentType("eArgTypeMethod");
public final static CommandArgumentType eArgTypeName = new CommandArgumentType("eArgTypeName");
public final static CommandArgumentType eArgTypeNewPathPrefix = new CommandArgumentType("eArgTypeNewPathPrefix");
public final static CommandArgumentType eArgTypeNumLines = new CommandArgumentType("eArgTypeNumLines");
public final static CommandArgumentType eArgTypeNumberPerLine = new CommandArgumentType("eArgTypeNumberPerLine");
public final static CommandArgumentType eArgTypeOffset = new CommandArgumentType("eArgTypeOffset");
public final static CommandArgumentType eArgTypeOldPathPrefix = new CommandArgumentType("eArgTypeOldPathPrefix");
public final static CommandArgumentType eArgTypeOneLiner = new CommandArgumentType("eArgTypeOneLiner");
public final static CommandArgumentType eArgTypePath = new CommandArgumentType("eArgTypePath");
public final static CommandArgumentType eArgTypePermissionsNumber = new CommandArgumentType("eArgTypePermissionsNumber");
public final static CommandArgumentType eArgTypePermissionsString = new CommandArgumentType("eArgTypePermissionsString");
public final static CommandArgumentType eArgTypePid = new CommandArgumentType("eArgTypePid");
public final static CommandArgumentType eArgTypePlugin = new CommandArgumentType("eArgTypePlugin");
public final static CommandArgumentType eArgTypeProcessName = new CommandArgumentType("eArgTypeProcessName");
public final static CommandArgumentType eArgTypePythonClass = new CommandArgumentType("eArgTypePythonClass");
public final static CommandArgumentType eArgTypePythonFunction = new CommandArgumentType("eArgTypePythonFunction");
public final static CommandArgumentType eArgTypePythonScript = new CommandArgumentType("eArgTypePythonScript");
public final static CommandArgumentType eArgTypeQueueName = new CommandArgumentType("eArgTypeQueueName");
public final static CommandArgumentType eArgTypeRegisterName = new CommandArgumentType("eArgTypeRegisterName");
public final static CommandArgumentType eArgTypeRegularExpression = new CommandArgumentType("eArgTypeRegularExpression");
public final static CommandArgumentType eArgTypeRunArgs = new CommandArgumentType("eArgTypeRunArgs");
public final static CommandArgumentType eArgTypeRunMode = new CommandArgumentType("eArgTypeRunMode");
public final static CommandArgumentType eArgTypeScriptedCommandSynchronicity = new CommandArgumentType("eArgTypeScriptedCommandSynchronicity");
public final static CommandArgumentType eArgTypeScriptLang = new CommandArgumentType("eArgTypeScriptLang");
public final static CommandArgumentType eArgTypeSearchWord = new CommandArgumentType("eArgTypeSearchWord");
public final static CommandArgumentType eArgTypeSelector = new CommandArgumentType("eArgTypeSelector");
public final static CommandArgumentType eArgTypeSettingIndex = new CommandArgumentType("eArgTypeSettingIndex");
public final static CommandArgumentType eArgTypeSettingKey = new CommandArgumentType("eArgTypeSettingKey");
public final static CommandArgumentType eArgTypeSettingPrefix = new CommandArgumentType("eArgTypeSettingPrefix");
public final static CommandArgumentType eArgTypeSettingVariableName = new CommandArgumentType("eArgTypeSettingVariableName");
public final static CommandArgumentType eArgTypeShlibName = new CommandArgumentType("eArgTypeShlibName");
public final static CommandArgumentType eArgTypeSourceFile = new CommandArgumentType("eArgTypeSourceFile");
public final static CommandArgumentType eArgTypeSortOrder = new CommandArgumentType("eArgTypeSortOrder");
public final static CommandArgumentType eArgTypeStartAddress = new CommandArgumentType("eArgTypeStartAddress");
public final static CommandArgumentType eArgTypeSummaryString = new CommandArgumentType("eArgTypeSummaryString");
public final static CommandArgumentType eArgTypeSymbol = new CommandArgumentType("eArgTypeSymbol");
public final static CommandArgumentType eArgTypeThreadID = new CommandArgumentType("eArgTypeThreadID");
public final static CommandArgumentType eArgTypeThreadIndex = new CommandArgumentType("eArgTypeThreadIndex");
public final static CommandArgumentType eArgTypeThreadName = new CommandArgumentType("eArgTypeThreadName");
public final static CommandArgumentType eArgTypeTypeName = new CommandArgumentType("eArgTypeTypeName");
public final static CommandArgumentType eArgTypeUnsignedInteger = new CommandArgumentType("eArgTypeUnsignedInteger");
public final static CommandArgumentType eArgTypeUnixSignal = new CommandArgumentType("eArgTypeUnixSignal");
public final static CommandArgumentType eArgTypeVarName = new CommandArgumentType("eArgTypeVarName");
public final static CommandArgumentType eArgTypeValue = new CommandArgumentType("eArgTypeValue");
public final static CommandArgumentType eArgTypeWidth = new CommandArgumentType("eArgTypeWidth");
public final static CommandArgumentType eArgTypeNone = new CommandArgumentType("eArgTypeNone");
public final static CommandArgumentType eArgTypePlatform = new CommandArgumentType("eArgTypePlatform");
public final static CommandArgumentType eArgTypeWatchpointID = new CommandArgumentType("eArgTypeWatchpointID");
public final static CommandArgumentType eArgTypeWatchpointIDRange = new CommandArgumentType("eArgTypeWatchpointIDRange");
public final static CommandArgumentType eArgTypeWatchType = new CommandArgumentType("eArgTypeWatchType");
public final static CommandArgumentType eArgRawInput = new CommandArgumentType("eArgRawInput");
public final static CommandArgumentType eArgTypeCommand = new CommandArgumentType("eArgTypeCommand");
public final static CommandArgumentType eArgTypeColumnNum = new CommandArgumentType("eArgTypeColumnNum");
public final static CommandArgumentType eArgTypeModuleUUID = new CommandArgumentType("eArgTypeModuleUUID");
public final static CommandArgumentType eArgTypeLastArg = new CommandArgumentType("eArgTypeLastArg");
public final int swigValue() {
return swigValue;
}
public String toString() {
return swigName;
}
public static CommandArgumentType swigToEnum(int swigValue) {
if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
return swigValues[swigValue];
for (int i = 0; i < swigValues.length; i++)
if (swigValues[i].swigValue == swigValue)
return swigValues[i];
throw new IllegalArgumentException("No enum " + CommandArgumentType.class + " with value " + swigValue);
}
private CommandArgumentType(String swigName) {
this.swigName = swigName;
this.swigValue = swigNext++;
}
private CommandArgumentType(String swigName, int swigValue) {
this.swigName = swigName;
this.swigValue = swigValue;
swigNext = swigValue+1;
}
private CommandArgumentType(String swigName, CommandArgumentType swigEnum) {
this.swigName = swigName;
this.swigValue = swigEnum.swigValue;
swigNext = this.swigValue+1;
}
private static CommandArgumentType[] swigValues = { eArgTypeAddress, eArgTypeAddressOrExpression, eArgTypeAliasName, eArgTypeAliasOptions, eArgTypeArchitecture, eArgTypeBoolean, eArgTypeBreakpointID, eArgTypeBreakpointIDRange, eArgTypeBreakpointName, eArgTypeByteSize, eArgTypeClassName, eArgTypeCommandName, eArgTypeCount, eArgTypeDescriptionVerbosity, eArgTypeDirectoryName, eArgTypeDisassemblyFlavor, eArgTypeEndAddress, eArgTypeExpression, eArgTypeExpressionPath, eArgTypeExprFormat, eArgTypeFileLineColumn, eArgTypeFilename, eArgTypeFormat, eArgTypeFrameIndex, eArgTypeFullName, eArgTypeFunctionName, eArgTypeFunctionOrSymbol, eArgTypeGDBFormat, eArgTypeHelpText, eArgTypeIndex, eArgTypeLanguage, eArgTypeLineNum, eArgTypeLogCategory, eArgTypeLogChannel, eArgTypeMethod, eArgTypeName, eArgTypeNewPathPrefix, eArgTypeNumLines, eArgTypeNumberPerLine, eArgTypeOffset, eArgTypeOldPathPrefix, eArgTypeOneLiner, eArgTypePath, eArgTypePermissionsNumber, eArgTypePermissionsString, eArgTypePid, eArgTypePlugin, eArgTypeProcessName, eArgTypePythonClass, eArgTypePythonFunction, eArgTypePythonScript, eArgTypeQueueName, eArgTypeRegisterName, eArgTypeRegularExpression, eArgTypeRunArgs, eArgTypeRunMode, eArgTypeScriptedCommandSynchronicity, eArgTypeScriptLang, eArgTypeSearchWord, eArgTypeSelector, eArgTypeSettingIndex, eArgTypeSettingKey, eArgTypeSettingPrefix, eArgTypeSettingVariableName, eArgTypeShlibName, eArgTypeSourceFile, eArgTypeSortOrder, eArgTypeStartAddress, eArgTypeSummaryString, eArgTypeSymbol, eArgTypeThreadID, eArgTypeThreadIndex, eArgTypeThreadName, eArgTypeTypeName, eArgTypeUnsignedInteger, eArgTypeUnixSignal, eArgTypeVarName, eArgTypeValue, eArgTypeWidth, eArgTypeNone, eArgTypePlatform, eArgTypeWatchpointID, eArgTypeWatchpointIDRange, eArgTypeWatchType, eArgRawInput, eArgTypeCommand, eArgTypeColumnNum, eArgTypeModuleUUID, eArgTypeLastArg };
private static int swigNext = 0;
private final int swigValue;
private final String swigName;
}
@@ -0,0 +1,66 @@
/* ###
* IP: Apache License 2.0 with LLVM Exceptions
*/
package SWIG;
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
public final class CommandFlags {
public final static CommandFlags eCommandRequiresTarget = new CommandFlags("eCommandRequiresTarget", lldbJNI.eCommandRequiresTarget_get());
public final static CommandFlags eCommandRequiresProcess = new CommandFlags("eCommandRequiresProcess", lldbJNI.eCommandRequiresProcess_get());
public final static CommandFlags eCommandRequiresThread = new CommandFlags("eCommandRequiresThread", lldbJNI.eCommandRequiresThread_get());
public final static CommandFlags eCommandRequiresFrame = new CommandFlags("eCommandRequiresFrame", lldbJNI.eCommandRequiresFrame_get());
public final static CommandFlags eCommandRequiresRegContext = new CommandFlags("eCommandRequiresRegContext", lldbJNI.eCommandRequiresRegContext_get());
public final static CommandFlags eCommandTryTargetAPILock = new CommandFlags("eCommandTryTargetAPILock", lldbJNI.eCommandTryTargetAPILock_get());
public final static CommandFlags eCommandProcessMustBeLaunched = new CommandFlags("eCommandProcessMustBeLaunched", lldbJNI.eCommandProcessMustBeLaunched_get());
public final static CommandFlags eCommandProcessMustBePaused = new CommandFlags("eCommandProcessMustBePaused", lldbJNI.eCommandProcessMustBePaused_get());
public final static CommandFlags eCommandProcessMustBeTraced = new CommandFlags("eCommandProcessMustBeTraced", lldbJNI.eCommandProcessMustBeTraced_get());
public final int swigValue() {
return swigValue;
}
public String toString() {
return swigName;
}
public static CommandFlags swigToEnum(int swigValue) {
if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
return swigValues[swigValue];
for (int i = 0; i < swigValues.length; i++)
if (swigValues[i].swigValue == swigValue)
return swigValues[i];
throw new IllegalArgumentException("No enum " + CommandFlags.class + " with value " + swigValue);
}
private CommandFlags(String swigName) {
this.swigName = swigName;
this.swigValue = swigNext++;
}
private CommandFlags(String swigName, int swigValue) {
this.swigName = swigName;
this.swigValue = swigValue;
swigNext = swigValue+1;
}
private CommandFlags(String swigName, CommandFlags swigEnum) {
this.swigName = swigName;
this.swigValue = swigEnum.swigValue;
swigNext = this.swigValue+1;
}
private static CommandFlags[] swigValues = { eCommandRequiresTarget, eCommandRequiresProcess, eCommandRequiresThread, eCommandRequiresFrame, eCommandRequiresRegContext, eCommandTryTargetAPILock, eCommandProcessMustBeLaunched, eCommandProcessMustBePaused, eCommandProcessMustBeTraced };
private static int swigNext = 0;
private final int swigValue;
private final String swigName;
}
@@ -0,0 +1,61 @@
/* ###
* IP: Apache License 2.0 with LLVM Exceptions
*/
package SWIG;
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
public final class CommandInterpreterResult {
public final static CommandInterpreterResult eCommandInterpreterResultSuccess = new CommandInterpreterResult("eCommandInterpreterResultSuccess");
public final static CommandInterpreterResult eCommandInterpreterResultInferiorCrash = new CommandInterpreterResult("eCommandInterpreterResultInferiorCrash");
public final static CommandInterpreterResult eCommandInterpreterResultCommandError = new CommandInterpreterResult("eCommandInterpreterResultCommandError");
public final static CommandInterpreterResult eCommandInterpreterResultQuitRequested = new CommandInterpreterResult("eCommandInterpreterResultQuitRequested");
public final int swigValue() {
return swigValue;
}
public String toString() {
return swigName;
}
public static CommandInterpreterResult swigToEnum(int swigValue) {
if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
return swigValues[swigValue];
for (int i = 0; i < swigValues.length; i++)
if (swigValues[i].swigValue == swigValue)
return swigValues[i];
throw new IllegalArgumentException("No enum " + CommandInterpreterResult.class + " with value " + swigValue);
}
private CommandInterpreterResult(String swigName) {
this.swigName = swigName;
this.swigValue = swigNext++;
}
private CommandInterpreterResult(String swigName, int swigValue) {
this.swigName = swigName;
this.swigValue = swigValue;
swigNext = swigValue+1;
}
private CommandInterpreterResult(String swigName, CommandInterpreterResult swigEnum) {
this.swigName = swigName;
this.swigValue = swigEnum.swigValue;
swigNext = this.swigValue+1;
}
private static CommandInterpreterResult[] swigValues = { eCommandInterpreterResultSuccess, eCommandInterpreterResultInferiorCrash, eCommandInterpreterResultCommandError, eCommandInterpreterResultQuitRequested };
private static int swigNext = 0;
private final int swigValue;
private final String swigName;
}
@@ -0,0 +1,64 @@
/* ###
* IP: Apache License 2.0 with LLVM Exceptions
*/
package SWIG;
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
public final class ConnectionStatus {
public final static ConnectionStatus eConnectionStatusSuccess = new ConnectionStatus("eConnectionStatusSuccess");
public final static ConnectionStatus eConnectionStatusEndOfFile = new ConnectionStatus("eConnectionStatusEndOfFile");
public final static ConnectionStatus eConnectionStatusError = new ConnectionStatus("eConnectionStatusError");
public final static ConnectionStatus eConnectionStatusTimedOut = new ConnectionStatus("eConnectionStatusTimedOut");
public final static ConnectionStatus eConnectionStatusNoConnection = new ConnectionStatus("eConnectionStatusNoConnection");
public final static ConnectionStatus eConnectionStatusLostConnection = new ConnectionStatus("eConnectionStatusLostConnection");
public final static ConnectionStatus eConnectionStatusInterrupted = new ConnectionStatus("eConnectionStatusInterrupted");
public final int swigValue() {
return swigValue;
}
public String toString() {
return swigName;
}
public static ConnectionStatus swigToEnum(int swigValue) {
if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
return swigValues[swigValue];
for (int i = 0; i < swigValues.length; i++)
if (swigValues[i].swigValue == swigValue)
return swigValues[i];
throw new IllegalArgumentException("No enum " + ConnectionStatus.class + " with value " + swigValue);
}
private ConnectionStatus(String swigName) {
this.swigName = swigName;
this.swigValue = swigNext++;
}
private ConnectionStatus(String swigName, int swigValue) {
this.swigName = swigName;
this.swigValue = swigValue;
swigNext = swigValue+1;
}
private ConnectionStatus(String swigName, ConnectionStatus swigEnum) {
this.swigName = swigName;
this.swigValue = swigEnum.swigValue;
swigNext = this.swigValue+1;
}
private static ConnectionStatus[] swigValues = { eConnectionStatusSuccess, eConnectionStatusEndOfFile, eConnectionStatusError, eConnectionStatusTimedOut, eConnectionStatusNoConnection, eConnectionStatusLostConnection, eConnectionStatusInterrupted };
private static int swigNext = 0;
private final int swigValue;
private final String swigName;
}
@@ -0,0 +1,62 @@
/* ###
* IP: Apache License 2.0 with LLVM Exceptions
*/
package SWIG;
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
public final class DescriptionLevel {
public final static DescriptionLevel eDescriptionLevelBrief = new DescriptionLevel("eDescriptionLevelBrief", lldbJNI.eDescriptionLevelBrief_get());
public final static DescriptionLevel eDescriptionLevelFull = new DescriptionLevel("eDescriptionLevelFull");
public final static DescriptionLevel eDescriptionLevelVerbose = new DescriptionLevel("eDescriptionLevelVerbose");
public final static DescriptionLevel eDescriptionLevelInitial = new DescriptionLevel("eDescriptionLevelInitial");
public final static DescriptionLevel kNumDescriptionLevels = new DescriptionLevel("kNumDescriptionLevels");
public final int swigValue() {
return swigValue;
}
public String toString() {
return swigName;
}
public static DescriptionLevel swigToEnum(int swigValue) {
if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
return swigValues[swigValue];
for (int i = 0; i < swigValues.length; i++)
if (swigValues[i].swigValue == swigValue)
return swigValues[i];
throw new IllegalArgumentException("No enum " + DescriptionLevel.class + " with value " + swigValue);
}
private DescriptionLevel(String swigName) {
this.swigName = swigName;
this.swigValue = swigNext++;
}
private DescriptionLevel(String swigName, int swigValue) {
this.swigName = swigName;
this.swigValue = swigValue;
swigNext = swigValue+1;
}
private DescriptionLevel(String swigName, DescriptionLevel swigEnum) {
this.swigName = swigName;
this.swigValue = swigEnum.swigValue;
swigNext = this.swigValue+1;
}
private static DescriptionLevel[] swigValues = { eDescriptionLevelBrief, eDescriptionLevelFull, eDescriptionLevelVerbose, eDescriptionLevelInitial, kNumDescriptionLevels };
private static int swigNext = 0;
private final int swigValue;
private final String swigName;
}
@@ -0,0 +1,60 @@
/* ###
* IP: Apache License 2.0 with LLVM Exceptions
*/
package SWIG;
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
public final class DynamicValueType {
public final static DynamicValueType eNoDynamicValues = new DynamicValueType("eNoDynamicValues", lldbJNI.eNoDynamicValues_get());
public final static DynamicValueType eDynamicCanRunTarget = new DynamicValueType("eDynamicCanRunTarget", lldbJNI.eDynamicCanRunTarget_get());
public final static DynamicValueType eDynamicDontRunTarget = new DynamicValueType("eDynamicDontRunTarget", lldbJNI.eDynamicDontRunTarget_get());
public final int swigValue() {
return swigValue;
}
public String toString() {
return swigName;
}
public static DynamicValueType swigToEnum(int swigValue) {
if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
return swigValues[swigValue];
for (int i = 0; i < swigValues.length; i++)
if (swigValues[i].swigValue == swigValue)
return swigValues[i];
throw new IllegalArgumentException("No enum " + DynamicValueType.class + " with value " + swigValue);
}
private DynamicValueType(String swigName) {
this.swigName = swigName;
this.swigValue = swigNext++;
}
private DynamicValueType(String swigName, int swigValue) {
this.swigName = swigName;
this.swigValue = swigValue;
swigNext = swigValue+1;
}
private DynamicValueType(String swigName, DynamicValueType swigEnum) {
this.swigName = swigName;
this.swigValue = swigEnum.swigValue;
swigNext = this.swigValue+1;
}
private static DynamicValueType[] swigValues = { eNoDynamicValues, eDynamicCanRunTarget, eDynamicDontRunTarget };
private static int swigNext = 0;
private final int swigValue;
private final String swigName;
}
@@ -0,0 +1,60 @@
/* ###
* IP: Apache License 2.0 with LLVM Exceptions
*/
package SWIG;
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
public final class EmulateInstructionOptions {
public final static EmulateInstructionOptions eEmulateInstructionOptionNone = new EmulateInstructionOptions("eEmulateInstructionOptionNone", lldbJNI.eEmulateInstructionOptionNone_get());
public final static EmulateInstructionOptions eEmulateInstructionOptionAutoAdvancePC = new EmulateInstructionOptions("eEmulateInstructionOptionAutoAdvancePC", lldbJNI.eEmulateInstructionOptionAutoAdvancePC_get());
public final static EmulateInstructionOptions eEmulateInstructionOptionIgnoreConditions = new EmulateInstructionOptions("eEmulateInstructionOptionIgnoreConditions", lldbJNI.eEmulateInstructionOptionIgnoreConditions_get());
public final int swigValue() {
return swigValue;
}
public String toString() {
return swigName;
}
public static EmulateInstructionOptions swigToEnum(int swigValue) {
if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
return swigValues[swigValue];
for (int i = 0; i < swigValues.length; i++)
if (swigValues[i].swigValue == swigValue)
return swigValues[i];
throw new IllegalArgumentException("No enum " + EmulateInstructionOptions.class + " with value " + swigValue);
}
private EmulateInstructionOptions(String swigName) {
this.swigName = swigName;
this.swigValue = swigNext++;
}
private EmulateInstructionOptions(String swigName, int swigValue) {
this.swigName = swigName;
this.swigValue = swigValue;
swigNext = swigValue+1;
}
private EmulateInstructionOptions(String swigName, EmulateInstructionOptions swigEnum) {
this.swigName = swigName;
this.swigValue = swigEnum.swigValue;
swigNext = this.swigValue+1;
}
private static EmulateInstructionOptions[] swigValues = { eEmulateInstructionOptionNone, eEmulateInstructionOptionAutoAdvancePC, eEmulateInstructionOptionIgnoreConditions };
private static int swigNext = 0;
private final int swigValue;
private final String swigName;
}
@@ -0,0 +1,62 @@
/* ###
* IP: Apache License 2.0 with LLVM Exceptions
*/
package SWIG;
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
public final class Encoding {
public final static Encoding eEncodingInvalid = new Encoding("eEncodingInvalid", lldbJNI.eEncodingInvalid_get());
public final static Encoding eEncodingUint = new Encoding("eEncodingUint");
public final static Encoding eEncodingSint = new Encoding("eEncodingSint");
public final static Encoding eEncodingIEEE754 = new Encoding("eEncodingIEEE754");
public final static Encoding eEncodingVector = new Encoding("eEncodingVector");
public final int swigValue() {
return swigValue;
}
public String toString() {
return swigName;
}
public static Encoding swigToEnum(int swigValue) {
if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
return swigValues[swigValue];
for (int i = 0; i < swigValues.length; i++)
if (swigValues[i].swigValue == swigValue)
return swigValues[i];
throw new IllegalArgumentException("No enum " + Encoding.class + " with value " + swigValue);
}
private Encoding(String swigName) {
this.swigName = swigName;
this.swigValue = swigNext++;
}
private Encoding(String swigName, int swigValue) {
this.swigName = swigName;
this.swigValue = swigValue;
swigNext = swigValue+1;
}
private Encoding(String swigName, Encoding swigEnum) {
this.swigName = swigName;
this.swigValue = swigEnum.swigValue;
swigNext = this.swigValue+1;
}
private static Encoding[] swigValues = { eEncodingInvalid, eEncodingUint, eEncodingSint, eEncodingIEEE754, eEncodingVector };
private static int swigNext = 0;
private final int swigValue;
private final String swigName;
}
@@ -0,0 +1,63 @@
/* ###
* IP: Apache License 2.0 with LLVM Exceptions
*/
package SWIG;
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
public final class ErrorType {
public final static ErrorType eErrorTypeInvalid = new ErrorType("eErrorTypeInvalid");
public final static ErrorType eErrorTypeGeneric = new ErrorType("eErrorTypeGeneric");
public final static ErrorType eErrorTypeMachKernel = new ErrorType("eErrorTypeMachKernel");
public final static ErrorType eErrorTypePOSIX = new ErrorType("eErrorTypePOSIX");
public final static ErrorType eErrorTypeExpression = new ErrorType("eErrorTypeExpression");
public final static ErrorType eErrorTypeWin32 = new ErrorType("eErrorTypeWin32");
public final int swigValue() {
return swigValue;
}
public String toString() {
return swigName;
}
public static ErrorType swigToEnum(int swigValue) {
if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
return swigValues[swigValue];
for (int i = 0; i < swigValues.length; i++)
if (swigValues[i].swigValue == swigValue)
return swigValues[i];
throw new IllegalArgumentException("No enum " + ErrorType.class + " with value " + swigValue);
}
private ErrorType(String swigName) {
this.swigName = swigName;
this.swigValue = swigNext++;
}
private ErrorType(String swigName, int swigValue) {
this.swigName = swigName;
this.swigValue = swigValue;
swigNext = swigValue+1;
}
private ErrorType(String swigName, ErrorType swigEnum) {
this.swigName = swigName;
this.swigValue = swigEnum.swigValue;
swigNext = this.swigValue+1;
}
private static ErrorType[] swigValues = { eErrorTypeInvalid, eErrorTypeGeneric, eErrorTypeMachKernel, eErrorTypePOSIX, eErrorTypeExpression, eErrorTypeWin32 };
private static int swigNext = 0;
private final int swigValue;
private final String swigName;
}
@@ -0,0 +1,61 @@
/* ###
* IP: Apache License 2.0 with LLVM Exceptions
*/
package SWIG;
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
public final class ExpressionEvaluationPhase {
public final static ExpressionEvaluationPhase eExpressionEvaluationParse = new ExpressionEvaluationPhase("eExpressionEvaluationParse", lldbJNI.eExpressionEvaluationParse_get());
public final static ExpressionEvaluationPhase eExpressionEvaluationIRGen = new ExpressionEvaluationPhase("eExpressionEvaluationIRGen");
public final static ExpressionEvaluationPhase eExpressionEvaluationExecution = new ExpressionEvaluationPhase("eExpressionEvaluationExecution");
public final static ExpressionEvaluationPhase eExpressionEvaluationComplete = new ExpressionEvaluationPhase("eExpressionEvaluationComplete");
public final int swigValue() {
return swigValue;
}
public String toString() {
return swigName;
}
public static ExpressionEvaluationPhase swigToEnum(int swigValue) {
if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
return swigValues[swigValue];
for (int i = 0; i < swigValues.length; i++)
if (swigValues[i].swigValue == swigValue)
return swigValues[i];
throw new IllegalArgumentException("No enum " + ExpressionEvaluationPhase.class + " with value " + swigValue);
}
private ExpressionEvaluationPhase(String swigName) {
this.swigName = swigName;
this.swigValue = swigNext++;
}
private ExpressionEvaluationPhase(String swigName, int swigValue) {
this.swigName = swigName;
this.swigValue = swigValue;
swigNext = swigValue+1;
}
private ExpressionEvaluationPhase(String swigName, ExpressionEvaluationPhase swigEnum) {
this.swigName = swigName;
this.swigValue = swigEnum.swigValue;
swigNext = this.swigValue+1;
}
private static ExpressionEvaluationPhase[] swigValues = { eExpressionEvaluationParse, eExpressionEvaluationIRGen, eExpressionEvaluationExecution, eExpressionEvaluationComplete };
private static int swigNext = 0;
private final int swigValue;
private final String swigName;
}
@@ -0,0 +1,67 @@
/* ###
* IP: Apache License 2.0 with LLVM Exceptions
*/
package SWIG;
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
public final class ExpressionResults {
public final static ExpressionResults eExpressionCompleted = new ExpressionResults("eExpressionCompleted", lldbJNI.eExpressionCompleted_get());
public final static ExpressionResults eExpressionSetupError = new ExpressionResults("eExpressionSetupError");
public final static ExpressionResults eExpressionParseError = new ExpressionResults("eExpressionParseError");
public final static ExpressionResults eExpressionDiscarded = new ExpressionResults("eExpressionDiscarded");
public final static ExpressionResults eExpressionInterrupted = new ExpressionResults("eExpressionInterrupted");
public final static ExpressionResults eExpressionHitBreakpoint = new ExpressionResults("eExpressionHitBreakpoint");
public final static ExpressionResults eExpressionTimedOut = new ExpressionResults("eExpressionTimedOut");
public final static ExpressionResults eExpressionResultUnavailable = new ExpressionResults("eExpressionResultUnavailable");
public final static ExpressionResults eExpressionStoppedForDebug = new ExpressionResults("eExpressionStoppedForDebug");
public final static ExpressionResults eExpressionThreadVanished = new ExpressionResults("eExpressionThreadVanished");
public final int swigValue() {
return swigValue;
}
public String toString() {
return swigName;
}
public static ExpressionResults swigToEnum(int swigValue) {
if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
return swigValues[swigValue];
for (int i = 0; i < swigValues.length; i++)
if (swigValues[i].swigValue == swigValue)
return swigValues[i];
throw new IllegalArgumentException("No enum " + ExpressionResults.class + " with value " + swigValue);
}
private ExpressionResults(String swigName) {
this.swigName = swigName;
this.swigValue = swigNext++;
}
private ExpressionResults(String swigName, int swigValue) {
this.swigName = swigName;
this.swigValue = swigValue;
swigNext = swigValue+1;
}
private ExpressionResults(String swigName, ExpressionResults swigEnum) {
this.swigName = swigName;
this.swigValue = swigEnum.swigValue;
swigNext = this.swigValue+1;
}
private static ExpressionResults[] swigValues = { eExpressionCompleted, eExpressionSetupError, eExpressionParseError, eExpressionDiscarded, eExpressionInterrupted, eExpressionHitBreakpoint, eExpressionTimedOut, eExpressionResultUnavailable, eExpressionStoppedForDebug, eExpressionThreadVanished };
private static int swigNext = 0;
private final int swigValue;
private final String swigName;
}
@@ -0,0 +1,83 @@
/* ###
* IP: Apache License 2.0 with LLVM Exceptions
*/
package SWIG;
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
public final class FilePermissions {
public final static FilePermissions eFilePermissionsUserRead = new FilePermissions("eFilePermissionsUserRead", lldbJNI.eFilePermissionsUserRead_get());
public final static FilePermissions eFilePermissionsUserWrite = new FilePermissions("eFilePermissionsUserWrite", lldbJNI.eFilePermissionsUserWrite_get());
public final static FilePermissions eFilePermissionsUserExecute = new FilePermissions("eFilePermissionsUserExecute", lldbJNI.eFilePermissionsUserExecute_get());
public final static FilePermissions eFilePermissionsGroupRead = new FilePermissions("eFilePermissionsGroupRead", lldbJNI.eFilePermissionsGroupRead_get());
public final static FilePermissions eFilePermissionsGroupWrite = new FilePermissions("eFilePermissionsGroupWrite", lldbJNI.eFilePermissionsGroupWrite_get());
public final static FilePermissions eFilePermissionsGroupExecute = new FilePermissions("eFilePermissionsGroupExecute", lldbJNI.eFilePermissionsGroupExecute_get());
public final static FilePermissions eFilePermissionsWorldRead = new FilePermissions("eFilePermissionsWorldRead", lldbJNI.eFilePermissionsWorldRead_get());
public final static FilePermissions eFilePermissionsWorldWrite = new FilePermissions("eFilePermissionsWorldWrite", lldbJNI.eFilePermissionsWorldWrite_get());
public final static FilePermissions eFilePermissionsWorldExecute = new FilePermissions("eFilePermissionsWorldExecute", lldbJNI.eFilePermissionsWorldExecute_get());
public final static FilePermissions eFilePermissionsUserRW = new FilePermissions("eFilePermissionsUserRW", lldbJNI.eFilePermissionsUserRW_get());
public final static FilePermissions eFileFilePermissionsUserRX = new FilePermissions("eFileFilePermissionsUserRX", lldbJNI.eFileFilePermissionsUserRX_get());
public final static FilePermissions eFilePermissionsUserRWX = new FilePermissions("eFilePermissionsUserRWX", lldbJNI.eFilePermissionsUserRWX_get());
public final static FilePermissions eFilePermissionsGroupRW = new FilePermissions("eFilePermissionsGroupRW", lldbJNI.eFilePermissionsGroupRW_get());
public final static FilePermissions eFilePermissionsGroupRX = new FilePermissions("eFilePermissionsGroupRX", lldbJNI.eFilePermissionsGroupRX_get());
public final static FilePermissions eFilePermissionsGroupRWX = new FilePermissions("eFilePermissionsGroupRWX", lldbJNI.eFilePermissionsGroupRWX_get());
public final static FilePermissions eFilePermissionsWorldRW = new FilePermissions("eFilePermissionsWorldRW", lldbJNI.eFilePermissionsWorldRW_get());
public final static FilePermissions eFilePermissionsWorldRX = new FilePermissions("eFilePermissionsWorldRX", lldbJNI.eFilePermissionsWorldRX_get());
public final static FilePermissions eFilePermissionsWorldRWX = new FilePermissions("eFilePermissionsWorldRWX", lldbJNI.eFilePermissionsWorldRWX_get());
public final static FilePermissions eFilePermissionsEveryoneR = new FilePermissions("eFilePermissionsEveryoneR", lldbJNI.eFilePermissionsEveryoneR_get());
public final static FilePermissions eFilePermissionsEveryoneW = new FilePermissions("eFilePermissionsEveryoneW", lldbJNI.eFilePermissionsEveryoneW_get());
public final static FilePermissions eFilePermissionsEveryoneX = new FilePermissions("eFilePermissionsEveryoneX", lldbJNI.eFilePermissionsEveryoneX_get());
public final static FilePermissions eFilePermissionsEveryoneRW = new FilePermissions("eFilePermissionsEveryoneRW", lldbJNI.eFilePermissionsEveryoneRW_get());
public final static FilePermissions eFilePermissionsEveryoneRX = new FilePermissions("eFilePermissionsEveryoneRX", lldbJNI.eFilePermissionsEveryoneRX_get());
public final static FilePermissions eFilePermissionsEveryoneRWX = new FilePermissions("eFilePermissionsEveryoneRWX", lldbJNI.eFilePermissionsEveryoneRWX_get());
public final static FilePermissions eFilePermissionsFileDefault = new FilePermissions("eFilePermissionsFileDefault", lldbJNI.eFilePermissionsFileDefault_get());
public final static FilePermissions eFilePermissionsDirectoryDefault = new FilePermissions("eFilePermissionsDirectoryDefault", lldbJNI.eFilePermissionsDirectoryDefault_get());
public final int swigValue() {
return swigValue;
}
public String toString() {
return swigName;
}
public static FilePermissions swigToEnum(int swigValue) {
if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
return swigValues[swigValue];
for (int i = 0; i < swigValues.length; i++)
if (swigValues[i].swigValue == swigValue)
return swigValues[i];
throw new IllegalArgumentException("No enum " + FilePermissions.class + " with value " + swigValue);
}
private FilePermissions(String swigName) {
this.swigName = swigName;
this.swigValue = swigNext++;
}
private FilePermissions(String swigName, int swigValue) {
this.swigName = swigName;
this.swigValue = swigValue;
swigNext = swigValue+1;
}
private FilePermissions(String swigName, FilePermissions swigEnum) {
this.swigName = swigName;
this.swigValue = swigEnum.swigValue;
swigNext = this.swigValue+1;
}
private static FilePermissions[] swigValues = { eFilePermissionsUserRead, eFilePermissionsUserWrite, eFilePermissionsUserExecute, eFilePermissionsGroupRead, eFilePermissionsGroupWrite, eFilePermissionsGroupExecute, eFilePermissionsWorldRead, eFilePermissionsWorldWrite, eFilePermissionsWorldExecute, eFilePermissionsUserRW, eFileFilePermissionsUserRX, eFilePermissionsUserRWX, eFilePermissionsGroupRW, eFilePermissionsGroupRX, eFilePermissionsGroupRWX, eFilePermissionsWorldRW, eFilePermissionsWorldRX, eFilePermissionsWorldRWX, eFilePermissionsEveryoneR, eFilePermissionsEveryoneW, eFilePermissionsEveryoneX, eFilePermissionsEveryoneRW, eFilePermissionsEveryoneRX, eFilePermissionsEveryoneRWX, eFilePermissionsFileDefault, eFilePermissionsDirectoryDefault };
private static int swigNext = 0;
private final int swigValue;
private final String swigName;
}
@@ -0,0 +1,100 @@
/* ###
* IP: Apache License 2.0 with LLVM Exceptions
*/
package SWIG;
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
public final class Format {
public final static Format eFormatDefault = new Format("eFormatDefault", lldbJNI.eFormatDefault_get());
public final static Format eFormatInvalid = new Format("eFormatInvalid", lldbJNI.eFormatInvalid_get());
public final static Format eFormatBoolean = new Format("eFormatBoolean");
public final static Format eFormatBinary = new Format("eFormatBinary");
public final static Format eFormatBytes = new Format("eFormatBytes");
public final static Format eFormatBytesWithASCII = new Format("eFormatBytesWithASCII");
public final static Format eFormatChar = new Format("eFormatChar");
public final static Format eFormatCharPrintable = new Format("eFormatCharPrintable");
public final static Format eFormatComplex = new Format("eFormatComplex");
public final static Format eFormatComplexFloat = new Format("eFormatComplexFloat", lldbJNI.eFormatComplexFloat_get());
public final static Format eFormatCString = new Format("eFormatCString");
public final static Format eFormatDecimal = new Format("eFormatDecimal");
public final static Format eFormatEnum = new Format("eFormatEnum");
public final static Format eFormatHex = new Format("eFormatHex");
public final static Format eFormatHexUppercase = new Format("eFormatHexUppercase");
public final static Format eFormatFloat = new Format("eFormatFloat");
public final static Format eFormatOctal = new Format("eFormatOctal");
public final static Format eFormatOSType = new Format("eFormatOSType");
public final static Format eFormatUnicode16 = new Format("eFormatUnicode16");
public final static Format eFormatUnicode32 = new Format("eFormatUnicode32");
public final static Format eFormatUnsigned = new Format("eFormatUnsigned");
public final static Format eFormatPointer = new Format("eFormatPointer");
public final static Format eFormatVectorOfChar = new Format("eFormatVectorOfChar");
public final static Format eFormatVectorOfSInt8 = new Format("eFormatVectorOfSInt8");
public final static Format eFormatVectorOfUInt8 = new Format("eFormatVectorOfUInt8");
public final static Format eFormatVectorOfSInt16 = new Format("eFormatVectorOfSInt16");
public final static Format eFormatVectorOfUInt16 = new Format("eFormatVectorOfUInt16");
public final static Format eFormatVectorOfSInt32 = new Format("eFormatVectorOfSInt32");
public final static Format eFormatVectorOfUInt32 = new Format("eFormatVectorOfUInt32");
public final static Format eFormatVectorOfSInt64 = new Format("eFormatVectorOfSInt64");
public final static Format eFormatVectorOfUInt64 = new Format("eFormatVectorOfUInt64");
public final static Format eFormatVectorOfFloat16 = new Format("eFormatVectorOfFloat16");
public final static Format eFormatVectorOfFloat32 = new Format("eFormatVectorOfFloat32");
public final static Format eFormatVectorOfFloat64 = new Format("eFormatVectorOfFloat64");
public final static Format eFormatVectorOfUInt128 = new Format("eFormatVectorOfUInt128");
public final static Format eFormatComplexInteger = new Format("eFormatComplexInteger");
public final static Format eFormatCharArray = new Format("eFormatCharArray");
public final static Format eFormatAddressInfo = new Format("eFormatAddressInfo");
public final static Format eFormatHexFloat = new Format("eFormatHexFloat");
public final static Format eFormatInstruction = new Format("eFormatInstruction");
public final static Format eFormatVoid = new Format("eFormatVoid");
public final static Format eFormatUnicode8 = new Format("eFormatUnicode8");
public final static Format kNumFormats = new Format("kNumFormats");
public final int swigValue() {
return swigValue;
}
public String toString() {
return swigName;
}
public static Format swigToEnum(int swigValue) {
if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
return swigValues[swigValue];
for (int i = 0; i < swigValues.length; i++)
if (swigValues[i].swigValue == swigValue)
return swigValues[i];
throw new IllegalArgumentException("No enum " + Format.class + " with value " + swigValue);
}
private Format(String swigName) {
this.swigName = swigName;
this.swigValue = swigNext++;
}
private Format(String swigName, int swigValue) {
this.swigName = swigName;
this.swigValue = swigValue;
swigNext = swigValue+1;
}
private Format(String swigName, Format swigEnum) {
this.swigName = swigName;
this.swigValue = swigEnum.swigValue;
swigNext = this.swigValue+1;
}
private static Format[] swigValues = { eFormatDefault, eFormatInvalid, eFormatBoolean, eFormatBinary, eFormatBytes, eFormatBytesWithASCII, eFormatChar, eFormatCharPrintable, eFormatComplex, eFormatComplexFloat, eFormatCString, eFormatDecimal, eFormatEnum, eFormatHex, eFormatHexUppercase, eFormatFloat, eFormatOctal, eFormatOSType, eFormatUnicode16, eFormatUnicode32, eFormatUnsigned, eFormatPointer, eFormatVectorOfChar, eFormatVectorOfSInt8, eFormatVectorOfUInt8, eFormatVectorOfSInt16, eFormatVectorOfUInt16, eFormatVectorOfSInt32, eFormatVectorOfUInt32, eFormatVectorOfSInt64, eFormatVectorOfUInt64, eFormatVectorOfFloat16, eFormatVectorOfFloat32, eFormatVectorOfFloat64, eFormatVectorOfUInt128, eFormatComplexInteger, eFormatCharArray, eFormatAddressInfo, eFormatHexFloat, eFormatInstruction, eFormatVoid, eFormatUnicode8, kNumFormats };
private static int swigNext = 0;
private final int swigValue;
private final String swigName;
}
@@ -0,0 +1,63 @@
/* ###
* IP: Apache License 2.0 with LLVM Exceptions
*/
package SWIG;
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
public final class FrameComparison {
public final static FrameComparison eFrameCompareInvalid = new FrameComparison("eFrameCompareInvalid");
public final static FrameComparison eFrameCompareUnknown = new FrameComparison("eFrameCompareUnknown");
public final static FrameComparison eFrameCompareEqual = new FrameComparison("eFrameCompareEqual");
public final static FrameComparison eFrameCompareSameParent = new FrameComparison("eFrameCompareSameParent");
public final static FrameComparison eFrameCompareYounger = new FrameComparison("eFrameCompareYounger");
public final static FrameComparison eFrameCompareOlder = new FrameComparison("eFrameCompareOlder");
public final int swigValue() {
return swigValue;
}
public String toString() {
return swigName;
}
public static FrameComparison swigToEnum(int swigValue) {
if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
return swigValues[swigValue];
for (int i = 0; i < swigValues.length; i++)
if (swigValues[i].swigValue == swigValue)
return swigValues[i];
throw new IllegalArgumentException("No enum " + FrameComparison.class + " with value " + swigValue);
}
private FrameComparison(String swigName) {
this.swigName = swigName;
this.swigValue = swigNext++;
}
private FrameComparison(String swigName, int swigValue) {
this.swigName = swigName;
this.swigValue = swigValue;
swigNext = swigValue+1;
}
private FrameComparison(String swigName, FrameComparison swigEnum) {
this.swigName = swigName;
this.swigValue = swigEnum.swigValue;
swigNext = this.swigValue+1;
}
private static FrameComparison[] swigValues = { eFrameCompareInvalid, eFrameCompareUnknown, eFrameCompareEqual, eFrameCompareSameParent, eFrameCompareYounger, eFrameCompareOlder };
private static int swigNext = 0;
private final int swigValue;
private final String swigName;
}
@@ -0,0 +1,64 @@
/* ###
* IP: Apache License 2.0 with LLVM Exceptions
*/
package SWIG;
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
public final class FunctionNameType {
public final static FunctionNameType eFunctionNameTypeNone = new FunctionNameType("eFunctionNameTypeNone", lldbJNI.eFunctionNameTypeNone_get());
public final static FunctionNameType eFunctionNameTypeAuto = new FunctionNameType("eFunctionNameTypeAuto", lldbJNI.eFunctionNameTypeAuto_get());
public final static FunctionNameType eFunctionNameTypeFull = new FunctionNameType("eFunctionNameTypeFull", lldbJNI.eFunctionNameTypeFull_get());
public final static FunctionNameType eFunctionNameTypeBase = new FunctionNameType("eFunctionNameTypeBase", lldbJNI.eFunctionNameTypeBase_get());
public final static FunctionNameType eFunctionNameTypeMethod = new FunctionNameType("eFunctionNameTypeMethod", lldbJNI.eFunctionNameTypeMethod_get());
public final static FunctionNameType eFunctionNameTypeSelector = new FunctionNameType("eFunctionNameTypeSelector", lldbJNI.eFunctionNameTypeSelector_get());
public final static FunctionNameType eFunctionNameTypeAny = new FunctionNameType("eFunctionNameTypeAny", lldbJNI.eFunctionNameTypeAny_get());
public final int swigValue() {
return swigValue;
}
public String toString() {
return swigName;
}
public static FunctionNameType swigToEnum(int swigValue) {
if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
return swigValues[swigValue];
for (int i = 0; i < swigValues.length; i++)
if (swigValues[i].swigValue == swigValue)
return swigValues[i];
throw new IllegalArgumentException("No enum " + FunctionNameType.class + " with value " + swigValue);
}
private FunctionNameType(String swigName) {
this.swigName = swigName;
this.swigValue = swigNext++;
}
private FunctionNameType(String swigName, int swigValue) {
this.swigName = swigName;
this.swigValue = swigValue;
swigNext = swigValue+1;
}
private FunctionNameType(String swigName, FunctionNameType swigEnum) {
this.swigName = swigName;
this.swigValue = swigEnum.swigValue;
swigNext = this.swigValue+1;
}
private static FunctionNameType[] swigValues = { eFunctionNameTypeNone, eFunctionNameTypeAuto, eFunctionNameTypeFull, eFunctionNameTypeBase, eFunctionNameTypeMethod, eFunctionNameTypeSelector, eFunctionNameTypeAny };
private static int swigNext = 0;
private final int swigValue;
private final String swigName;
}
@@ -0,0 +1,63 @@
/* ###
* IP: Apache License 2.0 with LLVM Exceptions
*/
package SWIG;
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
public final class GdbSignal {
public final static GdbSignal eGdbSignalBadAccess = new GdbSignal("eGdbSignalBadAccess", lldbJNI.eGdbSignalBadAccess_get());
public final static GdbSignal eGdbSignalBadInstruction = new GdbSignal("eGdbSignalBadInstruction", lldbJNI.eGdbSignalBadInstruction_get());
public final static GdbSignal eGdbSignalArithmetic = new GdbSignal("eGdbSignalArithmetic", lldbJNI.eGdbSignalArithmetic_get());
public final static GdbSignal eGdbSignalEmulation = new GdbSignal("eGdbSignalEmulation", lldbJNI.eGdbSignalEmulation_get());
public final static GdbSignal eGdbSignalSoftware = new GdbSignal("eGdbSignalSoftware", lldbJNI.eGdbSignalSoftware_get());
public final static GdbSignal eGdbSignalBreakpoint = new GdbSignal("eGdbSignalBreakpoint", lldbJNI.eGdbSignalBreakpoint_get());
public final int swigValue() {
return swigValue;
}
public String toString() {
return swigName;
}
public static GdbSignal swigToEnum(int swigValue) {
if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
return swigValues[swigValue];
for (int i = 0; i < swigValues.length; i++)
if (swigValues[i].swigValue == swigValue)
return swigValues[i];
throw new IllegalArgumentException("No enum " + GdbSignal.class + " with value " + swigValue);
}
private GdbSignal(String swigName) {
this.swigName = swigName;
this.swigValue = swigNext++;
}
private GdbSignal(String swigName, int swigValue) {
this.swigName = swigName;
this.swigValue = swigValue;
swigNext = swigValue+1;
}
private GdbSignal(String swigName, GdbSignal swigEnum) {
this.swigName = swigName;
this.swigValue = swigEnum.swigValue;
swigNext = this.swigValue+1;
}
private static GdbSignal[] swigValues = { eGdbSignalBadAccess, eGdbSignalBadInstruction, eGdbSignalArithmetic, eGdbSignalEmulation, eGdbSignalSoftware, eGdbSignalBreakpoint };
private static int swigNext = 0;
private final int swigValue;
private final String swigName;
}
@@ -0,0 +1,65 @@
/* ###
* IP: Apache License 2.0 with LLVM Exceptions
*/
package SWIG;
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
public final class InputReaderAction {
public final static InputReaderAction eInputReaderActivate = new InputReaderAction("eInputReaderActivate");
public final static InputReaderAction eInputReaderAsynchronousOutputWritten = new InputReaderAction("eInputReaderAsynchronousOutputWritten");
public final static InputReaderAction eInputReaderReactivate = new InputReaderAction("eInputReaderReactivate");
public final static InputReaderAction eInputReaderDeactivate = new InputReaderAction("eInputReaderDeactivate");
public final static InputReaderAction eInputReaderGotToken = new InputReaderAction("eInputReaderGotToken");
public final static InputReaderAction eInputReaderInterrupt = new InputReaderAction("eInputReaderInterrupt");
public final static InputReaderAction eInputReaderEndOfFile = new InputReaderAction("eInputReaderEndOfFile");
public final static InputReaderAction eInputReaderDone = new InputReaderAction("eInputReaderDone");
public final int swigValue() {
return swigValue;
}
public String toString() {
return swigName;
}
public static InputReaderAction swigToEnum(int swigValue) {
if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
return swigValues[swigValue];
for (int i = 0; i < swigValues.length; i++)
if (swigValues[i].swigValue == swigValue)
return swigValues[i];
throw new IllegalArgumentException("No enum " + InputReaderAction.class + " with value " + swigValue);
}
private InputReaderAction(String swigName) {
this.swigName = swigName;
this.swigValue = swigNext++;
}
private InputReaderAction(String swigName, int swigValue) {
this.swigName = swigName;
this.swigValue = swigValue;
swigNext = swigValue+1;
}
private InputReaderAction(String swigName, InputReaderAction swigEnum) {
this.swigName = swigName;
this.swigValue = swigEnum.swigValue;
swigNext = this.swigValue+1;
}
private static InputReaderAction[] swigValues = { eInputReaderActivate, eInputReaderAsynchronousOutputWritten, eInputReaderReactivate, eInputReaderDeactivate, eInputReaderGotToken, eInputReaderInterrupt, eInputReaderEndOfFile, eInputReaderDone };
private static int swigNext = 0;
private final int swigValue;
private final String swigName;
}
@@ -0,0 +1,62 @@
/* ###
* IP: Apache License 2.0 with LLVM Exceptions
*/
package SWIG;
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
public final class InputReaderGranularity {
public final static InputReaderGranularity eInputReaderGranularityInvalid = new InputReaderGranularity("eInputReaderGranularityInvalid", lldbJNI.eInputReaderGranularityInvalid_get());
public final static InputReaderGranularity eInputReaderGranularityByte = new InputReaderGranularity("eInputReaderGranularityByte");
public final static InputReaderGranularity eInputReaderGranularityWord = new InputReaderGranularity("eInputReaderGranularityWord");
public final static InputReaderGranularity eInputReaderGranularityLine = new InputReaderGranularity("eInputReaderGranularityLine");
public final static InputReaderGranularity eInputReaderGranularityAll = new InputReaderGranularity("eInputReaderGranularityAll");
public final int swigValue() {
return swigValue;
}
public String toString() {
return swigName;
}
public static InputReaderGranularity swigToEnum(int swigValue) {
if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
return swigValues[swigValue];
for (int i = 0; i < swigValues.length; i++)
if (swigValues[i].swigValue == swigValue)
return swigValues[i];
throw new IllegalArgumentException("No enum " + InputReaderGranularity.class + " with value " + swigValue);
}
private InputReaderGranularity(String swigName) {
this.swigName = swigName;
this.swigValue = swigNext++;
}
private InputReaderGranularity(String swigName, int swigValue) {
this.swigName = swigName;
this.swigValue = swigValue;
swigNext = swigValue+1;
}
private InputReaderGranularity(String swigName, InputReaderGranularity swigEnum) {
this.swigName = swigName;
this.swigValue = swigEnum.swigValue;
swigNext = this.swigValue+1;
}
private static InputReaderGranularity[] swigValues = { eInputReaderGranularityInvalid, eInputReaderGranularityByte, eInputReaderGranularityWord, eInputReaderGranularityLine, eInputReaderGranularityAll };
private static int swigNext = 0;
private final int swigValue;
private final String swigName;
}
@@ -0,0 +1,63 @@
/* ###
* IP: Apache License 2.0 with LLVM Exceptions
*/
package SWIG;
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
public final class InstrumentationRuntimeType {
public final static InstrumentationRuntimeType eInstrumentationRuntimeTypeAddressSanitizer = new InstrumentationRuntimeType("eInstrumentationRuntimeTypeAddressSanitizer", lldbJNI.eInstrumentationRuntimeTypeAddressSanitizer_get());
public final static InstrumentationRuntimeType eInstrumentationRuntimeTypeThreadSanitizer = new InstrumentationRuntimeType("eInstrumentationRuntimeTypeThreadSanitizer", lldbJNI.eInstrumentationRuntimeTypeThreadSanitizer_get());
public final static InstrumentationRuntimeType eInstrumentationRuntimeTypeUndefinedBehaviorSanitizer = new InstrumentationRuntimeType("eInstrumentationRuntimeTypeUndefinedBehaviorSanitizer", lldbJNI.eInstrumentationRuntimeTypeUndefinedBehaviorSanitizer_get());
public final static InstrumentationRuntimeType eInstrumentationRuntimeTypeMainThreadChecker = new InstrumentationRuntimeType("eInstrumentationRuntimeTypeMainThreadChecker", lldbJNI.eInstrumentationRuntimeTypeMainThreadChecker_get());
public final static InstrumentationRuntimeType eInstrumentationRuntimeTypeSwiftRuntimeReporting = new InstrumentationRuntimeType("eInstrumentationRuntimeTypeSwiftRuntimeReporting", lldbJNI.eInstrumentationRuntimeTypeSwiftRuntimeReporting_get());
public final static InstrumentationRuntimeType eNumInstrumentationRuntimeTypes = new InstrumentationRuntimeType("eNumInstrumentationRuntimeTypes");
public final int swigValue() {
return swigValue;
}
public String toString() {
return swigName;
}
public static InstrumentationRuntimeType swigToEnum(int swigValue) {
if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
return swigValues[swigValue];
for (int i = 0; i < swigValues.length; i++)
if (swigValues[i].swigValue == swigValue)
return swigValues[i];
throw new IllegalArgumentException("No enum " + InstrumentationRuntimeType.class + " with value " + swigValue);
}
private InstrumentationRuntimeType(String swigName) {
this.swigName = swigName;
this.swigValue = swigNext++;
}
private InstrumentationRuntimeType(String swigName, int swigValue) {
this.swigName = swigName;
this.swigValue = swigValue;
swigNext = swigValue+1;
}
private InstrumentationRuntimeType(String swigName, InstrumentationRuntimeType swigEnum) {
this.swigName = swigName;
this.swigValue = swigEnum.swigValue;
swigNext = this.swigValue+1;
}
private static InstrumentationRuntimeType[] swigValues = { eInstrumentationRuntimeTypeAddressSanitizer, eInstrumentationRuntimeTypeThreadSanitizer, eInstrumentationRuntimeTypeUndefinedBehaviorSanitizer, eInstrumentationRuntimeTypeMainThreadChecker, eInstrumentationRuntimeTypeSwiftRuntimeReporting, eNumInstrumentationRuntimeTypes };
private static int swigNext = 0;
private final int swigValue;
private final String swigName;
}
@@ -0,0 +1,96 @@
/* ###
* IP: Apache License 2.0 with LLVM Exceptions
*/
package SWIG;
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
public final class LanguageType {
public final static LanguageType eLanguageTypeUnknown = new LanguageType("eLanguageTypeUnknown", lldbJNI.eLanguageTypeUnknown_get());
public final static LanguageType eLanguageTypeC89 = new LanguageType("eLanguageTypeC89", lldbJNI.eLanguageTypeC89_get());
public final static LanguageType eLanguageTypeC = new LanguageType("eLanguageTypeC", lldbJNI.eLanguageTypeC_get());
public final static LanguageType eLanguageTypeAda83 = new LanguageType("eLanguageTypeAda83", lldbJNI.eLanguageTypeAda83_get());
public final static LanguageType eLanguageTypeC_plus_plus = new LanguageType("eLanguageTypeC_plus_plus", lldbJNI.eLanguageTypeC_plus_plus_get());
public final static LanguageType eLanguageTypeCobol74 = new LanguageType("eLanguageTypeCobol74", lldbJNI.eLanguageTypeCobol74_get());
public final static LanguageType eLanguageTypeCobol85 = new LanguageType("eLanguageTypeCobol85", lldbJNI.eLanguageTypeCobol85_get());
public final static LanguageType eLanguageTypeFortran77 = new LanguageType("eLanguageTypeFortran77", lldbJNI.eLanguageTypeFortran77_get());
public final static LanguageType eLanguageTypeFortran90 = new LanguageType("eLanguageTypeFortran90", lldbJNI.eLanguageTypeFortran90_get());
public final static LanguageType eLanguageTypePascal83 = new LanguageType("eLanguageTypePascal83", lldbJNI.eLanguageTypePascal83_get());
public final static LanguageType eLanguageTypeModula2 = new LanguageType("eLanguageTypeModula2", lldbJNI.eLanguageTypeModula2_get());
public final static LanguageType eLanguageTypeJava = new LanguageType("eLanguageTypeJava", lldbJNI.eLanguageTypeJava_get());
public final static LanguageType eLanguageTypeC99 = new LanguageType("eLanguageTypeC99", lldbJNI.eLanguageTypeC99_get());
public final static LanguageType eLanguageTypeAda95 = new LanguageType("eLanguageTypeAda95", lldbJNI.eLanguageTypeAda95_get());
public final static LanguageType eLanguageTypeFortran95 = new LanguageType("eLanguageTypeFortran95", lldbJNI.eLanguageTypeFortran95_get());
public final static LanguageType eLanguageTypePLI = new LanguageType("eLanguageTypePLI", lldbJNI.eLanguageTypePLI_get());
public final static LanguageType eLanguageTypeObjC = new LanguageType("eLanguageTypeObjC", lldbJNI.eLanguageTypeObjC_get());
public final static LanguageType eLanguageTypeObjC_plus_plus = new LanguageType("eLanguageTypeObjC_plus_plus", lldbJNI.eLanguageTypeObjC_plus_plus_get());
public final static LanguageType eLanguageTypeUPC = new LanguageType("eLanguageTypeUPC", lldbJNI.eLanguageTypeUPC_get());
public final static LanguageType eLanguageTypeD = new LanguageType("eLanguageTypeD", lldbJNI.eLanguageTypeD_get());
public final static LanguageType eLanguageTypePython = new LanguageType("eLanguageTypePython", lldbJNI.eLanguageTypePython_get());
public final static LanguageType eLanguageTypeOpenCL = new LanguageType("eLanguageTypeOpenCL", lldbJNI.eLanguageTypeOpenCL_get());
public final static LanguageType eLanguageTypeGo = new LanguageType("eLanguageTypeGo", lldbJNI.eLanguageTypeGo_get());
public final static LanguageType eLanguageTypeModula3 = new LanguageType("eLanguageTypeModula3", lldbJNI.eLanguageTypeModula3_get());
public final static LanguageType eLanguageTypeHaskell = new LanguageType("eLanguageTypeHaskell", lldbJNI.eLanguageTypeHaskell_get());
public final static LanguageType eLanguageTypeC_plus_plus_03 = new LanguageType("eLanguageTypeC_plus_plus_03", lldbJNI.eLanguageTypeC_plus_plus_03_get());
public final static LanguageType eLanguageTypeC_plus_plus_11 = new LanguageType("eLanguageTypeC_plus_plus_11", lldbJNI.eLanguageTypeC_plus_plus_11_get());
public final static LanguageType eLanguageTypeOCaml = new LanguageType("eLanguageTypeOCaml", lldbJNI.eLanguageTypeOCaml_get());
public final static LanguageType eLanguageTypeRust = new LanguageType("eLanguageTypeRust", lldbJNI.eLanguageTypeRust_get());
public final static LanguageType eLanguageTypeC11 = new LanguageType("eLanguageTypeC11", lldbJNI.eLanguageTypeC11_get());
public final static LanguageType eLanguageTypeSwift = new LanguageType("eLanguageTypeSwift", lldbJNI.eLanguageTypeSwift_get());
public final static LanguageType eLanguageTypeJulia = new LanguageType("eLanguageTypeJulia", lldbJNI.eLanguageTypeJulia_get());
public final static LanguageType eLanguageTypeDylan = new LanguageType("eLanguageTypeDylan", lldbJNI.eLanguageTypeDylan_get());
public final static LanguageType eLanguageTypeC_plus_plus_14 = new LanguageType("eLanguageTypeC_plus_plus_14", lldbJNI.eLanguageTypeC_plus_plus_14_get());
public final static LanguageType eLanguageTypeFortran03 = new LanguageType("eLanguageTypeFortran03", lldbJNI.eLanguageTypeFortran03_get());
public final static LanguageType eLanguageTypeFortran08 = new LanguageType("eLanguageTypeFortran08", lldbJNI.eLanguageTypeFortran08_get());
public final static LanguageType eLanguageTypeMipsAssembler = new LanguageType("eLanguageTypeMipsAssembler", lldbJNI.eLanguageTypeMipsAssembler_get());
public final static LanguageType eLanguageTypeExtRenderScript = new LanguageType("eLanguageTypeExtRenderScript", lldbJNI.eLanguageTypeExtRenderScript_get());
public final static LanguageType eNumLanguageTypes = new LanguageType("eNumLanguageTypes");
public final int swigValue() {
return swigValue;
}
public String toString() {
return swigName;
}
public static LanguageType swigToEnum(int swigValue) {
if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
return swigValues[swigValue];
for (int i = 0; i < swigValues.length; i++)
if (swigValues[i].swigValue == swigValue)
return swigValues[i];
throw new IllegalArgumentException("No enum " + LanguageType.class + " with value " + swigValue);
}
private LanguageType(String swigName) {
this.swigName = swigName;
this.swigValue = swigNext++;
}
private LanguageType(String swigName, int swigValue) {
this.swigName = swigName;
this.swigValue = swigValue;
swigNext = swigValue+1;
}
private LanguageType(String swigName, LanguageType swigEnum) {
this.swigName = swigName;
this.swigValue = swigEnum.swigValue;
swigNext = this.swigValue+1;
}
private static LanguageType[] swigValues = { eLanguageTypeUnknown, eLanguageTypeC89, eLanguageTypeC, eLanguageTypeAda83, eLanguageTypeC_plus_plus, eLanguageTypeCobol74, eLanguageTypeCobol85, eLanguageTypeFortran77, eLanguageTypeFortran90, eLanguageTypePascal83, eLanguageTypeModula2, eLanguageTypeJava, eLanguageTypeC99, eLanguageTypeAda95, eLanguageTypeFortran95, eLanguageTypePLI, eLanguageTypeObjC, eLanguageTypeObjC_plus_plus, eLanguageTypeUPC, eLanguageTypeD, eLanguageTypePython, eLanguageTypeOpenCL, eLanguageTypeGo, eLanguageTypeModula3, eLanguageTypeHaskell, eLanguageTypeC_plus_plus_03, eLanguageTypeC_plus_plus_11, eLanguageTypeOCaml, eLanguageTypeRust, eLanguageTypeC11, eLanguageTypeSwift, eLanguageTypeJulia, eLanguageTypeDylan, eLanguageTypeC_plus_plus_14, eLanguageTypeFortran03, eLanguageTypeFortran08, eLanguageTypeMipsAssembler, eLanguageTypeExtRenderScript, eNumLanguageTypes };
private static int swigNext = 0;
private final int swigValue;
private final String swigName;
}

Some files were not shown because too many files have changed in this diff Show More