Index: lldb/CMakeLists.txt =================================================================== --- lldb/CMakeLists.txt +++ lldb/CMakeLists.txt @@ -56,7 +56,7 @@ endif () if (LLDB_ENABLE_PYTHON OR LLDB_ENABLE_LUA) - add_subdirectory(scripts) + add_subdirectory(bindings) endif () # We need the headers generated by instrinsics_gen before we can compile @@ -97,7 +97,7 @@ endif() if (LLDB_ENABLE_PYTHON) - get_target_property(lldb_scripts_dir swig_wrapper BINARY_DIR) + get_target_property(lldb_bindings_dir swig_wrapper BINARY_DIR) if(LLDB_BUILD_FRAMEWORK) set(lldb_python_build_path "${LLDB_FRAMEWORK_ABSOLUTE_BUILD_DIR}/LLDB.framework/Resources/Python/lldb") @@ -109,7 +109,7 @@ # to liblldb.so for the Python API(hardlink on Windows). add_custom_target(finish_swig ALL VERBATIM COMMAND ${CMAKE_COMMAND} -E make_directory ${lldb_python_build_path} - DEPENDS ${lldb_scripts_dir}/lldb.py + DEPENDS ${lldb_bindings_dir}/lldb.py COMMENT "Python script sym-linking LLDB Python API") if(NOT LLDB_USE_SYSTEM_SIX) @@ -121,7 +121,7 @@ add_custom_command(TARGET finish_swig POST_BUILD VERBATIM COMMAND ${CMAKE_COMMAND} -E copy - "${lldb_scripts_dir}/lldb.py" + "${lldb_bindings_dir}/lldb.py" "${lldb_python_build_path}/__init__.py") function(create_python_package pkg_dir) @@ -131,7 +131,7 @@ endif() if(NOT ARG_NOINIT) set(init_cmd COMMAND ${PYTHON_EXECUTABLE} - "${LLDB_SOURCE_DIR}/scripts/Python/createPythonInit.py" + "${LLDB_SOURCE_DIR}/bindings/python/createPythonInit.py" "${pkg_dir}" ${ARG_FILES}) endif() add_custom_command(TARGET finish_swig POST_BUILD VERBATIM Index: lldb/bindings/CMakeLists.txt =================================================================== --- lldb/bindings/CMakeLists.txt +++ lldb/bindings/CMakeLists.txt @@ -1,4 +1,4 @@ -file(GLOB SWIG_INTERFACES interface/*.i) +file(GLOB SWIG_INTERFACES interfaces/*.i) file(GLOB_RECURSE SWIG_SOURCES *.swig) file(GLOB SWIG_HEADERS ${LLDB_SOURCE_DIR}/include/lldb/API/*.h @@ -46,7 +46,7 @@ -python -threads -o ${CMAKE_CURRENT_BINARY_DIR}/LLDBWrapPython.cpp - ${LLDB_SOURCE_DIR}/scripts/lldb.swig + ${LLDB_SOURCE_DIR}/bindings/python.swig VERBATIM COMMENT "Builds LLDB Python wrapper") @@ -67,7 +67,7 @@ -lua -w503 -o ${CMAKE_CURRENT_BINARY_DIR}/LLDBWrapLua.cpp - ${LLDB_SOURCE_DIR}/scripts/lldb_lua.swig + ${LLDB_SOURCE_DIR}/bindings/lua.swig VERBATIM COMMENT "Builds LLDB Lua wrapper") Index: lldb/bindings/interfaces.swig =================================================================== --- /dev/null +++ lldb/bindings/interfaces.swig @@ -0,0 +1,82 @@ +/* Various liblldb typedefs that SWIG needs to know about. */ +#define __extension__ /* Undefine GCC keyword to make Swig happy when processing glibc's stdint.h. */ +/* The ISO C99 standard specifies that in C++ implementations limit macros such + as INT32_MAX should only be defined if __STDC_LIMIT_MACROS is. */ +#define __STDC_LIMIT_MACROS +%include "stdint.i" + +%include "lldb/lldb-defines.h" +%include "lldb/lldb-enumerations.h" +%include "lldb/lldb-forward.h" +%include "lldb/lldb-types.h" + +/* Forward declaration of SB classes. */ +%include "lldb/API/SBDefines.h" + +/* Python interface files with docstrings. */ +%include "./interfaces/SBAddress.i" +%include "./interfaces/SBAttachInfo.i" +%include "./interfaces/SBBlock.i" +%include "./interfaces/SBBreakpoint.i" +%include "./interfaces/SBBreakpointLocation.i" +%include "./interfaces/SBBreakpointName.i" +%include "./interfaces/SBBroadcaster.i" +%include "./interfaces/SBCommandInterpreter.i" +%include "./interfaces/SBCommandReturnObject.i" +%include "./interfaces/SBCommunication.i" +%include "./interfaces/SBCompileUnit.i" +%include "./interfaces/SBData.i" +%include "./interfaces/SBDebugger.i" +%include "./interfaces/SBDeclaration.i" +%include "./interfaces/SBError.i" +%include "./interfaces/SBEvent.i" +%include "./interfaces/SBExecutionContext.i" +%include "./interfaces/SBExpressionOptions.i" +%include "./interfaces/SBFile.i" +%include "./interfaces/SBFileSpec.i" +%include "./interfaces/SBFileSpecList.i" +%include "./interfaces/SBFrame.i" +%include "./interfaces/SBFunction.i" +%include "./interfaces/SBHostOS.i" +%include "./interfaces/SBInstruction.i" +%include "./interfaces/SBInstructionList.i" +%include "./interfaces/SBLanguageRuntime.i" +%include "./interfaces/SBLaunchInfo.i" +%include "./interfaces/SBLineEntry.i" +%include "./interfaces/SBListener.i" +%include "./interfaces/SBMemoryRegionInfo.i" +%include "./interfaces/SBMemoryRegionInfoList.i" +%include "./interfaces/SBModule.i" +%include "./interfaces/SBModuleSpec.i" +%include "./interfaces/SBPlatform.i" +%include "./interfaces/SBProcess.i" +%include "./interfaces/SBProcessInfo.i" +%include "./interfaces/SBQueue.i" +%include "./interfaces/SBQueueItem.i" +%include "./interfaces/SBSection.i" +%include "./interfaces/SBSourceManager.i" +%include "./interfaces/SBStream.i" +%include "./interfaces/SBStringList.i" +%include "./interfaces/SBStructuredData.i" +%include "./interfaces/SBSymbol.i" +%include "./interfaces/SBSymbolContext.i" +%include "./interfaces/SBSymbolContextList.i" +%include "./interfaces/SBTarget.i" +%include "./interfaces/SBThread.i" +%include "./interfaces/SBThreadCollection.i" +%include "./interfaces/SBThreadPlan.i" +%include "./interfaces/SBTrace.i" +%include "./interfaces/SBTraceOptions.i" +%include "./interfaces/SBType.i" +%include "./interfaces/SBTypeCategory.i" +%include "./interfaces/SBTypeEnumMember.i" +%include "./interfaces/SBTypeFilter.i" +%include "./interfaces/SBTypeFormat.i" +%include "./interfaces/SBTypeNameSpecifier.i" +%include "./interfaces/SBTypeSummary.i" +%include "./interfaces/SBTypeSynthetic.i" +%include "./interfaces/SBUnixSignals.i" +%include "./interfaces/SBValue.i" +%include "./interfaces/SBValueList.i" +%include "./interfaces/SBVariablesOptions.i" +%include "./interfaces/SBWatchpoint.i" Index: lldb/bindings/python.swig =================================================================== --- lldb/bindings/python.swig +++ lldb/bindings/python.swig @@ -117,7 +117,7 @@ %{ #include "../source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h" -#include "../scripts/Python/python-swigsafecast.swig" +#include "../bindings/python/python-swigsafecast.swig" using namespace lldb_private; using namespace lldb_private::python; using namespace lldb; Index: lldb/docs/CMakeLists.txt =================================================================== --- lldb/docs/CMakeLists.txt +++ lldb/docs/CMakeLists.txt @@ -30,9 +30,9 @@ # Because we don't build liblldb, epydoc will complain that the import of # _lldb.so failed, but that doesn't prevent it from generating the docs. file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lldb) - get_target_property(lldb_scripts_dir swig_wrapper BINARY_DIR) + get_target_property(lldb_bindings_dir swig_wrapper BINARY_DIR) add_custom_target(lldb-python-doc-package - COMMAND "${CMAKE_COMMAND}" -E copy "${lldb_scripts_dir}/lldb.py" "${CMAKE_CURRENT_BINARY_DIR}/lldb/__init__.py" + COMMAND "${CMAKE_COMMAND}" -E copy "${lldb_bindings_dir}/lldb.py" "${CMAKE_CURRENT_BINARY_DIR}/lldb/__init__.py" COMMENT "Copying lldb.py to pretend package.") add_dependencies(lldb-python-doc-package swig_wrapper) Index: lldb/scripts/interfaces.swig =================================================================== --- lldb/scripts/interfaces.swig +++ /dev/null @@ -1,83 +0,0 @@ -/* Various liblldb typedefs that SWIG needs to know about. */ -#define __extension__ /* Undefine GCC keyword to make Swig happy when processing glibc's stdint.h. */ -/* The ISO C99 standard specifies that in C++ implementations limit macros such - as INT32_MAX should only be defined if __STDC_LIMIT_MACROS is. */ -#define __STDC_LIMIT_MACROS -%include "stdint.i" - -%include "lldb/lldb-defines.h" -%include "lldb/lldb-enumerations.h" -%include "lldb/lldb-forward.h" -%include "lldb/lldb-types.h" - -/* Forward declaration of SB classes. */ -%include "lldb/API/SBDefines.h" - -/* Python interface files with docstrings. */ -%include "./interface/SBAddress.i" -%include "./interface/SBAttachInfo.i" -%include "./interface/SBBlock.i" -%include "./interface/SBBreakpoint.i" -%include "./interface/SBBreakpointLocation.i" -%include "./interface/SBBreakpointName.i" -%include "./interface/SBBroadcaster.i" -%include "./interface/SBCommandInterpreter.i" -%include "./interface/SBCommandReturnObject.i" -%include "./interface/SBCommunication.i" -%include "./interface/SBCompileUnit.i" -%include "./interface/SBData.i" -%include "./interface/SBDebugger.i" -%include "./interface/SBDeclaration.i" -%include "./interface/SBError.i" -%include "./interface/SBEvent.i" -%include "./interface/SBExecutionContext.i" -%include "./interface/SBExpressionOptions.i" -%include "./interface/SBFileSpec.i" -%include "./interface/SBFile.i" -%include "./interface/SBFileSpecList.i" -%include "./interface/SBFrame.i" -%include "./interface/SBFunction.i" -%include "./interface/SBHostOS.i" -%include "./interface/SBInstruction.i" -%include "./interface/SBInstructionList.i" -%include "./interface/SBLanguageRuntime.i" -%include "./interface/SBLaunchInfo.i" -%include "./interface/SBLineEntry.i" -%include "./interface/SBListener.i" -%include "./interface/SBMemoryRegionInfo.i" -%include "./interface/SBMemoryRegionInfoList.i" -%include "./interface/SBModule.i" -%include "./interface/SBModuleSpec.i" -%include "./interface/SBPlatform.i" -%include "./interface/SBProcess.i" -%include "./interface/SBProcessInfo.i" -%include "./interface/SBQueue.i" -%include "./interface/SBQueueItem.i" -%include "./interface/SBSection.i" -%include "./interface/SBSourceManager.i" -%include "./interface/SBStream.i" -%include "./interface/SBStringList.i" -%include "./interface/SBStructuredData.i" -%include "./interface/SBSymbol.i" -%include "./interface/SBSymbolContext.i" -%include "./interface/SBSymbolContextList.i" -%include "./interface/SBTarget.i" -%include "./interface/SBThread.i" -%include "./interface/SBThreadCollection.i" -%include "./interface/SBThreadPlan.i" -%include "./interface/SBTrace.i" -%include "./interface/SBTraceOptions.i" -%include "./interface/SBType.i" -%include "./interface/SBTypeCategory.i" -%include "./interface/SBTypeEnumMember.i" -%include "./interface/SBTypeFilter.i" -%include "./interface/SBTypeFormat.i" -%include "./interface/SBTypeNameSpecifier.i" -%include "./interface/SBTypeSummary.i" -%include "./interface/SBTypeSynthetic.i" -%include "./interface/SBValue.i" -%include "./interface/SBValueList.i" -%include "./interface/SBVariablesOptions.i" -%include "./interface/SBWatchpoint.i" -%include "./interface/SBUnixSignals.i" - Index: lldb/source/API/CMakeLists.txt =================================================================== --- lldb/source/API/CMakeLists.txt +++ lldb/source/API/CMakeLists.txt @@ -5,13 +5,13 @@ get_property(LLDB_ALL_PLUGINS GLOBAL PROPERTY LLDB_PLUGINS) if(LLDB_ENABLE_PYTHON) - get_target_property(lldb_scripts_dir swig_wrapper BINARY_DIR) - set(lldb_python_wrapper ${lldb_scripts_dir}/LLDBWrapPython.cpp) + get_target_property(lldb_bindings_dir swig_wrapper BINARY_DIR) + set(lldb_python_wrapper ${lldb_bindings_dir}/LLDBWrapPython.cpp) endif() if(LLDB_ENABLE_LUA) - get_target_property(lldb_scripts_dir swig_wrapper_lua BINARY_DIR) - set(lldb_lua_wrapper ${lldb_scripts_dir}/LLDBWrapLua.cpp) + get_target_property(lldb_bindings_dir swig_wrapper_lua BINARY_DIR) + set(lldb_lua_wrapper ${lldb_bindings_dir}/LLDBWrapLua.cpp) endif() if(LLDB_BUILD_FRAMEWORK)