[Lldb-commits] [lldb] r367138 - [TableGen] Move interpreter properties into a separate file (NFC)
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Fri Jul 26 11:14:04 PDT 2019
Author: jdevlieghere
Date: Fri Jul 26 11:14:04 2019
New Revision: 367138
URL: http://llvm.org/viewvc/llvm-project?rev=367138&view=rev
Log:
[TableGen] Move interpreter properties into a separate file (NFC)
With the plugins having their own tablgen file, it makes sense to split
off the interpreter properties as well.
Added:
lldb/trunk/source/Interpreter/Properties.td
Modified:
lldb/trunk/CMakeLists.txt
lldb/trunk/include/lldb/Core/Properties.td
lldb/trunk/source/Interpreter/CMakeLists.txt
lldb/trunk/source/Interpreter/CommandInterpreter.cpp
Modified: lldb/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/CMakeLists.txt?rev=367138&r1=367137&r2=367138&view=diff
==============================================================================
--- lldb/trunk/CMakeLists.txt (original)
+++ lldb/trunk/CMakeLists.txt Fri Jul 26 11:14:04 2019
@@ -52,14 +52,14 @@ if(CMAKE_CROSSCOMPILING AND LLDB_BUILT_S
-DClang_DIR=${NATIVE_Clang_DIR})
endif()
+# TableGen
add_subdirectory(utils/TableGen)
+add_subdirectory(include/lldb/Core)
+
add_subdirectory(source)
add_subdirectory(tools)
add_subdirectory(docs)
-# Needed by tablegen.
-add_subdirectory(include/lldb/Core)
-
option(LLDB_INCLUDE_TESTS "Generate build targets for the LLDB unit tests." ${LLVM_INCLUDE_TESTS})
option(LLDB_TEST_USE_CUSTOM_C_COMPILER "Use the C compiler provided via LLDB_TEST_C_COMPILER for building test inferiors (instead of the just-built compiler). Defaults to OFF." OFF)
option(LLDB_TEST_USE_CUSTOM_CXX_COMPILER "Use the C++ compiler provided via LLDB_TEST_CXX_COMPILER for building test inferiors (instead of the just-built compiler). Defaults to OFF." OFF)
Modified: lldb/trunk/include/lldb/Core/Properties.td
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/Properties.td?rev=367138&r1=367137&r2=367138&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/Properties.td (original)
+++ lldb/trunk/include/lldb/Core/Properties.td Fri Jul 26 11:14:04 2019
@@ -349,31 +349,3 @@ let Definition = "debugger" in {
DefaultStringValue<"frame #${frame.index}: ${ansi.fg.yellow}${frame.pc}${ansi.normal}{ ${module.file.basename}{`${function.name-without-args}{${frame.no-debug}${function.pc-offset}}}}{ at ${ansi.fg.cyan}${line.file.basename}${ansi.normal}:${ansi.fg.yellow}${line.number}${ansi.normal}{:${ansi.fg.yellow}${line.column}${ansi.normal}}}{${function.is-optimized} [opt]}{${frame.is-artificial} [artificial]}\\\\n">,
Desc<"The default frame format string to use when displaying stack frameinformation for threads from thread backtrace unique.">;
}
-
-
-let Definition = "commandinterpreter" in {
- def ExpandRegexAliases: Property<"expand-regex-aliases", "Boolean">,
- Global,
- DefaultFalse,
- Desc<"If true, regular expression alias commands will show the expanded command that will be executed. This can be used to debug new regular expression alias commands.">;
- def PromptOnQuit: Property<"prompt-on-quit", "Boolean">,
- Global,
- DefaultTrue,
- Desc<"If true, LLDB will prompt you before quitting if there are any live processes being debugged. If false, LLDB will quit without asking in any case.">;
- def StopCmdSourceOnError: Property<"stop-command-source-on-error", "Boolean">,
- Global,
- DefaultTrue,
- Desc<"If true, LLDB will stop running a 'command source' script upon encountering an error.">;
- def SpaceReplPrompts: Property<"space-repl-prompts", "Boolean">,
- Global,
- DefaultFalse,
- Desc<"If true, blank lines will be printed between between REPL submissions.">;
- def EchoCommands: Property<"echo-commands", "Boolean">,
- Global,
- DefaultTrue,
- Desc<"If true, commands will be echoed before they are evaluated.">;
- def EchoCommentCommands: Property<"echo-comment-commands", "Boolean">,
- Global,
- DefaultTrue,
- Desc<"If true, commands will be echoed even if they are pure comment lines.">;
-}
Modified: lldb/trunk/source/Interpreter/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/CMakeLists.txt?rev=367138&r1=367137&r2=367138&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/CMakeLists.txt (original)
+++ lldb/trunk/source/Interpreter/CMakeLists.txt Fri Jul 26 11:14:04 2019
@@ -1,3 +1,11 @@
+lldb_tablegen(Properties.inc -gen-lldb-property-defs
+ SOURCE Properties.td
+ TARGET LLDBInterpreterPropertiesGen)
+
+lldb_tablegen(PropertiesEnum.inc -gen-lldb-property-enum-defs
+ SOURCE Properties.td
+ TARGET LLDBInterpreterPropertiesEnumGen)
+
add_lldb_library(lldbInterpreter
CommandAlias.cpp
CommandHistory.cpp
@@ -56,7 +64,9 @@ add_lldb_library(lldbInterpreter
Support
)
-add_dependencies(lldbInterpreter LLDBPropertiesGen LLDBPropertiesEnumGen)
+add_dependencies(lldbInterpreter
+ LLDBInterpreterPropertiesGen
+ LLDBInterpreterPropertiesEnumGen)
if (NOT LLDB_DISABLE_LIBEDIT)
target_include_directories(lldbInterpreter PRIVATE ${libedit_INCLUDE_DIRS})
Modified: lldb/trunk/source/Interpreter/CommandInterpreter.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/CommandInterpreter.cpp?rev=367138&r1=367137&r2=367138&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/CommandInterpreter.cpp (original)
+++ lldb/trunk/source/Interpreter/CommandInterpreter.cpp Fri Jul 26 11:14:04 2019
@@ -91,12 +91,12 @@ static constexpr const char *InitFileWar
static constexpr PropertyDefinition g_properties[] = {
#define LLDB_PROPERTIES_commandinterpreter
-#include "lldb/Core/Properties.inc"
+#include "Properties.inc"
};
enum {
#define LLDB_PROPERTIES_commandinterpreter
-#include "lldb/Core/PropertiesEnum.inc"
+#include "PropertiesEnum.inc"
};
ConstString &CommandInterpreter::GetStaticBroadcasterClass() {
Added: lldb/trunk/source/Interpreter/Properties.td
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/Properties.td?rev=367138&view=auto
==============================================================================
--- lldb/trunk/source/Interpreter/Properties.td (added)
+++ lldb/trunk/source/Interpreter/Properties.td Fri Jul 26 11:14:04 2019
@@ -0,0 +1,28 @@
+include "../../include/lldb/Core/PropertiesBase.td"
+
+let Definition = "commandinterpreter" in {
+ def ExpandRegexAliases: Property<"expand-regex-aliases", "Boolean">,
+ Global,
+ DefaultFalse,
+ Desc<"If true, regular expression alias commands will show the expanded command that will be executed. This can be used to debug new regular expression alias commands.">;
+ def PromptOnQuit: Property<"prompt-on-quit", "Boolean">,
+ Global,
+ DefaultTrue,
+ Desc<"If true, LLDB will prompt you before quitting if there are any live processes being debugged. If false, LLDB will quit without asking in any case.">;
+ def StopCmdSourceOnError: Property<"stop-command-source-on-error", "Boolean">,
+ Global,
+ DefaultTrue,
+ Desc<"If true, LLDB will stop running a 'command source' script upon encountering an error.">;
+ def SpaceReplPrompts: Property<"space-repl-prompts", "Boolean">,
+ Global,
+ DefaultFalse,
+ Desc<"If true, blank lines will be printed between between REPL submissions.">;
+ def EchoCommands: Property<"echo-commands", "Boolean">,
+ Global,
+ DefaultTrue,
+ Desc<"If true, commands will be echoed before they are evaluated.">;
+ def EchoCommentCommands: Property<"echo-comment-commands", "Boolean">,
+ Global,
+ DefaultTrue,
+ Desc<"If true, commands will be echoed even if they are pure comment lines.">;
+}
More information about the lldb-commits
mailing list