The Windows process plugin was broken up into multiple pieces a while back in order to share code between debugging live processes and minidumps (postmortem) debugging. The minidump portion was replaced by a cross-platform solution. This left the plugin split into a formerly "common" base classes and the derived classes for live debugging. This extra layer made the code harder to understand and work with. This patch simplifies these class hierarchies by rolling the live debugging concrete classes up to the base classes. Last week I posted my intent to make this change to lldb-dev, and I didn't hear any objections. This involved moving code and changing references to classes like ProcessWindowsLive to ProcessWindows. It still builds for both 32- and 64-bit, and the tests still pass on 32-bit. (Tests on 64-bit weren't passing before this refactor for unrelated reasons.) llvm-svn: 287770
220 lines
5.1 KiB
CMake
220 lines
5.1 KiB
CMake
set( LLDB_USED_LIBS
|
|
lldbBase
|
|
lldbBreakpoint
|
|
lldbCommands
|
|
lldbDataFormatters
|
|
lldbHost
|
|
lldbCore
|
|
lldbExpression
|
|
lldbInitialization
|
|
lldbInterpreter
|
|
lldbSymbol
|
|
lldbTarget
|
|
lldbUtility
|
|
|
|
# Plugins
|
|
lldbPluginDisassemblerLLVM
|
|
lldbPluginSymbolFileDWARF
|
|
lldbPluginSymbolFilePDB
|
|
lldbPluginSymbolFileSymtab
|
|
lldbPluginDynamicLoaderStatic
|
|
lldbPluginDynamicLoaderPosixDYLD
|
|
lldbPluginDynamicLoaderHexagonDYLD
|
|
lldbPluginDynamicLoaderWindowsDYLD
|
|
|
|
lldbPluginCPlusPlusLanguage
|
|
lldbPluginGoLanguage
|
|
lldbPluginJavaLanguage
|
|
lldbPluginObjCLanguage
|
|
lldbPluginObjCPlusPlusLanguage
|
|
lldbPluginOCamlLanguage
|
|
|
|
lldbPluginObjectFileELF
|
|
lldbPluginObjectFileJIT
|
|
lldbPluginSymbolVendorELF
|
|
lldbPluginObjectContainerBSDArchive
|
|
lldbPluginObjectContainerMachOArchive
|
|
lldbPluginProcessGDBRemote
|
|
lldbPluginProcessUtility
|
|
lldbPluginPlatformAndroid
|
|
lldbPluginPlatformGDB
|
|
lldbPluginPlatformFreeBSD
|
|
lldbPluginPlatformKalimba
|
|
lldbPluginPlatformLinux
|
|
lldbPluginPlatformNetBSD
|
|
lldbPluginPlatformPOSIX
|
|
lldbPluginPlatformWindows
|
|
lldbPluginObjectContainerMachOArchive
|
|
lldbPluginObjectContainerBSDArchive
|
|
lldbPluginPlatformMacOSX
|
|
lldbPluginStructuredDataDarwinLog
|
|
lldbPluginDynamicLoaderMacOSXDYLD
|
|
lldbPluginUnwindAssemblyInstEmulation
|
|
lldbPluginUnwindAssemblyX86
|
|
lldbPluginAppleObjCRuntime
|
|
lldbPluginRenderScriptRuntime
|
|
lldbPluginLanguageRuntimeGo
|
|
lldbPluginLanguageRuntimeJava
|
|
lldbPluginCXXItaniumABI
|
|
lldbPluginABIMacOSX_arm
|
|
lldbPluginABIMacOSX_arm64
|
|
lldbPluginABIMacOSX_i386
|
|
lldbPluginABISysV_arm
|
|
lldbPluginABISysV_arm64
|
|
lldbPluginABISysV_i386
|
|
lldbPluginABISysV_x86_64
|
|
lldbPluginABISysV_hexagon
|
|
lldbPluginABISysV_ppc
|
|
lldbPluginABISysV_ppc64
|
|
lldbPluginABISysV_mips
|
|
lldbPluginABISysV_mips64
|
|
lldbPluginABISysV_s390x
|
|
lldbPluginInstructionARM
|
|
lldbPluginInstructionARM64
|
|
lldbPluginInstructionMIPS
|
|
lldbPluginInstructionMIPS64
|
|
lldbPluginObjectFilePECOFF
|
|
lldbPluginOSGo
|
|
lldbPluginOSPython
|
|
lldbPluginMemoryHistoryASan
|
|
lldbPluginInstrumentationRuntimeAddressSanitizer
|
|
lldbPluginInstrumentationRuntimeThreadSanitizer
|
|
lldbPluginSystemRuntimeMacOSX
|
|
lldbPluginProcessElfCore
|
|
lldbPluginProcessMinidump
|
|
lldbPluginJITLoaderGDB
|
|
lldbPluginExpressionParserClang
|
|
lldbPluginExpressionParserGo
|
|
)
|
|
|
|
# Windows-only libraries
|
|
if ( CMAKE_SYSTEM_NAME MATCHES "Windows" )
|
|
list(APPEND LLDB_USED_LIBS
|
|
lldbPluginProcessWindowsCommon
|
|
Ws2_32
|
|
Rpcrt4
|
|
)
|
|
endif ()
|
|
|
|
# Linux-only libraries
|
|
if ( CMAKE_SYSTEM_NAME MATCHES "Linux" )
|
|
list(APPEND LLDB_USED_LIBS
|
|
lldbPluginProcessLinux
|
|
lldbPluginProcessPOSIX
|
|
)
|
|
endif ()
|
|
|
|
# FreeBSD-only libraries
|
|
if ( CMAKE_SYSTEM_NAME MATCHES "FreeBSD" )
|
|
list(APPEND LLDB_USED_LIBS
|
|
lldbPluginProcessFreeBSD
|
|
lldbPluginProcessPOSIX
|
|
)
|
|
endif ()
|
|
|
|
# NetBSD-only libraries
|
|
if ( CMAKE_SYSTEM_NAME MATCHES "NetBSD" )
|
|
list(APPEND LLDB_USED_LIBS
|
|
lldbPluginProcessPOSIX
|
|
)
|
|
endif ()
|
|
|
|
# Darwin-only libraries
|
|
if ( CMAKE_SYSTEM_NAME MATCHES "Darwin" )
|
|
list(APPEND LLDB_USED_LIBS
|
|
lldbPluginDynamicLoaderDarwinKernel
|
|
lldbPluginObjectFileMachO
|
|
lldbPluginProcessMachCore
|
|
lldbPluginProcessMacOSXKernel
|
|
lldbPluginSymbolVendorMacOSX
|
|
)
|
|
endif()
|
|
|
|
set( CLANG_USED_LIBS
|
|
clangAnalysis
|
|
clangAST
|
|
clangBasic
|
|
clangCodeGen
|
|
clangDriver
|
|
clangEdit
|
|
clangFrontend
|
|
clangLex
|
|
clangParse
|
|
clangRewrite
|
|
clangRewriteFrontend
|
|
clangSema
|
|
clangSerialization
|
|
)
|
|
|
|
set(LLDB_SYSTEM_LIBS)
|
|
if (NOT CMAKE_SYSTEM_NAME MATCHES "Windows" AND NOT __ANDROID_NDK__)
|
|
if (NOT LLDB_DISABLE_LIBEDIT)
|
|
list(APPEND LLDB_SYSTEM_LIBS edit)
|
|
endif()
|
|
if (NOT LLDB_DISABLE_CURSES)
|
|
list(APPEND LLDB_SYSTEM_LIBS ${CURSES_LIBRARIES})
|
|
if(LLVM_ENABLE_TERMINFO AND HAVE_TERMINFO)
|
|
list(APPEND LLDB_SYSTEM_LIBS ${TERMINFO_LIBS})
|
|
endif()
|
|
endif()
|
|
endif()
|
|
|
|
if (NOT HAVE_CXX_ATOMICS64_WITHOUT_LIB )
|
|
list(APPEND LLDB_SYSTEM_LIBS atomic)
|
|
endif()
|
|
|
|
# On FreeBSD/NetBSD backtrace() is provided by libexecinfo, not libc.
|
|
if (CMAKE_SYSTEM_NAME MATCHES "FreeBSD" OR CMAKE_SYSTEM_NAME MATCHES "NetBSD")
|
|
list(APPEND LLDB_SYSTEM_LIBS execinfo)
|
|
endif()
|
|
|
|
if (NOT LLDB_DISABLE_PYTHON AND NOT LLVM_BUILD_STATIC)
|
|
list(APPEND LLDB_SYSTEM_LIBS ${PYTHON_LIBRARIES})
|
|
endif()
|
|
|
|
list(APPEND LLDB_SYSTEM_LIBS ${system_libs})
|
|
|
|
if (LLVM_BUILD_STATIC)
|
|
if (NOT LLDB_DISABLE_PYTHON)
|
|
list(APPEND LLDB_SYSTEM_LIBS python2.7 util)
|
|
endif()
|
|
if (NOT LLDB_DISABLE_CURSES)
|
|
list(APPEND LLDB_SYSTEM_LIBS gpm)
|
|
endif()
|
|
endif()
|
|
|
|
set(LLVM_LINK_COMPONENTS
|
|
${LLVM_TARGETS_TO_BUILD}
|
|
interpreter
|
|
asmparser
|
|
bitreader
|
|
bitwriter
|
|
codegen
|
|
demangle
|
|
ipo
|
|
selectiondag
|
|
bitreader
|
|
mc
|
|
mcjit
|
|
core
|
|
mcdisassembler
|
|
executionengine
|
|
runtimedyld
|
|
option
|
|
support
|
|
coverage
|
|
target
|
|
)
|
|
|
|
if ( NOT LLDB_DISABLE_PYTHON )
|
|
set_source_files_properties(${LLDB_WRAP_PYTHON} PROPERTIES GENERATED 1)
|
|
if (CLANG_CL)
|
|
set_source_files_properties(${LLDB_WRAP_PYTHON} PROPERTIES COMPILE_FLAGS -Wno-unused-function)
|
|
endif()
|
|
if (LLVM_COMPILER_IS_GCC_COMPATIBLE AND
|
|
NOT "${CMAKE_SYSTEM_NAME}" MATCHES "Darwin")
|
|
set_property(SOURCE ${LLDB_WRAP_PYTHON}
|
|
APPEND_STRING PROPERTY COMPILE_FLAGS " -Wno-sequence-point -Wno-cast-qual")
|
|
endif ()
|
|
endif()
|