aboutsummaryrefslogtreecommitdiffstats
path: root/source/Interpreter/OptionGroupVariable.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2019-01-19 10:06:29 +0000
committerDimitry Andric <dim@FreeBSD.org>2019-01-19 10:06:29 +0000
commit94994d372d014ce4c8758b9605d63fae651bd8aa (patch)
tree51c0b708bd59f205d6b35cb2a8c24d62f0c33d77 /source/Interpreter/OptionGroupVariable.cpp
parent39be7ce23363d12ae3e49aeb1fdb2bfeb892e836 (diff)
downloadsrc-94994d372d014ce4c8758b9605d63fae651bd8aa.tar.gz
src-94994d372d014ce4c8758b9605d63fae651bd8aa.zip
Vendor import of lldb trunk r351319 (just before the release_80 branchvendor/lldb/lldb-trunk-r351319
Notes
Notes: svn path=/vendor/lldb/dist/; revision=343181 svn path=/vendor/lldb/lldb-trunk-r351319/; revision=343182; tag=vendor/lldb/lldb-trunk-r351319
Diffstat (limited to 'source/Interpreter/OptionGroupVariable.cpp')
-rw-r--r--source/Interpreter/OptionGroupVariable.cpp33
1 files changed, 18 insertions, 15 deletions
diff --git a/source/Interpreter/OptionGroupVariable.cpp b/source/Interpreter/OptionGroupVariable.cpp
index 7b7a62be8743..f90212cfcb2f 100644
--- a/source/Interpreter/OptionGroupVariable.cpp
+++ b/source/Interpreter/OptionGroupVariable.cpp
@@ -9,10 +9,6 @@
#include "lldb/Interpreter/OptionGroupVariable.h"
-// C Includes
-// C++ Includes
-// Other libraries and framework includes
-// Project includes
#include "lldb/DataFormatters/DataVisualization.h"
#include "lldb/Host/OptionParser.h"
#include "lldb/Interpreter/CommandInterpreter.h"
@@ -24,31 +20,34 @@ using namespace lldb_private;
// if you add any options here, remember to update the counters in
// OptionGroupVariable::GetNumDefinitions()
-static OptionDefinition g_variable_options[] = {
+static constexpr OptionDefinition g_variable_options[] = {
{LLDB_OPT_SET_1 | LLDB_OPT_SET_2, false, "no-args", 'a',
- OptionParser::eNoArgument, nullptr, nullptr, 0, eArgTypeNone,
+ OptionParser::eNoArgument, nullptr, {}, 0, eArgTypeNone,
"Omit function arguments."},
+ {LLDB_OPT_SET_1 | LLDB_OPT_SET_2, false, "no-recognized-args", 't',
+ OptionParser::eNoArgument, nullptr, {}, 0, eArgTypeNone,
+ "Omit recognized function arguments."},
{LLDB_OPT_SET_1 | LLDB_OPT_SET_2, false, "no-locals", 'l',
- OptionParser::eNoArgument, nullptr, nullptr, 0, eArgTypeNone,
+ OptionParser::eNoArgument, nullptr, {}, 0, eArgTypeNone,
"Omit local variables."},
{LLDB_OPT_SET_1 | LLDB_OPT_SET_2, false, "show-globals", 'g',
- OptionParser::eNoArgument, nullptr, nullptr, 0, eArgTypeNone,
+ OptionParser::eNoArgument, nullptr, {}, 0, eArgTypeNone,
"Show the current frame source file global and static variables."},
{LLDB_OPT_SET_1 | LLDB_OPT_SET_2, false, "show-declaration", 'c',
- OptionParser::eNoArgument, nullptr, nullptr, 0, eArgTypeNone,
+ OptionParser::eNoArgument, nullptr, {}, 0, eArgTypeNone,
"Show variable declaration information (source file and line where the "
"variable was declared)."},
{LLDB_OPT_SET_1 | LLDB_OPT_SET_2, false, "regex", 'r',
- OptionParser::eNoArgument, nullptr, nullptr, 0, eArgTypeRegularExpression,
+ OptionParser::eNoArgument, nullptr, {}, 0, eArgTypeRegularExpression,
"The <variable-name> argument for name lookups are regular expressions."},
{LLDB_OPT_SET_1 | LLDB_OPT_SET_2, false, "scope", 's',
- OptionParser::eNoArgument, nullptr, nullptr, 0, eArgTypeNone,
+ OptionParser::eNoArgument, nullptr, {}, 0, eArgTypeNone,
"Show variable scope (argument, local, global, static)."},
{LLDB_OPT_SET_1, false, "summary", 'y', OptionParser::eRequiredArgument,
- nullptr, nullptr, 0, eArgTypeName,
+ nullptr, {}, 0, eArgTypeName,
"Specify the summary that the variable output should use."},
{LLDB_OPT_SET_2, false, "summary-string", 'z',
- OptionParser::eRequiredArgument, nullptr, nullptr, 0, eArgTypeName,
+ OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeName,
"Specify a summary string to use to format the variable output."},
};
@@ -56,8 +55,8 @@ static Status ValidateNamedSummary(const char *str, void *) {
if (!str || !str[0])
return Status("must specify a valid named summary");
TypeSummaryImplSP summary_sp;
- if (DataVisualization::NamedSummaryFormats::GetSummaryFormat(
- ConstString(str), summary_sp) == false)
+ if (!DataVisualization::NamedSummaryFormats::GetSummaryFormat(
+ ConstString(str), summary_sp))
return Status("must specify a valid named summary");
return Status();
}
@@ -101,6 +100,9 @@ OptionGroupVariable::SetOptionValue(uint32_t option_idx,
case 's':
show_scope = true;
break;
+ case 't':
+ show_recognized_args = false;
+ break;
case 'y':
error = summary.SetCurrentValue(option_arg);
break;
@@ -119,6 +121,7 @@ OptionGroupVariable::SetOptionValue(uint32_t option_idx,
void OptionGroupVariable::OptionParsingStarting(
ExecutionContext *execution_context) {
show_args = true; // Frame option only
+ show_recognized_args = true; // Frame option only
show_locals = true; // Frame option only
show_globals = false; // Frame option only
show_decl = false;