aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Commands/CommandObjectFrame.cpp
diff options
context:
space:
mode:
authorDave Lee <davelee.com@gmail.com>2022-01-05 14:22:33 -0800
committerDave Lee <davelee.com@gmail.com>2022-01-05 18:47:52 -0800
commitef6817f9329ce16dae33e64e2534a52647f089b0 (patch)
treea07642152eddef05b3f434779f5cbab9d137e945 /lldb/source/Commands/CommandObjectFrame.cpp
parentcb0e12a144dea486b383876f138a8398e9c9386e (diff)
downloadllvm-ef6817f9329ce16dae33e64e2534a52647f089b0.zip
llvm-ef6817f9329ce16dae33e64e2534a52647f089b0.tar.gz
llvm-ef6817f9329ce16dae33e64e2534a52647f089b0.tar.bz2
[lldb] Break out long help for 'frame var'
The current help for `frame variable` is somewhat long. Its length, combined with the few aliases (`var`, `v`, and `vo`) can make the output of `apropos` redundant and noisy. This separates out the details into a separate long help. Differential Revision: https://reviews.llvm.org/D116708
Diffstat (limited to 'lldb/source/Commands/CommandObjectFrame.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectFrame.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/lldb/source/Commands/CommandObjectFrame.cpp b/lldb/source/Commands/CommandObjectFrame.cpp
index 2b9f531..9cfe997 100644
--- a/lldb/source/Commands/CommandObjectFrame.cpp
+++ b/lldb/source/Commands/CommandObjectFrame.cpp
@@ -394,19 +394,7 @@ public:
interpreter, "frame variable",
"Show variables for the current stack frame. Defaults to all "
"arguments and local variables in scope. Names of argument, "
- "local, file static and file global variables can be specified. "
- "Children of aggregate variables can be specified such as "
- "'var->child.x'. The -> and [] operators in 'frame variable' do "
- "not invoke operator overloads if they exist, but directly access "
- "the specified element. If you want to trigger operator overloads "
- "use the expression command to print the variable instead."
- "\nIt is worth noting that except for overloaded "
- "operators, when printing local variables 'expr local_var' and "
- "'frame var local_var' produce the same "
- "results. However, 'frame variable' is more efficient, since it "
- "uses debug information and memory reads directly, rather than "
- "parsing and evaluating an expression, which may even involve "
- "JITing and running code in the target program.",
+ "local, file static and file global variables can be specified.",
nullptr,
eCommandRequiresFrame | eCommandTryTargetAPILock |
eCommandProcessMustBeLaunched | eCommandProcessMustBePaused |
@@ -415,6 +403,18 @@ public:
m_option_variable(
true), // Include the frame specific options by passing "true"
m_option_format(eFormatDefault), m_varobj_options() {
+ SetHelpLong(R"(
+Children of aggregate variables can be specified such as 'var->child.x'. In
+'frame variable', the operators -> and [] do not invoke operator overloads if
+they exist, but directly access the specified element. If you want to trigger
+operator overloads use the expression command to print the variable instead.
+
+It is worth noting that except for overloaded operators, when printing local
+variables 'expr local_var' and 'frame var local_var' produce the same results.
+However, 'frame variable' is more efficient, since it uses debug information and
+memory reads directly, rather than parsing and evaluating an expression, which
+may even involve JITing and running code in the target program.)");
+
CommandArgumentEntry arg;
CommandArgumentData var_name_arg;