xref: /freebsd-src/contrib/llvm-project/lldb/source/Target/TargetProperties.td (revision 0fca6ea1d4eea4c934cfff25ac9ee8ad6fe95583)
1include "../../include/lldb/Core/PropertiesBase.td"
2
3let Definition = "target_experimental" in {
4  def InjectLocalVars : Property<"inject-local-vars", "Boolean">,
5    Global, DefaultTrue,
6    Desc<"If true, inject local variables explicitly into the expression text. This will fix symbol resolution when there are name collisions between ivars and local variables. But it can make expressions run much more slowly.">;
7}
8
9let Definition = "target" in {
10  def DefaultArch: Property<"default-arch", "Arch">,
11    Global,
12    DefaultStringValue<"">,
13    Desc<"Default architecture to choose, when there's a choice.">;
14  def MoveToNearestCode: Property<"move-to-nearest-code", "Boolean">,
15    DefaultTrue,
16    Desc<"Move breakpoints to nearest code.">;
17  def Language: Property<"language", "Language">,
18    DefaultEnumValue<"eLanguageTypeUnknown">,
19    Desc<"The language to use when interpreting expressions entered in commands.">;
20  def ExprPrefix: Property<"expr-prefix", "FileSpec">,
21    DefaultStringValue<"">,
22    Desc<"Path to a file containing expressions to be prepended to all expressions.">;
23  def ExprErrorLimit: Property<"expr-error-limit", "UInt64">,
24    DefaultUnsignedValue<5>,
25    Desc<"The maximum amount of errors to emit while parsing an expression. "
26         "A value of 0 means to always continue parsing if possible.">;
27  def ExprAllocAddress: Property<"expr-alloc-address", "UInt64">,
28    DefaultUnsignedValue<0>,
29    Desc<"Start address within the process address space of memory allocation for expression evaluation.">;
30  def ExprAllocSize: Property<"expr-alloc-size", "UInt64">,
31    DefaultUnsignedValue<0>,
32    Desc<"Amount of memory in bytes to allocate for expression evaluation.">;
33  def ExprAllocAlign: Property<"expr-alloc-align", "UInt64">,
34    DefaultUnsignedValue<0>,
35    Desc<"Alignment for each memory allocation for expression evaluation.">;
36  def PreferDynamic: Property<"prefer-dynamic-value", "Enum">,
37    DefaultEnumValue<"eDynamicDontRunTarget">,
38    EnumValues<"OptionEnumValues(g_dynamic_value_types)">,
39    Desc<"Should printed values be shown as their dynamic value.">;
40  def EnableSynthetic: Property<"enable-synthetic-value", "Boolean">,
41    DefaultTrue,
42    Desc<"Should synthetic values be used by default whenever available.">;
43  def SkipPrologue: Property<"skip-prologue", "Boolean">,
44    DefaultTrue,
45    Desc<"Skip function prologues when setting breakpoints by name.">;
46  def SourceMap: Property<"source-map", "PathMap">,
47    DefaultStringValue<"">,
48    Desc<"Source path remappings apply substitutions to the paths of source files, typically needed to debug from a different host than the one that built the target.  The source-map property consists of an array of pairs, the first element is a path prefix, and the second is its replacement.  The syntax is `prefix1 replacement1 prefix2 replacement2...`.  The pairs are checked in order, the first prefix that matches is used, and that prefix is substituted with the replacement.  A common pattern is to use source-map in conjunction with the clang -fdebug-prefix-map flag.  In the build, use `-fdebug-prefix-map=/path/to/build_dir=.` to rewrite the host specific build directory to `.`.  Then for debugging, use `settings set target.source-map . /path/to/local_dir` to convert `.` to a valid local path.">;
49  def AutoSourceMapRelative: Property<"auto-source-map-relative", "Boolean">,
50    DefaultTrue,
51    Desc<"Automatically deduce source path mappings based on source file breakpoint resolution. It only deduces source mapping if source file breakpoint request is using full path and if the debug info contains relative paths.">;
52  def ExecutableSearchPaths: Property<"exec-search-paths", "FileSpecList">,
53    DefaultStringValue<"">,
54    Desc<"Executable search paths to use when locating executable files whose paths don't match the local file system.">;
55  def DebugFileSearchPaths: Property<"debug-file-search-paths", "FileSpecList">,
56    DefaultStringValue<"">,
57    Desc<"List of directories to be searched when locating debug symbol files. See also symbols.enable-external-lookup.">;
58  def ClangModuleSearchPaths: Property<"clang-module-search-paths", "FileSpecList">,
59    DefaultStringValue<"">,
60    Desc<"List of directories to be searched when locating modules for Clang.">;
61  def AutoImportClangModules: Property<"auto-import-clang-modules", "Boolean">,
62    DefaultTrue,
63    Desc<"Automatically load Clang modules referred to by the program.">;
64  def ImportStdModule: Property<"import-std-module", "Enum">,
65    DefaultEnumValue<"eImportStdModuleFalse">,
66    EnumValues<"OptionEnumValues(g_import_std_module_value_types)">,
67    Desc<"Import the 'std' C++ module to improve expression parsing involving "
68         " C++ standard library types.">;
69  def DynamicClassInfoHelper: Property<"objc-dynamic-class-extractor", "Enum">,
70    DefaultEnumValue<"eDynamicClassInfoHelperAuto">,
71    EnumValues<"OptionEnumValues(g_dynamic_class_info_helper_value_types)">,
72    Desc<"Configure how LLDB parses dynamic Objective-C class metadata. By default LLDB will choose the most appropriate method for the target OS.">;
73  def AutoApplyFixIts: Property<"auto-apply-fixits", "Boolean">,
74    DefaultTrue,
75    Desc<"Automatically apply fix-it hints to expressions.">;
76  def RetriesWithFixIts: Property<"retries-with-fixits", "UInt64">,
77    DefaultUnsignedValue<1>,
78    Desc<"Maximum number of attempts to fix an expression with Fix-Its">;
79  def NotifyAboutFixIts: Property<"notify-about-fixits", "Boolean">,
80    DefaultTrue,
81    Desc<"Print the fixed expression text.">;
82  def SaveObjectsDir: Property<"save-jit-objects-dir", "FileSpec">,
83    DefaultStringValue<"">,
84    Desc<"If specified, the directory to save intermediate object files generated by the LLVM JIT">;
85  def ShowHexVariableValuesWithLeadingZeroes: Property<"show-hex-variable-values-with-leading-zeroes", "Boolean">,
86    Global,
87    DefaultTrue,
88    Desc<"Whether to display leading zeroes when printing variable values in hex format.">;
89  def MaxZeroPaddingInFloatFormat: Property<"max-zero-padding-in-float-format", "UInt64">,
90    DefaultUnsignedValue<6>,
91    Desc<"The maximum number of zeroes to insert when displaying a very small float before falling back to scientific notation.">;
92  def MaxChildrenCount: Property<"max-children-count", "SInt64">,
93    DefaultUnsignedValue<256>,
94    Desc<"Maximum number of children to expand in any level of depth.">;
95  def MaxChildrenDepth: Property<"max-children-depth", "UInt64">,
96    DefaultUnsignedValue<0xFFFFFFFF>,
97    Desc<"Maximum depth to expand children.">;
98  def MaxSummaryLength: Property<"max-string-summary-length", "UInt64">,
99    DefaultUnsignedValue<1024>,
100    Desc<"Maximum number of characters to show when using %s in summary strings.">;
101  def MaxMemReadSize: Property<"max-memory-read-size", "SInt64">,
102    DefaultUnsignedValue<1024>,
103    Desc<"Maximum number of bytes that 'memory read' will fetch before --force must be specified.">;
104  def BreakpointUseAvoidList: Property<"breakpoints-use-platform-avoid-list", "Boolean">,
105    DefaultTrue,
106    Desc<"Consult the platform module avoid list when setting non-module specific breakpoints.">;
107  def Arg0: Property<"arg0", "String">,
108    DefaultStringValue<"">,
109    Desc<"The first argument passed to the program in the argument array which can be different from the executable itself.">;
110  def RunArgs: Property<"run-args", "Args">,
111    DefaultStringValue<"">,
112    Desc<"A list containing all the arguments to be passed to the executable when it is run. Note that this does NOT include the argv[0] which is in target.arg0.">;
113  def EnvVars: Property<"env-vars", "Dictionary">,
114    ElementType<"String">,
115    Desc<"A list of user provided environment variables to be passed to the executable's environment, and their values.">;
116  def UnsetEnvVars: Property<"unset-env-vars", "Array">,
117    ElementType<"String">,
118    Desc<"A list of environment variable names to be unset in the inferior's environment. This is most useful to unset some host environment variables when target.inherit-env is true. target.env-vars takes precedence over target.unset-env-vars.">;
119  def InheritEnv: Property<"inherit-env", "Boolean">,
120    DefaultTrue,
121    Desc<"Inherit the environment from the process that is running LLDB.">;
122  def InputPath: Property<"input-path", "FileSpec">,
123    DefaultStringValue<"">,
124    Desc<"The file/path to be used by the executable program for reading its standard input.">;
125  def OutputPath: Property<"output-path", "FileSpec">,
126    DefaultStringValue<"">,
127    Desc<"The file/path to be used by the executable program for writing its standard output.">;
128  def ErrorPath: Property<"error-path", "FileSpec">,
129    DefaultStringValue<"">,
130    Desc<"The file/path to be used by the executable program for writing its standard error.">;
131  def DetachOnError: Property<"detach-on-error", "Boolean">,
132    DefaultTrue,
133    Desc<"debugserver will detach (rather than killing) a process if it loses connection with lldb.">;
134  def PreloadSymbols: Property<"preload-symbols", "Boolean">,
135    DefaultTrue,
136    Desc<"Enable loading of symbol tables before they are needed.">;
137  def DisableASLR: Property<"disable-aslr", "Boolean">,
138    DefaultTrue,
139    Desc<"Disable Address Space Layout Randomization (ASLR)">;
140  def DisableSTDIO: Property<"disable-stdio", "Boolean">,
141    DefaultFalse,
142    Desc<"Disable stdin/stdout for process (e.g. for a GUI application)">;
143  def InheritTCC: Property<"inherit-tcc", "Boolean">,
144    DefaultFalse,
145    Desc<"Inherit the TCC permissions from the inferior's parent instead of making the process itself responsible.">;
146  def InlineStrategy: Property<"inline-breakpoint-strategy", "Enum">,
147    DefaultEnumValue<"eInlineBreakpointsAlways">,
148    EnumValues<"OptionEnumValues(g_inline_breakpoint_enums)">,
149    Desc<"The strategy to use when settings breakpoints by file and line. Breakpoint locations can end up being inlined by the compiler, so that a compile unit 'a.c' might contain an inlined function from another source file. Usually this is limited to breakpoint locations from inlined functions from header or other include files, or more accurately non-implementation source files. Sometimes code might #include implementation files and cause inlined breakpoint locations in inlined implementation files. Always checking for inlined breakpoint locations can be expensive (memory and time), so if you have a project with many headers and find that setting breakpoints is slow, then you can change this setting to headers. This setting allows you to control exactly which strategy is used when setting file and line breakpoints.">;
150  def DisassemblyFlavor: Property<"x86-disassembly-flavor", "Enum">,
151    DefaultEnumValue<"eX86DisFlavorDefault">,
152    EnumValues<"OptionEnumValues(g_x86_dis_flavor_value_types)">,
153    Desc<"The default disassembly flavor to use for x86 or x86-64 targets.">;
154  def UseHexImmediates: Property<"use-hex-immediates", "Boolean">,
155    DefaultTrue,
156    Desc<"Show immediates in disassembly as hexadecimal.">;
157  def HexImmediateStyle: Property<"hex-immediate-style", "Enum">,
158    DefaultEnumValue<"Disassembler::eHexStyleC">,
159    EnumValues<"OptionEnumValues(g_hex_immediate_style_values)">,
160    Desc<"Which style to use for printing hexadecimal disassembly values.">;
161  def UseFastStepping: Property<"use-fast-stepping", "Boolean">,
162    DefaultTrue,
163    Desc<"Use a fast stepping algorithm based on running from branch to branch rather than instruction single-stepping.">;
164  def LoadScriptFromSymbolFile: Property<"load-script-from-symbol-file", "Enum">,
165    DefaultEnumValue<"eLoadScriptFromSymFileWarn">,
166    EnumValues<"OptionEnumValues(g_load_script_from_sym_file_values)">,
167    Desc<"Allow LLDB to load scripting resources embedded in symbol files when available.">;
168  def LoadCWDlldbinitFile: Property<"load-cwd-lldbinit", "Enum">,
169    DefaultEnumValue<"eLoadCWDlldbinitWarn">,
170    EnumValues<"OptionEnumValues(g_load_cwd_lldbinit_values)">,
171    Desc<"Allow LLDB to .lldbinit files from the current directory automatically.">;
172  def MemoryModuleLoadLevel: Property<"memory-module-load-level", "Enum">,
173    DefaultEnumValue<"eMemoryModuleLoadLevelComplete">,
174    EnumValues<"OptionEnumValues(g_memory_module_load_level_values)">,
175    Desc<"Loading modules from memory can be slow as reading the symbol tables and other data can take a long time depending on your connection to the debug target. This setting helps users control how much information gets loaded when loading modules from memory.'complete' is the default value for this setting which will load all sections and symbols by reading them from memory (slowest, most accurate). 'partial' will load sections and attempt to find function bounds without downloading the symbol table (faster, still accurate, missing symbol names). 'minimal' is the fastest setting and will load section data with no symbols, but should rarely be used as stack frames in these memory regions will be inaccurate and not provide any context (fastest). ">;
176  def DisplayExpressionsInCrashlogs: Property<"display-expression-in-crashlogs", "Boolean">,
177    DefaultFalse,
178    Desc<"Expressions that crash will show up in crash logs if the host system supports executable specific crash log strings and this setting is set to true.">;
179  def TrapHandlerNames: Property<"trap-handler-names", "Array">,
180    Global,
181    ElementType<"String">,
182    Desc<"A list of trap handler function names, e.g. a common Unix user process one is _sigtramp.">;
183  def DisplayRuntimeSupportValues: Property<"display-runtime-support-values", "Boolean">,
184    DefaultFalse,
185    Desc<"If true, LLDB will show variables that are meant to support the operation of a language's runtime support.">;
186  def DisplayRecognizedArguments: Property<"display-recognized-arguments", "Boolean">,
187    DefaultFalse,
188    Desc<"Show recognized arguments in variable listings by default.">;
189  def RequireHardwareBreakpoints: Property<"require-hardware-breakpoint", "Boolean">,
190    DefaultFalse,
191    Desc<"Require all breakpoints to be hardware breakpoints.">;
192  def AutoInstallMainExecutable: Property<"auto-install-main-executable", "Boolean">,
193    DefaultTrue,
194    Desc<"Always install the main executable when connected to a remote platform.">;
195  def DebugUtilityExpression: Property<"debug-utility-expression", "Boolean">,
196    DefaultFalse,
197    Desc<"Enable debugging of LLDB-internal utility expressions.">;
198}
199
200let Definition = "process_experimental" in {
201  def OSPluginReportsAllThreads: Property<"os-plugin-reports-all-threads", "Boolean">,
202    Global,
203    DefaultTrue,
204    Desc<"Set to False if your OS Plugins doesn't report all threads on each stop.">;
205}
206
207let Definition = "process" in {
208  def DisableMemCache: Property<"disable-memory-cache", "Boolean">,
209    DefaultFalse,
210    Desc<"Disable reading and caching of memory in fixed-size units.">;
211  def ExtraStartCommand: Property<"extra-startup-command", "Array">,
212    ElementType<"String">,
213    Desc<"A list containing extra commands understood by the particular process plugin used.  For instance, to turn on debugserver logging set this to 'QSetLogging:bitmask=LOG_DEFAULT;'">;
214  def IgnoreBreakpointsInExpressions: Property<"ignore-breakpoints-in-expressions", "Boolean">,
215    Global,
216    DefaultTrue,
217    Desc<"If true, breakpoints will be ignored during expression evaluation.">;
218  def UnwindOnErrorInExpressions: Property<"unwind-on-error-in-expressions", "Boolean">,
219    Global,
220    DefaultTrue,
221    Desc<"If true, errors in expression evaluation will unwind the stack back to the state before the call.">;
222  def PythonOSPluginPath: Property<"python-os-plugin-path", "FileSpec">,
223    DefaultUnsignedValue<1>,
224    Desc<"A path to a python OS plug-in module file that contains a OperatingSystemPlugIn class.">;
225  def StopOnSharedLibraryEvents: Property<"stop-on-sharedlibrary-events", "Boolean">,
226    Global,
227    DefaultFalse,
228    Desc<"If true, stop when a shared library is loaded or unloaded.">;
229  def DisableLangRuntimeUnwindPlans: Property<"disable-language-runtime-unwindplans", "Boolean">,
230    Global,
231    DefaultFalse,
232    Desc<"If true, language runtime augmented/overidden backtraces will not be used when printing a stack trace.">;
233  def DetachKeepsStopped: Property<"detach-keeps-stopped", "Boolean">,
234    Global,
235    DefaultFalse,
236    Desc<"If true, detach will attempt to keep the process stopped.">;
237  def MemCacheLineSize: Property<"memory-cache-line-size", "UInt64">,
238    DefaultUnsignedValue<512>,
239    Desc<"The memory cache line size">;
240  def WarningOptimization: Property<"optimization-warnings", "Boolean">,
241    DefaultTrue,
242    Desc<"If true, warn when stopped in code that is optimized where stepping and variable availability may not behave as expected.">;
243  def WarningUnsupportedLanguage: Property<"unsupported-language-warnings", "Boolean">,
244    DefaultTrue,
245    Desc<"If true, warn when stopped in code that is written in a source language that LLDB does not support.">;
246  def StopOnExec: Property<"stop-on-exec", "Boolean">,
247    Global,
248    DefaultTrue,
249    Desc<"If true, stop when the inferior exec's.">;
250  def UtilityExpressionTimeout: Property<"utility-expression-timeout", "UInt64">,
251#ifdef LLDB_SANITIZED
252    DefaultUnsignedValue<60>,
253#else
254    DefaultUnsignedValue<15>,
255#endif
256    Desc<"The time in seconds to wait for LLDB-internal utility expressions.">;
257  def InterruptTimeout: Property<"interrupt-timeout", "UInt64">,
258#ifdef LLDB_SANITIZED
259    DefaultUnsignedValue<60>,
260#else
261    DefaultUnsignedValue<20>,
262#endif
263    Desc<"The time in seconds to wait for an interrupt succeed in stopping the target.">;
264  def SteppingRunsAllThreads: Property<"run-all-threads", "Boolean">,
265    DefaultFalse,
266    Desc<"If true, stepping operations will run all threads.  This is equivalent to setting the run-mode option to 'all-threads'.">;
267  def VirtualAddressableBits: Property<"virtual-addressable-bits", "UInt64">,
268    DefaultUnsignedValue<0>,
269    Desc<"The number of bits used for addressing. If the value is 39, then bits 0..38 are used for addressing. The default value of 0 means unspecified.">;
270  def HighmemVirtualAddressableBits: Property<"highmem-virtual-addressable-bits", "UInt64">,
271    DefaultUnsignedValue<0>,
272    Desc<"The number of bits used for addressing high memory, when it differs from low memory in the same Process. When this is non-zero, target.process.virtual-addressable-bits will be the value for low memory (0x000... addresses) and this setting will be the value for high memory (0xfff... addresses). When this is zero, target.process.virtual-addressable-bits applies to all addresses. It is very uncommon to use this setting.">;
273  def FollowForkMode: Property<"follow-fork-mode", "Enum">,
274    DefaultEnumValue<"eFollowParent">,
275    EnumValues<"OptionEnumValues(g_follow_fork_mode_values)">,
276    Desc<"Debugger's behavior upon fork or vfork.">;
277}
278
279let Definition = "platform" in {
280  def UseModuleCache: Property<"use-module-cache", "Boolean">,
281    Global,
282    DefaultTrue,
283    Desc<"Use module cache.">;
284  def ModuleCacheDirectory: Property<"module-cache-directory", "FileSpec">,
285    Global,
286    DefaultStringValue<"">,
287    Desc<"Root directory for cached modules.">;
288}
289
290let Definition = "thread" in {
291  def StepInAvoidsNoDebug: Property<"step-in-avoid-nodebug", "Boolean">,
292    Global,
293    DefaultTrue,
294    Desc<"If true, step-in will not stop in functions with no debug information.">;
295  def StepOutAvoidsNoDebug: Property<"step-out-avoid-nodebug", "Boolean">,
296    Global,
297    DefaultFalse,
298    Desc<"If true, when step-in/step-out/step-over leave the current frame, they will continue to step out till they come to a function with debug information. Passing a frame argument to step-out will override this option.">;
299  def StepAvoidRegex: Property<"step-avoid-regexp", "Regex">,
300    Global,
301    DefaultStringValue<"^std::">,
302    Desc<"A regular expression defining functions step-in won't stop in.">;
303  def StepAvoidLibraries: Property<"step-avoid-libraries", "FileSpecList">,
304    Global,
305    DefaultStringValue<"">,
306    Desc<"A list of libraries that source stepping won't stop in.">;
307  def EnableThreadTrace: Property<"trace-thread", "Boolean">,
308    DefaultFalse,
309    Desc<"If true, this thread will single-step and log execution.">;
310  def MaxBacktraceDepth: Property<"max-backtrace-depth", "UInt64">,
311    DefaultUnsignedValue<600000>,
312    Desc<"Maximum number of frames to backtrace.">;
313}
314
315let Definition = "language" in {
316  def EnableFilterForLineBreakpoints: Property<"enable-filter-for-line-breakpoints", "Boolean">,
317    DefaultTrue,
318    Desc<"If true, allow Language plugins to filter locations when setting breakpoints by line number or regex.">;
319}
320