本文整理汇总了C++中CommandArgumentEntry::push_back方法的典型用法代码示例。如果您正苦于以下问题:C++ CommandArgumentEntry::push_back方法的具体用法?C++ CommandArgumentEntry::push_back怎么用?C++ CommandArgumentEntry::push_back使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CommandArgumentEntry
的用法示例。
在下文中一共展示了CommandArgumentEntry::push_back方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CommandObjectFrameVariable
CommandObjectFrameVariable (CommandInterpreter &interpreter) :
CommandObjectParsed (interpreter,
"frame variable",
"Show frame variables. All argument and local variables "
"that are in scope will be shown when no arguments are given. "
"If any arguments are specified, they can be names of "
"argument, local, file static and file global variables. "
"Children of aggregate variables can be specified such as "
"'var->child.x'.",
NULL,
eFlagProcessMustBeLaunched | eFlagProcessMustBePaused),
m_option_group (interpreter),
m_option_variable(true), // Include the frame specific options by passing "true"
m_option_format (eFormatDefault),
m_varobj_options()
{
CommandArgumentEntry arg;
CommandArgumentData var_name_arg;
// Define the first (and only) variant of this arg.
var_name_arg.arg_type = eArgTypeVarName;
var_name_arg.arg_repetition = eArgRepeatStar;
// There is only one variant this argument could be; put it into the argument entry.
arg.push_back (var_name_arg);
// Push the data for the first argument into the m_arguments vector.
m_arguments.push_back (arg);
m_option_group.Append (&m_option_variable, LLDB_OPT_SET_ALL, LLDB_OPT_SET_1);
m_option_group.Append (&m_option_format, OptionGroupFormat::OPTION_GROUP_FORMAT | OptionGroupFormat::OPTION_GROUP_GDB_FMT, LLDB_OPT_SET_1);
m_option_group.Append (&m_varobj_options, LLDB_OPT_SET_ALL, LLDB_OPT_SET_1);
m_option_group.Finalize();
}
示例2: CommandObjectRegisterRead
CommandObjectRegisterRead (CommandInterpreter &interpreter) :
CommandObjectParsed (interpreter,
"register read",
"Dump the contents of one or more register values from the current frame. If no register is specified, dumps them all.",
NULL,
eFlagRequiresFrame |
eFlagRequiresRegContext |
eFlagProcessMustBeLaunched |
eFlagProcessMustBePaused ),
m_option_group (interpreter),
m_format_options (eFormatDefault),
m_command_options ()
{
CommandArgumentEntry arg;
CommandArgumentData register_arg;
// Define the first (and only) variant of this arg.
register_arg.arg_type = eArgTypeRegisterName;
register_arg.arg_repetition = eArgRepeatStar;
// There is only one variant this argument could be; put it into the argument entry.
arg.push_back (register_arg);
// Push the data for the first argument into the m_arguments vector.
m_arguments.push_back (arg);
// Add the "--format"
m_option_group.Append (&m_format_options, OptionGroupFormat::OPTION_GROUP_FORMAT | OptionGroupFormat::OPTION_GROUP_GDB_FMT, LLDB_OPT_SET_ALL);
m_option_group.Append (&m_command_options);
m_option_group.Finalize();
}
示例3:
void
CommandObject::AddIDsArgumentData(CommandArgumentEntry &arg, CommandArgumentType ID, CommandArgumentType IDRange)
{
CommandArgumentData id_arg;
CommandArgumentData id_range_arg;
// Create the first variant for the first (and only) argument for this command.
id_arg.arg_type = ID;
id_arg.arg_repetition = eArgRepeatOptional;
// Create the second variant for the first (and only) argument for this command.
id_range_arg.arg_type = IDRange;
id_range_arg.arg_repetition = eArgRepeatOptional;
// The first (and only) argument for this command could be either an id or an id_range.
// Push both variants into the entry for the first argument for this command.
arg.push_back(id_arg);
arg.push_back(id_range_arg);
}
示例4: CommandObjectParsed
CommandObjectMultiwordItaniumABI_Demangle(CommandInterpreter &interpreter)
: CommandObjectParsed(interpreter, "demangle",
"Demangle a C++ mangled name.",
"language cplusplus demangle") {
CommandArgumentEntry arg;
CommandArgumentData index_arg;
// Define the first (and only) variant of this arg.
index_arg.arg_type = eArgTypeSymbol;
index_arg.arg_repetition = eArgRepeatPlus;
// There is only one variant this argument could be; put it into the
// argument entry.
arg.push_back(index_arg);
// Push the data for the first argument into the m_arguments vector.
m_arguments.push_back(arg);
}
示例5: CommandObjectWatchpointSetVariable
CommandObjectWatchpointSetVariable (CommandInterpreter &interpreter) :
CommandObjectParsed (interpreter,
"watchpoint set variable",
"Set a watchpoint on a variable. "
"Use the '-w' option to specify the type of watchpoint and "
"the '-x' option to specify the byte size to watch for. "
"If no '-w' option is specified, it defaults to write. "
"If no '-x' option is specified, it defaults to the variable's "
"byte size. "
"Note that there are limited hardware resources for watchpoints. "
"If watchpoint setting fails, consider disable/delete existing ones "
"to free up resources.",
NULL,
eFlagRequiresFrame |
eFlagTryTargetAPILock |
eFlagProcessMustBeLaunched |
eFlagProcessMustBePaused ),
m_option_group (interpreter),
m_option_watchpoint ()
{
SetHelpLong(
"Examples: \n\
\n\
watchpoint set variable -w read_write my_global_var \n\
# Watch my_global_var for read/write access, with the region to watch corresponding to the byte size of the data type.\n");
CommandArgumentEntry arg;
CommandArgumentData var_name_arg;
// Define the only variant of this arg.
var_name_arg.arg_type = eArgTypeVarName;
var_name_arg.arg_repetition = eArgRepeatPlain;
// Push the variant into the argument entry.
arg.push_back (var_name_arg);
// Push the data for the only argument into the m_arguments vector.
m_arguments.push_back (arg);
// Absorb the '-w' and '-x' options into our option group.
m_option_group.Append (&m_option_watchpoint, LLDB_OPT_SET_ALL, LLDB_OPT_SET_1);
m_option_group.Finalize();
}
示例6: CommandObjectParsed
CommandObjectSyntax::CommandObjectSyntax (CommandInterpreter &interpreter) :
CommandObjectParsed (interpreter,
"syntax",
"Shows the correct syntax for a given debugger command.",
"syntax <command>")
{
CommandArgumentEntry arg;
CommandArgumentData command_arg;
// Define the first (and only) variant of this arg.
command_arg.arg_type = eArgTypeCommandName;
command_arg.arg_repetition = eArgRepeatPlain;
// There is only one variant this argument could be; put it into the argument entry.
arg.push_back (command_arg);
// Push the data for the first argument into the m_arguments vector.
m_arguments.push_back (arg);
}
示例7: CommandObjectLogList
//------------------------------------------------------------------
// Constructors and Destructors
//------------------------------------------------------------------
CommandObjectLogList(CommandInterpreter &interpreter) :
CommandObjectParsed (interpreter,
"log list",
"List the log categories for one or more log channels. If none specified, lists them all.",
NULL)
{
CommandArgumentEntry arg;
CommandArgumentData channel_arg;
// Define the first (and only) variant of this arg.
channel_arg.arg_type = eArgTypeLogChannel;
channel_arg.arg_repetition = eArgRepeatStar;
// There is only one variant this argument could be; put it into the argument entry.
arg.push_back (channel_arg);
// Push the data for the first argument into the m_arguments vector.
m_arguments.push_back (arg);
}
示例8: CommandObjectParsed
CommandObjectHelp::CommandObjectHelp (CommandInterpreter &interpreter) :
CommandObjectParsed (interpreter,
"help",
"Show a list of all debugger commands, or give details about specific commands.",
"help [<cmd-name>]"), m_options (interpreter)
{
CommandArgumentEntry arg;
CommandArgumentData command_arg;
// Define the first (and only) variant of this arg.
command_arg.arg_type = eArgTypeCommandName;
command_arg.arg_repetition = eArgRepeatStar;
// There is only one variant this argument could be; put it into the argument entry.
arg.push_back (command_arg);
// Push the data for the first argument into the m_arguments vector.
m_arguments.push_back (arg);
}
示例9: CommandObject
CommandObjectApropos::CommandObjectApropos (CommandInterpreter &interpreter) :
CommandObject (interpreter,
"apropos",
"Find a list of debugger commands related to a particular word/subject.",
NULL)
{
CommandArgumentEntry arg;
CommandArgumentData search_word_arg;
// Define the first (and only) variant of this arg.
search_word_arg.arg_type = eArgTypeSearchWord;
search_word_arg.arg_repetition = eArgRepeatPlain;
// There is only one variant this argument could be; put it into the argument entry.
arg.push_back (search_word_arg);
// Push the data for the first argument into the m_arguments vector.
m_arguments.push_back (arg);
}
示例10: CommandObjectSourceList
CommandObjectSourceList(CommandInterpreter &interpreter) :
CommandObject (interpreter,
"source list",
"Display source code (as specified) based on the current executable's debug info.",
NULL)
{
CommandArgumentEntry arg;
CommandArgumentData file_arg;
// Define the first (and only) variant of this arg.
file_arg.arg_type = eArgTypeFilename;
file_arg.arg_repetition = eArgRepeatOptional;
// There is only one variant this argument could be; put it into the argument entry.
arg.push_back (file_arg);
// Push the data for the first argument into the m_arguments vector.
m_arguments.push_back (arg);
}
示例11: CommandObjectPlatformProcessInfo
CommandObjectPlatformProcessInfo (CommandInterpreter &interpreter) :
CommandObjectParsed (interpreter,
"platform process info",
"Get detailed information for one or more process by process ID.",
"platform process info <pid> [<pid> <pid> ...]",
0)
{
CommandArgumentEntry arg;
CommandArgumentData pid_args;
// Define the first (and only) variant of this arg.
pid_args.arg_type = eArgTypePid;
pid_args.arg_repetition = eArgRepeatStar;
// There is only one variant this argument could be; put it into the argument entry.
arg.push_back (pid_args);
// Push the data for the first argument into the m_arguments vector.
m_arguments.push_back (arg);
}
示例12: CommandObjectFrameSelect
CommandObjectFrameSelect (CommandInterpreter &interpreter) :
CommandObjectParsed (interpreter,
"frame select",
"Select a frame by index from within the current thread and make it the current frame.",
NULL,
eFlagProcessMustBeLaunched | eFlagProcessMustBePaused),
m_options (interpreter)
{
CommandArgumentEntry arg;
CommandArgumentData index_arg;
// Define the first (and only) variant of this arg.
index_arg.arg_type = eArgTypeFrameIndex;
index_arg.arg_repetition = eArgRepeatOptional;
// There is only one variant this argument could be; put it into the argument entry.
arg.push_back (index_arg);
// Push the data for the first argument into the m_arguments vector.
m_arguments.push_back (arg);
}
示例13: CommandObjectRegisterRead
CommandObjectRegisterRead (CommandInterpreter &interpreter) :
CommandObject (interpreter,
"register read",
"Dump the contents of one or more register values from the current frame. If no register is specified, dumps them all.",
//"register read [<reg-name1> [<reg-name2> [...]]]",
NULL,
eFlagProcessMustBeLaunched | eFlagProcessMustBePaused)
{
CommandArgumentEntry arg;
CommandArgumentData register_arg;
// Define the first (and only) variant of this arg.
register_arg.arg_type = eArgTypeRegisterName;
register_arg.arg_repetition = eArgRepeatStar;
// There is only one variant this argument could be; put it into the argument entry.
arg.push_back (register_arg);
// Push the data for the first argument into the m_arguments vector.
m_arguments.push_back (arg);
}
示例14: CommandObjectFrameVariable
CommandObjectFrameVariable(CommandInterpreter &interpreter)
: CommandObjectParsed(
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'.",
nullptr, eCommandRequiresFrame | eCommandTryTargetAPILock |
eCommandProcessMustBeLaunched |
eCommandProcessMustBePaused | eCommandRequiresProcess),
m_option_group(),
m_option_variable(
true), // Include the frame specific options by passing "true"
m_option_format(eFormatDefault),
m_varobj_options() {
CommandArgumentEntry arg;
CommandArgumentData var_name_arg;
// Define the first (and only) variant of this arg.
var_name_arg.arg_type = eArgTypeVarName;
var_name_arg.arg_repetition = eArgRepeatStar;
// There is only one variant this argument could be; put it into the
// argument entry.
arg.push_back(var_name_arg);
// Push the data for the first argument into the m_arguments vector.
m_arguments.push_back(arg);
m_option_group.Append(&m_option_variable, LLDB_OPT_SET_ALL, LLDB_OPT_SET_1);
m_option_group.Append(&m_option_format,
OptionGroupFormat::OPTION_GROUP_FORMAT |
OptionGroupFormat::OPTION_GROUP_GDB_FMT,
LLDB_OPT_SET_1);
m_option_group.Append(&m_varobj_options, LLDB_OPT_SET_ALL, LLDB_OPT_SET_1);
m_option_group.Finalize();
}
示例15: CommandObjectFrameSelect
CommandObjectFrameSelect(CommandInterpreter &interpreter)
: CommandObjectParsed(
interpreter, "frame select", "Select the current stack frame by "
"index from within the current thread "
"(see 'thread backtrace'.)",
nullptr,
eCommandRequiresThread | eCommandTryTargetAPILock |
eCommandProcessMustBeLaunched | eCommandProcessMustBePaused),
m_options() {
CommandArgumentEntry arg;
CommandArgumentData index_arg;
// Define the first (and only) variant of this arg.
index_arg.arg_type = eArgTypeFrameIndex;
index_arg.arg_repetition = eArgRepeatOptional;
// There is only one variant this argument could be; put it into the
// argument entry.
arg.push_back(index_arg);
// Push the data for the first argument into the m_arguments vector.
m_arguments.push_back(arg);
}