xref: /llvm-project/lldb/source/Target/TargetProperties.td (revision cb82771c96d7055d89ca67f383e6fb3c9aced178)
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  def UseDIL : Property<"use-DIL", "Boolean">,
8    Global, DefaultFalse,
9    Desc<"If true, use the alternative DIL implementation for frame variable evaluation.">;
10}
11
12let Definition = "target" in {
13  def DefaultArch: Property<"default-arch", "Arch">,
14    Global,
15    DefaultStringValue<"">,
16    Desc<"Default architecture to choose, when there's a choice.">;
17  def MoveToNearestCode: Property<"move-to-nearest-code", "Boolean">,
18    DefaultTrue,
19    Desc<"Move breakpoints to nearest code.">;
20  def Language: Property<"language", "Language">,
21    DefaultEnumValue<"eLanguageTypeUnknown">,
22    Desc<"The language to use when interpreting expressions entered in commands.">;
23  def ExprPrefix: Property<"expr-prefix", "FileSpec">,
24    DefaultStringValue<"">,
25    Desc<"Path to a file containing expressions to be prepended to all expressions.">;
26  def ExprErrorLimit: Property<"expr-error-limit", "UInt64">,
27    DefaultUnsignedValue<5>,
28    Desc<"The maximum amount of errors to emit while parsing an expression. "
29         "A value of 0 means to always continue parsing if possible.">;
30  def ExprAllocAddress: Property<"expr-alloc-address", "UInt64">,
31    DefaultUnsignedValue<0>,
32    Desc<"Start address within the process address space of memory allocation for expression evaluation.">;
33  def ExprAllocSize: Property<"expr-alloc-size", "UInt64">,
34    DefaultUnsignedValue<0>,
35    Desc<"Amount of memory in bytes to allocate for expression evaluation.">;
36  def ExprAllocAlign: Property<"expr-alloc-align", "UInt64">,
37    DefaultUnsignedValue<0>,
38    Desc<"Alignment for each memory allocation for expression evaluation.">;
39  def PreferDynamic: Property<"prefer-dynamic-value", "Enum">,
40    DefaultEnumValue<"eDynamicDontRunTarget">,
41    EnumValues<"OptionEnumValues(g_dynamic_value_types)">,
42    Desc<"Should printed values be shown as their dynamic value.">;
43  def EnableSynthetic: Property<"enable-synthetic-value", "Boolean">,
44    DefaultTrue,
45    Desc<"Should synthetic values be used by default whenever available.">;
46  def SkipPrologue: Property<"skip-prologue", "Boolean">,
47    DefaultTrue,
48    Desc<"Skip function prologues when setting breakpoints by name.">;
49  def SourceMap: Property<"source-map", "PathMap">,
50    DefaultStringValue<"">,
51    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.">;
52  def ObjectMap: Property<"object-map", "PathMap">,
53    DefaultStringValue<"">,
54    Desc<"Object path remappings apply substitutions to the paths of object files, typically needed to debug from a different host than the one that built the target.  The object-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.">;
55  def AutoSourceMapRelative: Property<"auto-source-map-relative", "Boolean">,
56    DefaultTrue,
57    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.">;
58  def ExecutableSearchPaths: Property<"exec-search-paths", "FileSpecList">,
59    DefaultStringValue<"">,
60    Desc<"Executable search paths to use when locating executable files whose paths don't match the local file system.">;
61  def DebugFileSearchPaths: Property<"debug-file-search-paths", "FileSpecList">,
62    DefaultStringValue<"">,
63    Desc<"List of directories to be searched when locating debug symbol files. See also symbols.enable-external-lookup.">;
64  def ClangModuleSearchPaths: Property<"clang-module-search-paths", "FileSpecList">,
65    DefaultStringValue<"">,
66    Desc<"List of directories to be searched when locating modules for Clang.">;
67  def AutoImportClangModules: Property<"auto-import-clang-modules", "Boolean">,
68    DefaultTrue,
69    Desc<"Automatically load Clang modules referred to by the program.">;
70  def ImportStdModule: Property<"import-std-module", "Enum">,
71    DefaultEnumValue<"eImportStdModuleFalse">,
72    EnumValues<"OptionEnumValues(g_import_std_module_value_types)">,
73    Desc<"Import the 'std' C++ module to improve expression parsing involving "
74         " C++ standard library types.">;
75  def DynamicClassInfoHelper: Property<"objc-dynamic-class-extractor", "Enum">,
76    DefaultEnumValue<"eDynamicClassInfoHelperAuto">,
77    EnumValues<"OptionEnumValues(g_dynamic_class_info_helper_value_types)">,
78    Desc<"Configure how LLDB parses dynamic Objective-C class metadata. By default LLDB will choose the most appropriate method for the target OS.">;
79  def AutoApplyFixIts: Property<"auto-apply-fixits", "Boolean">,
80    DefaultTrue,
81    Desc<"Automatically apply fix-it hints to expressions.">;
82  def RetriesWithFixIts: Property<"retries-with-fixits", "UInt64">,
83    DefaultUnsignedValue<1>,
84    Desc<"Maximum number of attempts to fix an expression with Fix-Its">;
85  def NotifyAboutFixIts: Property<"notify-about-fixits", "Boolean">,
86    DefaultTrue,
87    Desc<"Print the fixed expression text.">;
88  def SaveObjectsDir: Property<"save-jit-objects-dir", "FileSpec">,
89    DefaultStringValue<"">,
90    Desc<"If specified, the directory to save intermediate object files generated by the LLVM JIT">;
91  def ShowHexVariableValuesWithLeadingZeroes: Property<"show-hex-variable-values-with-leading-zeroes", "Boolean">,
92    Global,
93    DefaultTrue,
94    Desc<"Whether to display leading zeroes when printing variable values in hex format.">;
95  def MaxZeroPaddingInFloatFormat: Property<"max-zero-padding-in-float-format", "UInt64">,
96    DefaultUnsignedValue<6>,
97    Desc<"The maximum number of zeroes to insert when displaying a very small float before falling back to scientific notation.">;
98  def MaxChildrenCount: Property<"max-children-count", "UInt64">,
99    DefaultUnsignedValue<256>,
100    Desc<"Maximum number of children to expand in any level of depth.">;
101  def MaxChildrenDepth: Property<"max-children-depth", "UInt64">,
102    DefaultUnsignedValue<0xFFFFFFFF>,
103    Desc<"Maximum depth to expand children.">;
104  def MaxSummaryLength: Property<"max-string-summary-length", "UInt64">,
105    DefaultUnsignedValue<1024>,
106    Desc<"Maximum number of characters to show when using %s in summary strings.">;
107  def MaxMemReadSize: Property<"max-memory-read-size", "UInt64">,
108    DefaultUnsignedValue<0xffffffff>,
109    Desc<"Maximum number of bytes that 'memory read' will fetch before --force must be specified.">;
110  def BreakpointUseAvoidList: Property<"breakpoints-use-platform-avoid-list", "Boolean">,
111    DefaultTrue,
112    Desc<"Consult the platform module avoid list when setting non-module specific breakpoints.">;
113  def Arg0: Property<"arg0", "String">,
114    DefaultStringValue<"">,
115    Desc<"The first argument passed to the program in the argument array which can be different from the executable itself.">;
116  def RunArgs: Property<"run-args", "Args">,
117    DefaultStringValue<"">,
118    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.">;
119  def EnvVars: Property<"env-vars", "Dictionary">,
120    ElementType<"String">,
121    Desc<"A list of user provided environment variables to be passed to the executable's environment, and their values.">;
122  def UnsetEnvVars: Property<"unset-env-vars", "Array">,
123    ElementType<"String">,
124    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.">;
125  def InheritEnv: Property<"inherit-env", "Boolean">,
126    DefaultTrue,
127    Desc<"Inherit the environment from the process that is running LLDB.">;
128  def InputPath: Property<"input-path", "FileSpec">,
129    DefaultStringValue<"">,
130    Desc<"The file/path to be used by the executable program for reading its standard input.">;
131  def OutputPath: Property<"output-path", "FileSpec">,
132    DefaultStringValue<"">,
133    Desc<"The file/path to be used by the executable program for writing its standard output.">;
134  def ErrorPath: Property<"error-path", "FileSpec">,
135    DefaultStringValue<"">,
136    Desc<"The file/path to be used by the executable program for writing its standard error.">;
137  def DetachOnError: Property<"detach-on-error", "Boolean">,
138    DefaultTrue,
139    Desc<"debugserver will detach (rather than killing) a process if it loses connection with lldb.">;
140  def PreloadSymbols: Property<"preload-symbols", "Boolean">,
141    DefaultTrue,
142    Desc<"Enable loading of symbol tables before they are needed.">;
143  def DisableASLR: Property<"disable-aslr", "Boolean">,
144    DefaultTrue,
145    Desc<"Disable Address Space Layout Randomization (ASLR)">;
146  def DisableSTDIO: Property<"disable-stdio", "Boolean">,
147    DefaultFalse,
148    Desc<"Disable stdin/stdout for process (e.g. for a GUI application)">;
149  def InheritTCC: Property<"inherit-tcc", "Boolean">,
150    DefaultFalse,
151    Desc<"Inherit the TCC permissions from the inferior's parent instead of making the process itself responsible.">;
152  def InlineStrategy: Property<"inline-breakpoint-strategy", "Enum">,
153    DefaultEnumValue<"eInlineBreakpointsAlways">,
154    EnumValues<"OptionEnumValues(g_inline_breakpoint_enums)">,
155    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.">;
156  def SourceRealpathPrefixes: Property<"source-realpath-prefixes", "FileSpecList">,
157    DefaultStringValue<"">,
158    Desc<"Realpath any source paths that start with one of these prefixes. If the debug info contains symlinks which match the original source file's basename but don't match its location that the user will use to set breakpoints, then this setting can help resolve breakpoints correctly. This handles both symlinked files and directories. Wild card prefixes: An empty string matches all paths. A forward slash matches absolute paths.">;
159  def DisassemblyFlavor: Property<"x86-disassembly-flavor", "Enum">,
160    DefaultEnumValue<"eX86DisFlavorDefault">,
161    EnumValues<"OptionEnumValues(g_x86_dis_flavor_value_types)">,
162    Desc<"The default disassembly flavor to use for x86 or x86-64 targets.">;
163  def DisassemblyCPU: Property<"disassembly-cpu", "String">,
164    DefaultStringValue<"">,
165    Desc<"Override the CPU for disassembling. Takes the same values as the -mcpu clang flag.">;
166  def DisassemblyFeatures: Property<"disassembly-features", "String">,
167    DefaultStringValue<"">,
168    Desc<"Specify additional CPU features for disassembling.">;
169  def UseHexImmediates: Property<"use-hex-immediates", "Boolean">,
170    DefaultTrue,
171    Desc<"Show immediates in disassembly as hexadecimal.">;
172  def HexImmediateStyle: Property<"hex-immediate-style", "Enum">,
173    DefaultEnumValue<"Disassembler::eHexStyleC">,
174    EnumValues<"OptionEnumValues(g_hex_immediate_style_values)">,
175    Desc<"Which style to use for printing hexadecimal disassembly values.">;
176  def UseFastStepping: Property<"use-fast-stepping", "Boolean">,
177    DefaultTrue,
178    Desc<"Use a fast stepping algorithm based on running from branch to branch rather than instruction single-stepping.">;
179  def LoadScriptFromSymbolFile: Property<"load-script-from-symbol-file", "Enum">,
180    DefaultEnumValue<"eLoadScriptFromSymFileWarn">,
181    EnumValues<"OptionEnumValues(g_load_script_from_sym_file_values)">,
182    Desc<"Allow LLDB to load scripting resources embedded in symbol files when available.">;
183  def LoadCWDlldbinitFile: Property<"load-cwd-lldbinit", "Enum">,
184    DefaultEnumValue<"eLoadCWDlldbinitWarn">,
185    EnumValues<"OptionEnumValues(g_load_cwd_lldbinit_values)">,
186    Desc<"Allow LLDB to .lldbinit files from the current directory automatically.">;
187  def MemoryModuleLoadLevel: Property<"memory-module-load-level", "Enum">,
188    DefaultEnumValue<"eMemoryModuleLoadLevelComplete">,
189    EnumValues<"OptionEnumValues(g_memory_module_load_level_values)">,
190    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). ">;
191  def DisplayExpressionsInCrashlogs: Property<"display-expression-in-crashlogs", "Boolean">,
192    DefaultFalse,
193    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.">;
194  def TrapHandlerNames: Property<"trap-handler-names", "Array">,
195    Global,
196    ElementType<"String">,
197    Desc<"A list of trap handler function names, e.g. a common Unix user process one is _sigtramp.">;
198  def DisplayRuntimeSupportValues: Property<"display-runtime-support-values", "Boolean">,
199    DefaultFalse,
200    Desc<"If true, LLDB will show variables that are meant to support the operation of a language's runtime support.">;
201  def DisplayRecognizedArguments: Property<"display-recognized-arguments", "Boolean">,
202    DefaultFalse,
203    Desc<"Show recognized arguments in variable listings by default.">;
204  def RequireHardwareBreakpoints: Property<"require-hardware-breakpoint", "Boolean">,
205    DefaultFalse,
206    Desc<"Require all breakpoints to be hardware breakpoints.">;
207  def AutoInstallMainExecutable: Property<"auto-install-main-executable", "Boolean">,
208    DefaultTrue,
209    Desc<"Always install the main executable when connected to a remote platform.">;
210  def DebugUtilityExpression: Property<"debug-utility-expression", "Boolean">,
211    DefaultFalse,
212    Desc<"Enable debugging of LLDB-internal utility expressions.">;
213  def LaunchWorkingDir: Property<"launch-working-dir", "String">,
214    DefaultStringValue<"">,
215    Desc<"A default value for the working directory to use when launching processes. "
216         "It is ignored when empty. This setting is only used when the target is "
217         "launched. If you change this setting, the new value will only apply to "
218         "subsequent launches. Commands that take an explicit working directory "
219         "will override this setting.">;
220}
221
222let Definition = "process_experimental" in {
223  def OSPluginReportsAllThreads: Property<"os-plugin-reports-all-threads", "Boolean">,
224    Global,
225    DefaultTrue,
226    Desc<"Set to False if your Python OS Plugin doesn't report all threads on each stop.">;
227}
228
229let Definition = "process" in {
230  def DisableMemCache: Property<"disable-memory-cache", "Boolean">,
231    DefaultFalse,
232    Desc<"Disable reading and caching of memory in fixed-size units.">;
233  def ExtraStartCommand: Property<"extra-startup-command", "Array">,
234    ElementType<"String">,
235    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;'">;
236  def IgnoreBreakpointsInExpressions: Property<"ignore-breakpoints-in-expressions", "Boolean">,
237    Global,
238    DefaultTrue,
239    Desc<"If true, breakpoints will be ignored during expression evaluation.">;
240  def UnwindOnErrorInExpressions: Property<"unwind-on-error-in-expressions", "Boolean">,
241    Global,
242    DefaultTrue,
243    Desc<"If true, errors in expression evaluation will unwind the stack back to the state before the call.">;
244  def PythonOSPluginPath: Property<"python-os-plugin-path", "FileSpec">,
245    DefaultUnsignedValue<1>,
246    Desc<"A path to a python OS plug-in module file that contains a OperatingSystemPlugIn class.">;
247  def StopOnSharedLibraryEvents: Property<"stop-on-sharedlibrary-events", "Boolean">,
248    Global,
249    DefaultFalse,
250    Desc<"If true, stop when a shared library is loaded or unloaded.">;
251  def DisableLangRuntimeUnwindPlans: Property<"disable-language-runtime-unwindplans", "Boolean">,
252    Global,
253    DefaultFalse,
254    Desc<"If true, language runtime augmented/overridden backtraces will not be used when printing a stack trace.">;
255  def DetachKeepsStopped: Property<"detach-keeps-stopped", "Boolean">,
256    Global,
257    DefaultFalse,
258    Desc<"If true, detach will attempt to keep the process stopped.">;
259  def MemCacheLineSize: Property<"memory-cache-line-size", "UInt64">,
260    DefaultUnsignedValue<512>,
261    Desc<"The memory cache line size">;
262  def WarningOptimization: Property<"optimization-warnings", "Boolean">,
263    DefaultTrue,
264    Desc<"If true, warn when stopped in code that is optimized where stepping and variable availability may not behave as expected.">;
265  def WarningUnsupportedLanguage: Property<"unsupported-language-warnings", "Boolean">,
266    DefaultTrue,
267    Desc<"If true, warn when stopped in code that is written in a source language that LLDB does not support.">;
268  def StopOnExec: Property<"stop-on-exec", "Boolean">,
269    Global,
270    DefaultTrue,
271    Desc<"If true, stop when the inferior exec's.">;
272  def UtilityExpressionTimeout: Property<"utility-expression-timeout", "UInt64">,
273#ifdef LLDB_SANITIZED
274    DefaultUnsignedValue<60>,
275#else
276    DefaultUnsignedValue<15>,
277#endif
278    Desc<"The time in seconds to wait for LLDB-internal utility expressions.">;
279  def InterruptTimeout: Property<"interrupt-timeout", "UInt64">,
280#ifdef LLDB_SANITIZED
281    DefaultUnsignedValue<60>,
282#else
283    DefaultUnsignedValue<20>,
284#endif
285    Desc<"The time in seconds to wait for an interrupt succeed in stopping the target.">;
286  def SteppingRunsAllThreads: Property<"run-all-threads", "Boolean">,
287    DefaultFalse,
288    Desc<"If true, stepping operations will run all threads.  This is equivalent to setting the run-mode option to 'all-threads'.">;
289  def VirtualAddressableBits: Property<"virtual-addressable-bits", "UInt64">,
290    DefaultUnsignedValue<0>,
291    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.">;
292  def HighmemVirtualAddressableBits: Property<"highmem-virtual-addressable-bits", "UInt64">,
293    DefaultUnsignedValue<0>,
294    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.">;
295  def FollowForkMode: Property<"follow-fork-mode", "Enum">,
296    DefaultEnumValue<"eFollowParent">,
297    EnumValues<"OptionEnumValues(g_follow_fork_mode_values)">,
298    Desc<"Debugger's behavior upon fork or vfork.">;
299}
300
301let Definition = "platform" in {
302  def UseModuleCache: Property<"use-module-cache", "Boolean">,
303    Global,
304    DefaultTrue,
305    Desc<"Use module cache.">;
306  def ModuleCacheDirectory: Property<"module-cache-directory", "FileSpec">,
307    Global,
308    DefaultStringValue<"">,
309    Desc<"Root directory for cached modules.">;
310}
311
312let Definition = "thread" in {
313  def StepInAvoidsNoDebug: Property<"step-in-avoid-nodebug", "Boolean">,
314    Global,
315    DefaultTrue,
316    Desc<"If true, step-in will not stop in functions with no debug information.">;
317  def StepOutAvoidsNoDebug: Property<"step-out-avoid-nodebug", "Boolean">,
318    Global,
319    DefaultFalse,
320    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.">;
321  def StepAvoidRegex: Property<"step-avoid-regexp", "Regex">,
322    Global,
323    DefaultStringValue<"^std::">,
324    Desc<"A regular expression defining functions step-in won't stop in.">;
325  def StepAvoidLibraries: Property<"step-avoid-libraries", "FileSpecList">,
326    Global,
327    DefaultStringValue<"">,
328    Desc<"A list of libraries that source stepping won't stop in.">;
329  def EnableThreadTrace: Property<"trace-thread", "Boolean">,
330    DefaultFalse,
331    Desc<"If true, this thread will single-step and log execution.">;
332  def MaxBacktraceDepth: Property<"max-backtrace-depth", "UInt64">,
333    DefaultUnsignedValue<600000>,
334    Desc<"Maximum number of frames to backtrace.">;
335  def SingleThreadPlanTimeout: Property<"single-thread-plan-timeout", "UInt64">,
336    Global,
337    DefaultUnsignedValue<1000>,
338    Desc<"The time in milliseconds to wait for single thread ThreadPlan to move forward before resuming all threads to resolve any potential deadlock. Specify value 0 to disable timeout.">;
339}
340
341let Definition = "language" in {
342  def EnableFilterForLineBreakpoints: Property<"enable-filter-for-line-breakpoints", "Boolean">,
343    DefaultTrue,
344    Desc<"If true, allow Language plugins to filter locations when setting breakpoints by line number or regex.">;
345}
346