JDevlieghere created this revision.
JDevlieghere added reviewers: labath, xiaobai, mgorny.
Herald added a subscriber: abidh.
Herald added a project: LLDB.
JDevlieghere updated this revision to Diff 233456.
This matches the naming scheme used by LLVM.
https://reviews.llvm.org/D71377
Files:
lldb/cmake/modules/LLDBConfig.cmake
lldb/docs/resources/build.rst
lldb/include/lldb/Host/Config.h.cmake
lldb/source/API/SBDebugger.cpp
lldb/source/Commands/CommandObjectGUI.cpp
lldb/source/Core/CMakeLists.txt
lldb/source/Core/IOHandlerCursesGUI.cpp
Index: lldb/source/Core/IOHandlerCursesGUI.cpp
===================================================================
--- lldb/source/Core/IOHandlerCursesGUI.cpp
+++ lldb/source/Core/IOHandlerCursesGUI.cpp
@@ -9,7 +9,7 @@
#include "lldb/Core/IOHandlerCursesGUI.h"
#include "lldb/Host/Config.h"
-#ifndef LLDB_DISABLE_CURSES
+#ifdef LLDB_ENABLE_CURSES
#include <curses.h>
#include <panel.h>
#endif
@@ -31,7 +31,7 @@
#include "lldb/Interpreter/CommandCompletions.h"
#include "lldb/Interpreter/CommandInterpreter.h"
-#ifndef LLDB_DISABLE_CURSES
+#ifdef 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
+#ifdef 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
Index: lldb/source/Core/CMakeLists.txt
===================================================================
--- lldb/source/Core/CMakeLists.txt
+++ 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()
Index: lldb/source/Commands/CommandObjectGUI.cpp
===================================================================
--- lldb/source/Commands/CommandObjectGUI.cpp
+++ lldb/source/Commands/CommandObjectGUI.cpp
@@ -26,7 +26,7 @@
CommandObjectGUI::~CommandObjectGUI() {}
bool CommandObjectGUI::DoExecute(Args &args, CommandReturnObject &result) {
-#ifndef LLDB_DISABLE_CURSES
+#ifdef LLDB_ENABLE_CURSES
if (args.GetArgumentCount() == 0) {
Debugger &debugger = GetDebugger();
Index: lldb/source/API/SBDebugger.cpp
===================================================================
--- lldb/source/API/SBDebugger.cpp
+++ lldb/source/API/SBDebugger.cpp
@@ -683,9 +683,10 @@
AddBoolConfigEntry(
*config_up, "xml", XMLDocument::XMLEnabled(),
"A boolean value that indicates if XML support is enabled in LLDB");
+#ifdef LLDB_ENABLE_CURSES
+ bool have_curses = false;
+#else
bool have_curses = true;
-#ifdef LLDB_DISABLE_CURSES
- have_curses = false;
#endif
AddBoolConfigEntry(
*config_up, "curses", have_curses,
Index: lldb/include/lldb/Host/Config.h.cmake
===================================================================
--- lldb/include/lldb/Host/Config.h.cmake
+++ lldb/include/lldb/Host/Config.h.cmake
@@ -37,7 +37,7 @@
#cmakedefine LLDB_ENABLE_LIBXML2
-#cmakedefine LLDB_DISABLE_CURSES
+#cmakedefine LLDB_ENABLE_CURSES
#cmakedefine LLDB_DISABLE_LIBEDIT
Index: lldb/docs/resources/build.rst
===================================================================
--- lldb/docs/resources/build.rst
+++ 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=1
-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=<path-to-host>/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
Index: lldb/cmake/modules/LLDBConfig.cmake
===================================================================
--- lldb/cmake/modules/LLDBConfig.cmake
+++ 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)
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits