2014-08-16 07:50:36 +08:00
|
|
|
macro(add_host_subdirectory group)
|
|
|
|
list(APPEND HOST_SOURCES ${ARGN})
|
2014-08-19 00:47:33 +08:00
|
|
|
source_group(${group} FILES ${ARGN})
|
2014-08-16 07:50:36 +08:00
|
|
|
endmacro()
|
|
|
|
|
|
|
|
add_host_subdirectory(common
|
|
|
|
common/Condition.cpp
|
|
|
|
common/File.cpp
|
|
|
|
common/FileCache.cpp
|
|
|
|
common/FileSpec.cpp
|
2015-02-21 02:34:03 +08:00
|
|
|
common/FileSystem.cpp
|
2014-08-16 07:50:36 +08:00
|
|
|
common/Host.cpp
|
2014-08-20 01:18:29 +08:00
|
|
|
common/HostInfoBase.cpp
|
2014-09-10 04:54:56 +08:00
|
|
|
common/HostNativeThreadBase.cpp
|
2014-09-12 06:22:16 +08:00
|
|
|
common/HostProcess.cpp
|
2014-09-10 04:54:56 +08:00
|
|
|
common/HostThread.cpp
|
2014-08-16 07:50:36 +08:00
|
|
|
common/IOObject.cpp
|
2015-05-07 23:28:49 +08:00
|
|
|
common/LockFileBase.cpp
|
2014-08-16 07:50:36 +08:00
|
|
|
common/Mutex.cpp
|
2014-10-15 05:55:08 +08:00
|
|
|
common/MonitoringProcessLauncher.cpp
|
2014-08-16 07:50:36 +08:00
|
|
|
common/NativeBreakpoint.cpp
|
|
|
|
common/NativeBreakpointList.cpp
|
2015-02-03 09:51:47 +08:00
|
|
|
common/NativeWatchpointList.cpp
|
2014-08-16 07:50:36 +08:00
|
|
|
common/NativeProcessProtocol.cpp
|
2015-02-03 09:51:38 +08:00
|
|
|
common/NativeRegisterContext.cpp
|
|
|
|
common/NativeRegisterContextRegisterInfo.cpp
|
2014-08-16 07:50:36 +08:00
|
|
|
common/NativeThreadProtocol.cpp
|
|
|
|
common/OptionParser.cpp
|
2015-01-14 07:19:40 +08:00
|
|
|
common/PipeBase.cpp
|
2014-08-16 07:50:36 +08:00
|
|
|
common/ProcessRunLock.cpp
|
|
|
|
common/Socket.cpp
|
|
|
|
common/SocketAddress.cpp
|
|
|
|
common/SoftwareBreakpoint.cpp
|
2015-01-16 04:08:35 +08:00
|
|
|
common/StringConvert.cpp
|
2014-08-16 07:50:36 +08:00
|
|
|
common/Symbols.cpp
|
|
|
|
common/Terminal.cpp
|
2014-09-10 04:54:56 +08:00
|
|
|
common/ThisThread.cpp
|
|
|
|
common/ThreadLauncher.cpp
|
2014-08-16 07:50:36 +08:00
|
|
|
common/TimeValue.cpp
|
2015-05-27 02:00:51 +08:00
|
|
|
common/XML.cpp
|
2014-08-16 07:50:36 +08:00
|
|
|
)
|
2013-09-25 18:37:32 +08:00
|
|
|
|
2014-11-18 05:31:18 +08:00
|
|
|
if (NOT LLDB_DISABLE_LIBEDIT)
|
|
|
|
add_host_subdirectory(common
|
|
|
|
common/Editline.cpp
|
|
|
|
)
|
2014-11-08 09:41:49 +08:00
|
|
|
endif()
|
|
|
|
|
2014-10-07 05:22:36 +08:00
|
|
|
add_host_subdirectory(posix
|
|
|
|
posix/ConnectionFileDescriptorPosix.cpp
|
|
|
|
)
|
|
|
|
|
2014-08-16 06:04:21 +08:00
|
|
|
if (CMAKE_SYSTEM_NAME MATCHES "Windows")
|
2014-08-16 07:50:36 +08:00
|
|
|
add_host_subdirectory(windows
|
2014-09-10 04:54:56 +08:00
|
|
|
windows/Condition.cpp
|
2014-10-07 05:23:09 +08:00
|
|
|
windows/ConnectionGenericFileWindows.cpp
|
2014-09-10 04:54:56 +08:00
|
|
|
windows/EditLineWin.cpp
|
2014-08-16 07:50:36 +08:00
|
|
|
windows/FileSystem.cpp
|
|
|
|
windows/Host.cpp
|
2014-08-20 01:18:29 +08:00
|
|
|
windows/HostInfoWindows.cpp
|
2014-08-28 04:15:30 +08:00
|
|
|
windows/HostProcessWindows.cpp
|
2014-09-10 04:54:56 +08:00
|
|
|
windows/HostThreadWindows.cpp
|
2015-05-07 23:28:49 +08:00
|
|
|
windows/LockFileWindows.cpp
|
2014-08-16 07:50:36 +08:00
|
|
|
windows/Mutex.cpp
|
2014-10-09 04:38:41 +08:00
|
|
|
windows/PipeWindows.cpp
|
2014-10-15 05:55:08 +08:00
|
|
|
windows/ProcessLauncherWindows.cpp
|
2014-09-10 04:54:56 +08:00
|
|
|
windows/ProcessRunLock.cpp
|
|
|
|
windows/ThisThread.cpp
|
2014-08-16 07:50:36 +08:00
|
|
|
windows/Windows.cpp
|
2015-02-18 06:20:20 +08:00
|
|
|
windows/getopt/GetOptInc.cpp
|
2014-08-16 07:50:36 +08:00
|
|
|
)
|
2014-08-16 06:04:21 +08:00
|
|
|
else()
|
2014-08-16 07:50:36 +08:00
|
|
|
add_host_subdirectory(posix
|
|
|
|
posix/FileSystem.cpp
|
2014-08-20 01:18:29 +08:00
|
|
|
posix/HostInfoPosix.cpp
|
2014-08-28 04:15:30 +08:00
|
|
|
posix/HostProcessPosix.cpp
|
2014-09-10 04:54:56 +08:00
|
|
|
posix/HostThreadPosix.cpp
|
2015-05-07 23:28:49 +08:00
|
|
|
posix/LockFilePosix.cpp
|
Introduce a MainLoop class and switch llgs to use it
Summary:
This is the first part of our effort to make llgs single threaded. Currently, llgs consists of
about three threads and the synchronisation between them is a major source of latency when
debugging linux and android applications.
In order to be able to go single threaded, we must have the ability to listen for events from
multiple sources (primarily, client commands coming over the network and debug events from the
inferior) and perform necessary actions. For this reason I introduce the concept of a MainLoop.
A main loop has the ability to register callback's which will be invoked upon receipt of certain
events. MainLoopPosix has the ability to listen for file descriptors and signals.
For the moment, I have merely made the GDBRemoteCommunicationServerLLGS class use MainLoop
instead of waiting on the network socket directly, but the other threads still remain. In the
followup patches I indend to migrate NativeProcessLinux to this class and remove the remaining
threads.
Reviewers: ovyalov, clayborg, amccarth, zturner, emaste
Subscribers: tberghammer, lldb-commits
Differential Revision: http://reviews.llvm.org/D11066
llvm-svn: 242018
2015-07-13 18:44:55 +08:00
|
|
|
posix/MainLoopPosix.cpp
|
2014-10-09 04:38:41 +08:00
|
|
|
posix/PipePosix.cpp
|
2014-08-16 07:50:36 +08:00
|
|
|
)
|
|
|
|
|
2015-02-13 02:13:44 +08:00
|
|
|
if (NOT __ANDROID_NDK__)
|
|
|
|
add_host_subdirectory(posix
|
|
|
|
posix/ProcessLauncherPosix.cpp
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2014-08-16 07:50:36 +08:00
|
|
|
if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
|
|
|
include_directories(SYSTEM ${LIBXML2_INCLUDE_DIR})
|
|
|
|
add_host_subdirectory(macosx
|
|
|
|
macosx/Host.mm
|
2014-09-03 05:10:23 +08:00
|
|
|
macosx/HostInfoMacOSX.mm
|
2014-09-10 04:54:56 +08:00
|
|
|
macosx/HostThreadMacOSX.mm
|
|
|
|
macosx/Symbols.cpp
|
|
|
|
macosx/ThisThread.cpp
|
2014-08-16 07:50:36 +08:00
|
|
|
macosx/cfcpp/CFCBundle.cpp
|
|
|
|
macosx/cfcpp/CFCData.cpp
|
|
|
|
macosx/cfcpp/CFCMutableArray.cpp
|
|
|
|
macosx/cfcpp/CFCMutableDictionary.cpp
|
|
|
|
macosx/cfcpp/CFCMutableSet.cpp
|
|
|
|
macosx/cfcpp/CFCString.cpp
|
|
|
|
)
|
|
|
|
|
|
|
|
elseif (CMAKE_SYSTEM_NAME MATCHES "Linux")
|
2014-11-08 09:41:49 +08:00
|
|
|
if (__ANDROID_NDK__)
|
|
|
|
add_host_subdirectory(android
|
2015-02-13 02:13:44 +08:00
|
|
|
android/HostInfoAndroid.cpp
|
2015-05-12 09:10:56 +08:00
|
|
|
android/LibcGlue.cpp
|
2015-02-13 02:13:44 +08:00
|
|
|
android/ProcessLauncherAndroid.cpp
|
2014-11-08 09:41:49 +08:00
|
|
|
linux/Host.cpp
|
|
|
|
linux/HostInfoLinux.cpp
|
|
|
|
linux/HostThreadLinux.cpp
|
2015-06-29 17:18:17 +08:00
|
|
|
linux/LibcGlue.cpp
|
2014-11-08 09:41:49 +08:00
|
|
|
linux/ThisThread.cpp
|
|
|
|
)
|
|
|
|
else()
|
|
|
|
add_host_subdirectory(linux
|
|
|
|
linux/Host.cpp
|
|
|
|
linux/HostInfoLinux.cpp
|
|
|
|
linux/HostThreadLinux.cpp
|
2015-06-29 17:18:17 +08:00
|
|
|
linux/LibcGlue.cpp
|
2014-11-08 09:41:49 +08:00
|
|
|
linux/ThisThread.cpp
|
|
|
|
)
|
|
|
|
endif()
|
2014-08-16 07:50:36 +08:00
|
|
|
elseif (CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
|
|
|
|
add_host_subdirectory(freebsd
|
|
|
|
freebsd/Host.cpp
|
2014-08-20 01:18:29 +08:00
|
|
|
freebsd/HostInfoFreeBSD.cpp
|
2014-09-10 04:54:56 +08:00
|
|
|
freebsd/HostThreadFreeBSD.cpp
|
|
|
|
freebsd/ThisThread.cpp
|
2014-08-16 07:50:36 +08:00
|
|
|
)
|
2014-08-16 06:04:21 +08:00
|
|
|
endif()
|
2013-09-25 18:37:32 +08:00
|
|
|
endif()
|
2014-08-16 07:50:36 +08:00
|
|
|
|
|
|
|
add_lldb_library(lldbHost ${HOST_SOURCES})
|