mirror of
https://github.com/radareorg/radare2.git
synced 2025-03-04 04:17:25 +00:00
Implement proper tp help menu (#16397)
This commit is contained in:
parent
eaa46ca936
commit
c4b62fa1c1
@ -72,6 +72,14 @@ static const char *help_msg_to[] = {
|
||||
NULL
|
||||
};
|
||||
|
||||
static const char *help_msg_tp[] = {
|
||||
"Usage: tp[...]", "", "",
|
||||
"tp", " <type> [addr|varname]", "cast data at <address> to <type> and print it (XXX: type can contain spaces)",
|
||||
"tpv", " <type> @ [value]", "Show offset formatted for given type",
|
||||
"tpx", " <type> <hexpairs>", "Show value for type with specified byte sequence (XXX: type can contain spaces)",
|
||||
NULL
|
||||
};
|
||||
|
||||
static const char *help_msg_tc[] = {
|
||||
"Usage: tc[...]", " [cctype]", "",
|
||||
"tc", " [type.name]", "List all/given loaded types in C output format with newlines",
|
||||
@ -1571,7 +1579,7 @@ static int cmd_type(void *data, const char *input) {
|
||||
break;
|
||||
case 'p': // "tp"
|
||||
if (input[1] == '?') { // "tp?"
|
||||
r_core_cmd0 (core, "t?~tp\n");
|
||||
r_core_cmd_help (core, help_msg_tp);
|
||||
} else if (input[1] == 'v') { // "tpv"
|
||||
const char *type_name = r_str_trim_head_ro (input + 2);
|
||||
char *fmt = r_type_format (TDB, type_name);
|
||||
|
Loading…
x
Reference in New Issue
Block a user