diff --git a/lldb/cmake/modules/LLDBConfig.cmake b/lldb/cmake/modules/LLDBConfig.cmake --- a/lldb/cmake/modules/LLDBConfig.cmake +++ b/lldb/cmake/modules/LLDBConfig.cmake @@ -25,27 +25,27 @@ endif() set(default_disable_python OFF) -set(default_disable_curses OFF) set(default_disable_libedit OFF) +set(default_enable_curses ON) if(DEFINED LLVM_ENABLE_LIBEDIT AND NOT LLVM_ENABLE_LIBEDIT) set(default_disable_libedit ON) endif() if(CMAKE_SYSTEM_NAME MATCHES "Windows") - set(default_disable_curses ON) set(default_disable_libedit ON) + set(default_enable_curses OFF) elseif(CMAKE_SYSTEM_NAME MATCHES "Android") set(default_disable_python ON) - set(default_disable_curses ON) set(default_disable_libedit ON) + set(default_enable_curses OFF) elseif(IOS) set(default_disable_python ON) endif() option(LLDB_DISABLE_PYTHON "Disable Python scripting integration." ${default_disable_python}) -option(LLDB_DISABLE_CURSES "Disable Curses integration." ${default_disable_curses}) option(LLDB_DISABLE_LIBEDIT "Disable the use of editline." ${default_disable_libedit}) +option(LLDB_ENABLE_CURSES "Disable Curses integration." ${default_enable_curses}) option(LLDB_RELOCATABLE_PYTHON "Use the PYTHONHOME environment variable to locate Python." OFF) 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) @@ -485,7 +485,7 @@ set(LLDB_CAN_USE_DEBUGSERVER OFF) endif() -if (NOT LLDB_DISABLE_CURSES) +if (LLDB_ENABLE_CURSES) find_package(Curses REQUIRED) find_library(CURSES_PANEL_LIBRARY NAMES panel DOC "The curses panel library") if (NOT CURSES_PANEL_LIBRARY) diff --git a/lldb/docs/resources/build.rst b/lldb/docs/resources/build.rst --- a/lldb/docs/resources/build.rst +++ b/lldb/docs/resources/build.rst @@ -263,7 +263,7 @@ Current stable NetBSD release doesn't ship with libpanel(3), therefore it's required to disable curses(3) support with the -``-DLLDB_DISABLE_CURSES:BOOL=TRUE`` option. To make sure check if +``-DLLDB_ENABLE_CURSES:BOOL=FALSE`` option. To make sure check if ``/usr/include/panel.h`` exists in your system. macOS @@ -402,8 +402,8 @@ :: -DLLDB_DISABLE_LIBEDIT=1 - -DLLDB_DISABLE_CURSES=1 -DLLDB_DISABLE_PYTHON=1 + -DLLDB_ENABLE_CURSES=0 -DLLVM_ENABLE_TERMINFO=0 In this case you, will often not need anything other than the standard C and @@ -455,7 +455,7 @@ -DCLANG_TABLEGEN=/bin/clang-tblgen \ -DLLDB_DISABLE_PYTHON=1 \ -DLLDB_DISABLE_LIBEDIT=1 \ - -DLLDB_DISABLE_CURSES=1 + -DLLDB_ENABLE_CURSES=0 An alternative (and recommended) way to compile LLDB is with clang. Unfortunately, clang is not able to find all the include paths necessary for a diff --git a/lldb/include/lldb/Host/Config.h.cmake b/lldb/include/lldb/Host/Config.h.cmake --- a/lldb/include/lldb/Host/Config.h.cmake +++ b/lldb/include/lldb/Host/Config.h.cmake @@ -35,9 +35,9 @@ #cmakedefine01 LLDB_ENABLE_LZMA -#cmakedefine LLDB_ENABLE_LIBXML2 +#cmakedefine01 LLDB_ENABLE_CURSES -#cmakedefine LLDB_DISABLE_CURSES +#cmakedefine LLDB_ENABLE_LIBXML2 #cmakedefine LLDB_DISABLE_LIBEDIT diff --git a/lldb/source/API/SBDebugger.cpp b/lldb/source/API/SBDebugger.cpp --- a/lldb/source/API/SBDebugger.cpp +++ b/lldb/source/API/SBDebugger.cpp @@ -683,12 +683,8 @@ AddBoolConfigEntry( *config_up, "xml", XMLDocument::XMLEnabled(), "A boolean value that indicates if XML support is enabled in LLDB"); - bool have_curses = true; -#ifdef LLDB_DISABLE_CURSES - have_curses = false; -#endif AddBoolConfigEntry( - *config_up, "curses", have_curses, + *config_up, "curses", LLDB_ENABLE_CURSES, "A boolean value that indicates if curses support is enabled in LLDB"); AddLLVMTargets(*config_up); diff --git a/lldb/source/Commands/CommandObjectGUI.cpp b/lldb/source/Commands/CommandObjectGUI.cpp --- a/lldb/source/Commands/CommandObjectGUI.cpp +++ b/lldb/source/Commands/CommandObjectGUI.cpp @@ -26,7 +26,7 @@ CommandObjectGUI::~CommandObjectGUI() {} bool CommandObjectGUI::DoExecute(Args &args, CommandReturnObject &result) { -#ifndef LLDB_DISABLE_CURSES +#if LLDB_ENABLE_CURSES if (args.GetArgumentCount() == 0) { Debugger &debugger = GetDebugger(); diff --git a/lldb/source/Core/CMakeLists.txt b/lldb/source/Core/CMakeLists.txt --- a/lldb/source/Core/CMakeLists.txt +++ b/lldb/source/Core/CMakeLists.txt @@ -9,7 +9,7 @@ set(LLDB_CURSES_LIBS) set(LLDB_LIBEDIT_LIBS) -if (NOT LLDB_DISABLE_CURSES) +if (LLDB_ENABLE_CURSES) list(APPEND LLDB_CURSES_LIBS ${CURSES_LIBRARIES} ${CURSES_PANEL_LIBRARY}) if(LLVM_ENABLE_TERMINFO AND HAVE_TERMINFO) list(APPEND LLDB_CURSES_LIBS ${TERMINFO_LIBS}) @@ -102,6 +102,6 @@ target_include_directories(lldbCore PRIVATE ${libedit_INCLUDE_DIRS}) endif() -if (NOT LLDB_DISABLE_CURSES) +if (LLDB_ENABLE_CURSES) target_include_directories(lldbCore PRIVATE ${CURSES_INCLUDE_DIR}) endif() diff --git a/lldb/source/Core/IOHandlerCursesGUI.cpp b/lldb/source/Core/IOHandlerCursesGUI.cpp --- a/lldb/source/Core/IOHandlerCursesGUI.cpp +++ b/lldb/source/Core/IOHandlerCursesGUI.cpp @@ -9,7 +9,7 @@ #include "lldb/Core/IOHandlerCursesGUI.h" #include "lldb/Host/Config.h" -#ifndef LLDB_DISABLE_CURSES +#if LLDB_ENABLE_CURSES #include #include #endif @@ -31,7 +31,7 @@ #include "lldb/Interpreter/CommandCompletions.h" #include "lldb/Interpreter/CommandInterpreter.h" -#ifndef LLDB_DISABLE_CURSES +#if LLDB_ENABLE_CURSES #include "lldb/Breakpoint/BreakpointLocation.h" #include "lldb/Core/Module.h" #include "lldb/Core/ValueObject.h" @@ -74,7 +74,7 @@ using llvm::StringRef; // we may want curses to be disabled for some builds for instance, windows -#ifndef LLDB_DISABLE_CURSES +#if LLDB_ENABLE_CURSES #define KEY_RETURN 10 #define KEY_ESCAPE 27 @@ -4064,4 +4064,4 @@ void IOHandlerCursesGUI::GotEOF() {} -#endif // LLDB_DISABLE_CURSES +#endif // LLDB_ENABLE_CURSES