Rizin
unix-like reverse engineering framework and cli tools
|
#include <rz_cmd.h>
Public Attributes | |
RzCmdDescType | type |
char * | name |
struct rz_cmd_desc_t * | parent |
int | n_children |
RzPVector | children |
const RzCmdDescHelp * | help |
union { | |
struct { | |
RzCmdCb cb | |
} oldinput_data | |
struct { | |
RzCmdArgvCb cb | |
int min_argc | |
int max_argc | |
} argv_data | |
struct { | |
struct rz_cmd_desc_t * exec_cd | |
} group_data | |
struct { | |
RzCmdArgvModesCb cb | |
int modes | |
A combination of RzOutputMode values. More... | |
RzOutputMode default_mode | |
Make one of the modes the default one, used even when the special suffix is not specified. More... | |
int min_argc | |
int max_argc | |
} argv_modes_data | |
struct { | |
RzCmdArgvStateCb cb | |
int modes | |
A combination of RzOutputMode values. More... | |
RzOutputMode default_mode | |
Make one of the modes the default one, used even when the special suffix is not specified. More... | |
int min_argc | |
int max_argc | |
} argv_state_data | |
} | d |
Command Descriptor structure. It represents a command that can be executed by the user on the shell or a part of the command help (e.g. groups of commands). Anything that appears under ?
has an associated command descriptor.
struct { ... } rz_cmd_desc_t::argv_data |
Referenced by argv_new().
struct { ... } rz_cmd_desc_t::argv_modes_data |
Referenced by argv_modes_new().
struct { ... } rz_cmd_desc_t::argv_state_data |
Referenced by argv_state_new().
RzCmdArgvCb rz_cmd_desc_t::cb |
RzCmdArgvModesCb rz_cmd_desc_t::cb |
RzCmdArgvStateCb rz_cmd_desc_t::cb |
RzPVector rz_cmd_desc_t::children |
Vector of childrens command descriptors.
Definition at line 440 of file rz_cmd.h.
Referenced by cmd_desc_set_parent(), cmd_desc_unset_parent(), create_cmd_desc(), and sort_groups().
union { ... } rz_cmd_desc_t::d |
Type-specific fields.
Referenced by argv_modes_new(), argv_new(), argv_state_new(), rz_cmd_desc_group_modes_new(), rz_cmd_desc_group_new(), rz_cmd_desc_group_state_new(), and rz_cmd_desc_oldinput_new().
RzOutputMode rz_cmd_desc_t::default_mode |
struct rz_cmd_desc_t* rz_cmd_desc_t::exec_cd |
struct { ... } rz_cmd_desc_t::group_data |
Referenced by rz_cmd_desc_group_modes_new(), rz_cmd_desc_group_new(), and rz_cmd_desc_group_state_new().
const RzCmdDescHelp* rz_cmd_desc_t::help |
Reference to the help structure of this command descriptor.
Definition at line 444 of file rz_cmd.h.
Referenced by cmd_desc_set_parent(), create_cmd_desc(), and sort_groups().
int rz_cmd_desc_t::modes |
int rz_cmd_desc_t::n_children |
Number of children command descriptors of this node.
Definition at line 436 of file rz_cmd.h.
Referenced by cmd_desc_set_parent(), cmd_desc_unset_parent(), and create_cmd_desc().
char* rz_cmd_desc_t::name |
Base name of the command. This is used to retrieve the RzCmdDesc
when a user executes a command. It can match multiple user-called commands. For example a command that accepts STANDARD and JSON modes
is called for both <name>
and <name>j
.
Definition at line 425 of file rz_cmd.h.
Referenced by cmd_descs_generate.Arg::__str__(), cmd_descs_generate.Detail::__str__(), cmd_descs_generate.Arg::_get_choices_cname(), cmd_descs_generate.CmdDesc::_validate(), cd_sort(), create_cmd_desc(), DEFINE_HANDLE_TS_FCN_AND_SYMBOL(), fill_children_chars(), cmd_descs_generate.Detail::get_detail_entries_cname(), test_group_name.GroupTest::run(), and cmd_descs_generate.CmdDesc::str_tab().
struct { ... } rz_cmd_desc_t::oldinput_data |
Referenced by rz_cmd_desc_oldinput_new().
struct rz_cmd_desc_t* rz_cmd_desc_t::parent |
Parent of this command descriptor.
Commands are organized in a tree, with the root being shown when doing ?
. This relationship is used when showing commands helps.
Definition at line 432 of file rz_cmd.h.
Referenced by cmd_descs_generate.CmdDesc::_validate().
RzCmdDescType rz_cmd_desc_t::type |
Type of the command descriptor. There are several types of commands: those that are still using the old-style and parses the input string themselves, those that accept argc/argv, etc.
Definition at line 418 of file rz_cmd.h.
Referenced by cmd_descs_generate.Arg::__str__(), cmd_descs_generate.Arg::_get_choices_cname(), cmd_descs_generate.Arg::_get_union(), cmd_descs_generate.CmdDesc::_validate(), cmd_desc_set_parent(), create_cmd_desc(), cmd_descs_generate.Arg::decl(), fill_children_chars(), cmd_descs_generate.Arg::get_cstructure(), and cmd_descs_generate.CmdDesc::get_handler_cname().