[Lldb-commits] [lldb] r367140 - [TableGen] Move core properties into a separate file (NFC)

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Fri Jul 26 11:14:12 PDT 2019


Author: jdevlieghere
Date: Fri Jul 26 11:14:12 2019
New Revision: 367140

URL: http://llvm.org/viewvc/llvm-project?rev=367140&view=rev
Log:
[TableGen] Move core properties into a separate file (NFC)

With the plugins having their own tablgen file, it makes sense to split
off the core properties as well.

Added:
    lldb/trunk/source/Core/Properties.td
Removed:
    lldb/trunk/include/lldb/Core/CMakeLists.txt
    lldb/trunk/include/lldb/Core/Properties.td
Modified:
    lldb/trunk/CMakeLists.txt
    lldb/trunk/source/Core/CMakeLists.txt

Modified: lldb/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/CMakeLists.txt?rev=367140&r1=367139&r2=367140&view=diff
==============================================================================
--- lldb/trunk/CMakeLists.txt (original)
+++ lldb/trunk/CMakeLists.txt Fri Jul 26 11:14:12 2019
@@ -54,7 +54,6 @@ endif()
 
 # TableGen
 add_subdirectory(utils/TableGen)
-add_subdirectory(include/lldb/Core)
 
 add_subdirectory(source)
 add_subdirectory(tools)

Removed: lldb/trunk/include/lldb/Core/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/CMakeLists.txt?rev=367139&view=auto
==============================================================================
--- lldb/trunk/include/lldb/Core/CMakeLists.txt (original)
+++ lldb/trunk/include/lldb/Core/CMakeLists.txt (removed)
@@ -1,7 +0,0 @@
-lldb_tablegen(Properties.inc -gen-lldb-property-defs
-  SOURCE Properties.td
-  TARGET LLDBPropertiesGen)
-
-lldb_tablegen(PropertiesEnum.inc -gen-lldb-property-enum-defs
-  SOURCE Properties.td
-  TARGET LLDBPropertiesEnumGen)

Removed: lldb/trunk/include/lldb/Core/Properties.td
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/Properties.td?rev=367139&view=auto
==============================================================================
--- lldb/trunk/include/lldb/Core/Properties.td (original)
+++ lldb/trunk/include/lldb/Core/Properties.td (removed)
@@ -1,118 +0,0 @@
-include "PropertiesBase.td"
-
-let Definition = "modulelist" in {
-  def EnableExternalLookup: Property<"enable-external-lookup", "Boolean">,
-    Global,
-    DefaultTrue,
-    Desc<"Control the use of external tools and repositories to locate symbol files. Directories listed in target.debug-file-search-paths and directory of the executable are always checked first for separate debug info files. Then depending on this setting: On macOS, Spotlight would be also used to locate a matching .dSYM bundle based on the UUID of the executable. On NetBSD, directory /usr/libdata/debug would be also searched. On platforms other than NetBSD directory /usr/lib/debug would be also searched.">;
-  def ClangModulesCachePath: Property<"clang-modules-cache-path", "FileSpec">,
-    Global,
-    DefaultStringValue<"">,
-    Desc<"The path to the clang modules cache directory (-fmodules-cache-path).">;
-}
-
-let Definition = "debugger" in {
-  def AutoConfirm: Property<"auto-confirm", "Boolean">,
-    Global,
-    DefaultFalse,
-    Desc<"If true all confirmation prompts will receive their default reply.">;
-  def DisassemblyFormat: Property<"disassembly-format", "FormatEntity">,
-    Global,
-    DefaultStringValue<"{${function.initial-function}{${module.file.basename}`}{${function.name-without-args}}:\\\\n}{${function.changed}\\\\n{${module.file.basename}`}{${function.name-without-args}}:\\\\n}{${current-pc-arrow} }${addr-file-or-load}{ <${function.concrete-only-addr-offset-no-padding}>}: ">,
-    Desc<"The default disassembly format string to use when disassembling instruction sequences.">;
-  def FrameFormat: Property<"frame-format", "FormatEntity">,
-    Global,
-    DefaultStringValue<"frame #${frame.index}: ${ansi.fg.yellow}${frame.pc}${ansi.normal}{ ${module.file.basename}{`${function.name-with-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 frame information for threads.">;
-  def NotiftVoid: Property<"notify-void", "Boolean">,
-    Global,
-    DefaultFalse,
-    Desc<"Notify the user explicitly if an expression returns void (default: false).">;
-  def Prompt: Property<"prompt", "String">,
-    Global,
-    DefaultEnumValue<"OptionValueString::eOptionEncodeCharacterEscapeSequences">,
-    DefaultStringValue<"(lldb) ">,
-    Desc<"The debugger command line prompt displayed for the user.">;
-  def ScriptLanguage: Property<"script-lang", "Enum">,
-    Global,
-    DefaultEnumValue<"eScriptLanguagePython">,
-    EnumValues<"OptionEnumValues(g_language_enumerators)">,
-    Desc<"The script language to be used for evaluating user-written scripts.">;
-  def StopDisassemblyCount: Property<"stop-disassembly-count", "SInt64">,
-    Global,
-    DefaultUnsignedValue<4>,
-    Desc<"The number of disassembly lines to show when displaying a stopped context.">;
-  def StopDisassemblyDisplay: Property<"stop-disassembly-display", "Enum">,
-    Global,
-    DefaultEnumValue<"Debugger::eStopDisassemblyTypeNoDebugInfo">,
-    EnumValues<"OptionEnumValues(g_show_disassembly_enum_values)">,
-    Desc<"Control when to display disassembly when displaying a stopped context.">;
-  def StopLineCountAfter: Property<"stop-line-count-after", "SInt64">,
-    Global,
-    DefaultUnsignedValue<3>,
-    Desc<"The number of sources lines to display that come after the current source line when displaying a stopped context.">;
-  def StopLineCountBefore: Property<"stop-line-count-before", "SInt64">,
-    Global,
-    DefaultUnsignedValue<3>,
-    Desc<"The number of sources lines to display that come before the current source line when displaying a stopped context.">;
-  def HighlightSource: Property<"highlight-source", "Boolean">,
-    Global,
-    DefaultTrue,
-    Desc<"If true, LLDB will highlight the displayed source code.">;
-  def StopShowColumn: Property<"stop-show-column", "Enum">,
-    DefaultEnumValue<"eStopShowColumnAnsiOrCaret">,
-    EnumValues<"OptionEnumValues(s_stop_show_column_values)">,
-    Desc<"If true, LLDB will use the column information from the debug info to mark the current position when displaying a stopped context.">;
-  def StopShowColumnAnsiPrefix: Property<"stop-show-column-ansi-prefix", "String">,
-    Global,
-    DefaultStringValue<"${ansi.underline}">,
-    Desc<"When displaying the column marker in a color-enabled (i.e. ANSI) terminal, use the ANSI terminal code specified in this format at the immediately before the column to be marked.">;
-  def StopShowColumnAnsiSuffix: Property<"stop-show-column-ansi-suffix", "String">,
-    Global,
-    DefaultStringValue<"${ansi.normal}">,
-    Desc<"When displaying the column marker in a color-enabled (i.e. ANSI) terminal, use the ANSI terminal code specified in this format immediately after the column to be marked.">;
-  def TerminalWidth: Property<"term-width", "SInt64">,
-    Global,
-    DefaultUnsignedValue<80>,
-    Desc<"The maximum number of columns to use for displaying text.">;
-  def ThreadFormat: Property<"thread-format", "FormatEntity">,
-    Global,
-    DefaultStringValue<"thread #${thread.index}: tid = ${thread.id%tid}{, ${frame.pc}}{ ${module.file.basename}{`${function.name-with-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}}}{, name = ${ansi.fg.green}'${thread.name}'${ansi.normal}}{, queue = ${ansi.fg.green}'${thread.queue}'${ansi.normal}}{, activity = ${ansi.fg.green}'${thread.info.activity.name}'${ansi.normal}}{, ${thread.info.trace_messages} messages}{, stop reason = ${ansi.fg.red}${thread.stop-reason}${ansi.normal}}{\\\\nReturn value: ${thread.return-value}}{\\\\nCompleted expression: ${thread.completed-expression}}\\\\n">,
-    Desc<"The default thread format string to use when displaying thread information.">;
-  def ThreadStopFormat: Property<"thread-stop-format", "FormatEntity">,
-    Global,
-    DefaultStringValue<"thread #${thread.index}{, name = '${thread.name}'}{, queue = ${ansi.fg.green}'${thread.queue}'${ansi.normal}}{, activity = ${ansi.fg.green}'${thread.info.activity.name}'${ansi.normal}}{, ${thread.info.trace_messages} messages}{, stop reason = ${ansi.fg.red}${thread.stop-reason}${ansi.normal}}{\\\\nReturn value: ${thread.return-value}}{\\\\nCompleted expression: ${thread.completed-expression}}\\\\n">,
-    Desc<"The default thread format  string to use when displaying thread information as part of the stop display.">;
-  def UseExternalEditor: Property<"use-external-editor", "Boolean">,
-    Global,
-    DefaultFalse,
-    Desc<"Whether to use an external editor or not.">;
-  def UseColor: Property<"use-color", "Boolean">,
-    Global,
-    DefaultTrue,
-    Desc<"Whether to use Ansi color codes or not.">;
-  def AutoOneLineSummaries: Property<"auto-one-line-summaries", "Boolean">,
-    Global,
-    DefaultTrue,
-    Desc<"If true, LLDB will automatically display small structs in one-liner format (default: true).">;
-  def AutoIndent: Property<"auto-indent", "Boolean">,
-    Global,
-    DefaultTrue,
-    Desc<"If true, LLDB will auto indent/outdent code. Currently only supported in the REPL (default: true).">;
-  def PrintDecls: Property<"print-decls", "Boolean">,
-    Global,
-    DefaultTrue,
-    Desc<"If true, LLDB will print the values of variables declared in an expression. Currently only supported in the REPL (default: true).">;
-  def TabSize: Property<"tab-size", "UInt64">,
-    Global,
-    DefaultUnsignedValue<4>,
-    Desc<"The tab size to use when indenting code in multi-line input mode (default: 4).">;
-  def EscapeNonPrintables: Property<"escape-non-printables", "Boolean">,
-    Global,
-    DefaultTrue,
-    Desc<"If true, LLDB will automatically escape non-printable and escape characters when formatting strings.">;
-  def FrameFormatUnique: Property<"frame-format-unique", "FormatEntity">,
-    Global,
-    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.">;
-}

Modified: lldb/trunk/source/Core/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/CMakeLists.txt?rev=367140&r1=367139&r2=367140&view=diff
==============================================================================
--- lldb/trunk/source/Core/CMakeLists.txt (original)
+++ lldb/trunk/source/Core/CMakeLists.txt Fri Jul 26 11:14:12 2019
@@ -1,3 +1,11 @@
+lldb_tablegen(Properties.inc -gen-lldb-property-defs
+  SOURCE Properties.td
+  TARGET LLDBCorePropertiesGen)
+
+lldb_tablegen(PropertiesEnum.inc -gen-lldb-property-enum-defs
+  SOURCE Properties.td
+  TARGET LLDBCorePropertiesEnumGen)
+
 set(LLDB_CURSES_LIBS)
 set(LLDB_LIBEDIT_LIBS)
 
@@ -76,7 +84,9 @@ add_lldb_library(lldbCore
     Demangle
   )
 
-add_dependencies(lldbCore LLDBPropertiesGen LLDBPropertiesEnumGen)
+add_dependencies(lldbCore
+  LLDBCorePropertiesGen
+  LLDBCorePropertiesEnumGen)
 
 # Needed to properly resolve references in a debug build.
 # TODO: Remove once we have better layering

Added: lldb/trunk/source/Core/Properties.td
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Properties.td?rev=367140&view=auto
==============================================================================
--- lldb/trunk/source/Core/Properties.td (added)
+++ lldb/trunk/source/Core/Properties.td Fri Jul 26 11:14:12 2019
@@ -0,0 +1,118 @@
+include "../../include/lldb/Core/PropertiesBase.td"
+
+let Definition = "modulelist" in {
+  def EnableExternalLookup: Property<"enable-external-lookup", "Boolean">,
+    Global,
+    DefaultTrue,
+    Desc<"Control the use of external tools and repositories to locate symbol files. Directories listed in target.debug-file-search-paths and directory of the executable are always checked first for separate debug info files. Then depending on this setting: On macOS, Spotlight would be also used to locate a matching .dSYM bundle based on the UUID of the executable. On NetBSD, directory /usr/libdata/debug would be also searched. On platforms other than NetBSD directory /usr/lib/debug would be also searched.">;
+  def ClangModulesCachePath: Property<"clang-modules-cache-path", "FileSpec">,
+    Global,
+    DefaultStringValue<"">,
+    Desc<"The path to the clang modules cache directory (-fmodules-cache-path).">;
+}
+
+let Definition = "debugger" in {
+  def AutoConfirm: Property<"auto-confirm", "Boolean">,
+    Global,
+    DefaultFalse,
+    Desc<"If true all confirmation prompts will receive their default reply.">;
+  def DisassemblyFormat: Property<"disassembly-format", "FormatEntity">,
+    Global,
+    DefaultStringValue<"{${function.initial-function}{${module.file.basename}`}{${function.name-without-args}}:\\\\n}{${function.changed}\\\\n{${module.file.basename}`}{${function.name-without-args}}:\\\\n}{${current-pc-arrow} }${addr-file-or-load}{ <${function.concrete-only-addr-offset-no-padding}>}: ">,
+    Desc<"The default disassembly format string to use when disassembling instruction sequences.">;
+  def FrameFormat: Property<"frame-format", "FormatEntity">,
+    Global,
+    DefaultStringValue<"frame #${frame.index}: ${ansi.fg.yellow}${frame.pc}${ansi.normal}{ ${module.file.basename}{`${function.name-with-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 frame information for threads.">;
+  def NotiftVoid: Property<"notify-void", "Boolean">,
+    Global,
+    DefaultFalse,
+    Desc<"Notify the user explicitly if an expression returns void (default: false).">;
+  def Prompt: Property<"prompt", "String">,
+    Global,
+    DefaultEnumValue<"OptionValueString::eOptionEncodeCharacterEscapeSequences">,
+    DefaultStringValue<"(lldb) ">,
+    Desc<"The debugger command line prompt displayed for the user.">;
+  def ScriptLanguage: Property<"script-lang", "Enum">,
+    Global,
+    DefaultEnumValue<"eScriptLanguagePython">,
+    EnumValues<"OptionEnumValues(g_language_enumerators)">,
+    Desc<"The script language to be used for evaluating user-written scripts.">;
+  def StopDisassemblyCount: Property<"stop-disassembly-count", "SInt64">,
+    Global,
+    DefaultUnsignedValue<4>,
+    Desc<"The number of disassembly lines to show when displaying a stopped context.">;
+  def StopDisassemblyDisplay: Property<"stop-disassembly-display", "Enum">,
+    Global,
+    DefaultEnumValue<"Debugger::eStopDisassemblyTypeNoDebugInfo">,
+    EnumValues<"OptionEnumValues(g_show_disassembly_enum_values)">,
+    Desc<"Control when to display disassembly when displaying a stopped context.">;
+  def StopLineCountAfter: Property<"stop-line-count-after", "SInt64">,
+    Global,
+    DefaultUnsignedValue<3>,
+    Desc<"The number of sources lines to display that come after the current source line when displaying a stopped context.">;
+  def StopLineCountBefore: Property<"stop-line-count-before", "SInt64">,
+    Global,
+    DefaultUnsignedValue<3>,
+    Desc<"The number of sources lines to display that come before the current source line when displaying a stopped context.">;
+  def HighlightSource: Property<"highlight-source", "Boolean">,
+    Global,
+    DefaultTrue,
+    Desc<"If true, LLDB will highlight the displayed source code.">;
+  def StopShowColumn: Property<"stop-show-column", "Enum">,
+    DefaultEnumValue<"eStopShowColumnAnsiOrCaret">,
+    EnumValues<"OptionEnumValues(s_stop_show_column_values)">,
+    Desc<"If true, LLDB will use the column information from the debug info to mark the current position when displaying a stopped context.">;
+  def StopShowColumnAnsiPrefix: Property<"stop-show-column-ansi-prefix", "String">,
+    Global,
+    DefaultStringValue<"${ansi.underline}">,
+    Desc<"When displaying the column marker in a color-enabled (i.e. ANSI) terminal, use the ANSI terminal code specified in this format at the immediately before the column to be marked.">;
+  def StopShowColumnAnsiSuffix: Property<"stop-show-column-ansi-suffix", "String">,
+    Global,
+    DefaultStringValue<"${ansi.normal}">,
+    Desc<"When displaying the column marker in a color-enabled (i.e. ANSI) terminal, use the ANSI terminal code specified in this format immediately after the column to be marked.">;
+  def TerminalWidth: Property<"term-width", "SInt64">,
+    Global,
+    DefaultUnsignedValue<80>,
+    Desc<"The maximum number of columns to use for displaying text.">;
+  def ThreadFormat: Property<"thread-format", "FormatEntity">,
+    Global,
+    DefaultStringValue<"thread #${thread.index}: tid = ${thread.id%tid}{, ${frame.pc}}{ ${module.file.basename}{`${function.name-with-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}}}{, name = ${ansi.fg.green}'${thread.name}'${ansi.normal}}{, queue = ${ansi.fg.green}'${thread.queue}'${ansi.normal}}{, activity = ${ansi.fg.green}'${thread.info.activity.name}'${ansi.normal}}{, ${thread.info.trace_messages} messages}{, stop reason = ${ansi.fg.red}${thread.stop-reason}${ansi.normal}}{\\\\nReturn value: ${thread.return-value}}{\\\\nCompleted expression: ${thread.completed-expression}}\\\\n">,
+    Desc<"The default thread format string to use when displaying thread information.">;
+  def ThreadStopFormat: Property<"thread-stop-format", "FormatEntity">,
+    Global,
+    DefaultStringValue<"thread #${thread.index}{, name = '${thread.name}'}{, queue = ${ansi.fg.green}'${thread.queue}'${ansi.normal}}{, activity = ${ansi.fg.green}'${thread.info.activity.name}'${ansi.normal}}{, ${thread.info.trace_messages} messages}{, stop reason = ${ansi.fg.red}${thread.stop-reason}${ansi.normal}}{\\\\nReturn value: ${thread.return-value}}{\\\\nCompleted expression: ${thread.completed-expression}}\\\\n">,
+    Desc<"The default thread format  string to use when displaying thread information as part of the stop display.">;
+  def UseExternalEditor: Property<"use-external-editor", "Boolean">,
+    Global,
+    DefaultFalse,
+    Desc<"Whether to use an external editor or not.">;
+  def UseColor: Property<"use-color", "Boolean">,
+    Global,
+    DefaultTrue,
+    Desc<"Whether to use Ansi color codes or not.">;
+  def AutoOneLineSummaries: Property<"auto-one-line-summaries", "Boolean">,
+    Global,
+    DefaultTrue,
+    Desc<"If true, LLDB will automatically display small structs in one-liner format (default: true).">;
+  def AutoIndent: Property<"auto-indent", "Boolean">,
+    Global,
+    DefaultTrue,
+    Desc<"If true, LLDB will auto indent/outdent code. Currently only supported in the REPL (default: true).">;
+  def PrintDecls: Property<"print-decls", "Boolean">,
+    Global,
+    DefaultTrue,
+    Desc<"If true, LLDB will print the values of variables declared in an expression. Currently only supported in the REPL (default: true).">;
+  def TabSize: Property<"tab-size", "UInt64">,
+    Global,
+    DefaultUnsignedValue<4>,
+    Desc<"The tab size to use when indenting code in multi-line input mode (default: 4).">;
+  def EscapeNonPrintables: Property<"escape-non-printables", "Boolean">,
+    Global,
+    DefaultTrue,
+    Desc<"If true, LLDB will automatically escape non-printable and escape characters when formatting strings.">;
+  def FrameFormatUnique: Property<"frame-format-unique", "FormatEntity">,
+    Global,
+    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.">;
+}




More information about the lldb-commits mailing list