Split the read thread support from Communication into a dedicated ThreadedCommunication subclass. The read thread support is used only by a subset of Communication consumers, and it adds a lot of complexity to the base class. Furthermore, having a dedicated subclass makes it clear whether a particular consumer needs to account for the possibility of read thread being running or not. The modules currently calling `StartReadThread()` are updated to use `ThreadedCommunication`. The remaining modules use the simplified `Communication` class. `SBCommunication` is changed to use `ThreadedCommunication` in order to avoid changing the public API. `CommunicationKDP` is updated in order to (hopefully) compile with the new code. However, I do not have a Darwin box to test it, so I've limited the changes to the bare minimum. `GDBRemoteCommunication` is updated to become a `Broadcaster` directly. Since it does not inherit from `ThreadedCommunication`, its event support no longer collides with the one used for read thread and can be implemented cleanly. The support for `eBroadcastBitReadThreadDidExit` is removed from the code -- since the read thread was not used, this event was never reported. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.llvm.org/D133251
110 lines
2.4 KiB
CMake
110 lines
2.4 KiB
CMake
lldb_tablegen(CoreProperties.inc -gen-lldb-property-defs
|
|
SOURCE CoreProperties.td
|
|
TARGET LLDBCorePropertiesGen)
|
|
|
|
lldb_tablegen(CorePropertiesEnum.inc -gen-lldb-property-enum-defs
|
|
SOURCE CoreProperties.td
|
|
TARGET LLDBCorePropertiesEnumGen)
|
|
|
|
set(LLDB_CURSES_LIBS)
|
|
set(LLDB_LIBEDIT_LIBS)
|
|
|
|
if (LLDB_ENABLE_CURSES)
|
|
list(APPEND LLDB_CURSES_LIBS ${CURSES_LIBRARIES} ${PANEL_LIBRARIES})
|
|
if(LLVM_ENABLE_TERMINFO)
|
|
list(APPEND LLDB_CURSES_LIBS ${TERMINFO_LIB})
|
|
endif()
|
|
if (LLVM_BUILD_STATIC)
|
|
list(APPEND LLDB_CURSES_LIBS gpm)
|
|
endif()
|
|
endif()
|
|
|
|
add_lldb_library(lldbCore
|
|
Address.cpp
|
|
AddressRange.cpp
|
|
AddressResolver.cpp
|
|
AddressResolverFileLine.cpp
|
|
Communication.cpp
|
|
DataFileCache.cpp
|
|
Debugger.cpp
|
|
DebuggerEvents.cpp
|
|
Declaration.cpp
|
|
Disassembler.cpp
|
|
DumpDataExtractor.cpp
|
|
DumpRegisterValue.cpp
|
|
DynamicLoader.cpp
|
|
EmulateInstruction.cpp
|
|
FileLineResolver.cpp
|
|
FileSpecList.cpp
|
|
FormatEntity.cpp
|
|
Highlighter.cpp
|
|
IOHandler.cpp
|
|
IOHandlerCursesGUI.cpp
|
|
Mangled.cpp
|
|
Module.cpp
|
|
ModuleChild.cpp
|
|
ModuleList.cpp
|
|
Opcode.cpp
|
|
PluginManager.cpp
|
|
Progress.cpp
|
|
RichManglingContext.cpp
|
|
SearchFilter.cpp
|
|
Section.cpp
|
|
SourceLocationSpec.cpp
|
|
SourceManager.cpp
|
|
StreamAsynchronousIO.cpp
|
|
StreamFile.cpp
|
|
ThreadedCommunication.cpp
|
|
UserSettingsController.cpp
|
|
Value.cpp
|
|
ValueObject.cpp
|
|
ValueObjectCast.cpp
|
|
ValueObjectChild.cpp
|
|
ValueObjectConstResult.cpp
|
|
ValueObjectConstResultCast.cpp
|
|
ValueObjectConstResultChild.cpp
|
|
ValueObjectConstResultImpl.cpp
|
|
ValueObjectDynamicValue.cpp
|
|
ValueObjectList.cpp
|
|
ValueObjectMemory.cpp
|
|
ValueObjectRegister.cpp
|
|
ValueObjectSyntheticFilter.cpp
|
|
ValueObjectUpdater.cpp
|
|
ValueObjectVariable.cpp
|
|
|
|
DEPENDS
|
|
clang-tablegen-targets
|
|
|
|
LINK_LIBS
|
|
lldbBreakpoint
|
|
lldbDataFormatters
|
|
lldbExpression
|
|
lldbHost
|
|
lldbInterpreter
|
|
lldbSymbol
|
|
lldbTarget
|
|
lldbUtility
|
|
lldbPluginCPlusPlusLanguage
|
|
lldbPluginObjCLanguage
|
|
${LLDB_CURSES_LIBS}
|
|
|
|
CLANG_LIBS
|
|
clangDriver
|
|
|
|
LINK_COMPONENTS
|
|
Support
|
|
Demangle
|
|
)
|
|
|
|
add_dependencies(lldbCore
|
|
LLDBCorePropertiesGen
|
|
LLDBCorePropertiesEnumGen)
|
|
|
|
# Needed to properly resolve references in a debug build.
|
|
# TODO: Remove once we have better layering
|
|
set_target_properties(lldbCore PROPERTIES LINK_INTERFACE_MULTIPLICITY 5)
|
|
|
|
if (LLDB_ENABLE_CURSES)
|
|
target_include_directories(lldbCore PRIVATE ${CURSES_INCLUDE_DIRS})
|
|
endif()
|