2014-05-28 22:49:28 +00:00
|
|
|
/* radare - LGPL - Copyright 2009-2014 - pancake */
|
2012-02-27 01:40:27 +00:00
|
|
|
|
2013-09-23 22:43:31 +00:00
|
|
|
static void flagbars(RCore *core) {
|
|
|
|
int total = 0;
|
|
|
|
int cols = r_cons_get_size (NULL);
|
|
|
|
RListIter *iter;
|
|
|
|
RFlagItem *flag;
|
|
|
|
r_list_foreach (core->flags->flags, iter, flag) {
|
|
|
|
total += flag->offset;
|
|
|
|
}
|
2014-07-30 21:48:12 +00:00
|
|
|
if (!total) // avoid a division by zero
|
|
|
|
return;
|
2013-09-23 22:43:31 +00:00
|
|
|
r_list_foreach (core->flags->flags, iter, flag) {
|
2014-04-22 23:39:17 +00:00
|
|
|
ut32 pbar_val = flag->offset>0 ? flag->offset : 1;
|
2013-09-23 22:43:31 +00:00
|
|
|
r_cons_printf ("%10s", flag->name);
|
|
|
|
r_print_progressbar (core->print,
|
2014-04-22 23:39:17 +00:00
|
|
|
(pbar_val*100)/total, cols);
|
2013-09-23 22:43:31 +00:00
|
|
|
r_cons_newline ();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-02-27 01:40:27 +00:00
|
|
|
static int cmd_flag(void *data, const char *input) {
|
|
|
|
RCore *core = (RCore *)data;
|
|
|
|
ut64 off = core->offset;
|
2012-11-13 02:25:07 +00:00
|
|
|
char *ptr, *str = NULL;
|
2014-09-01 00:24:38 +00:00
|
|
|
char *name = NULL;
|
2012-11-13 02:25:07 +00:00
|
|
|
st64 base;
|
2012-02-27 01:40:27 +00:00
|
|
|
|
2013-06-30 00:45:33 +00:00
|
|
|
// TODO: off+=cursor
|
2012-02-27 01:40:27 +00:00
|
|
|
if (*input)
|
|
|
|
str = strdup (input+1);
|
|
|
|
switch (*input) {
|
2013-09-23 22:43:31 +00:00
|
|
|
case '=':
|
|
|
|
flagbars (core);
|
|
|
|
break;
|
2014-09-01 00:24:38 +00:00
|
|
|
case 'a':
|
|
|
|
if (input[1]==' '){
|
|
|
|
RFlagItem *fi;
|
|
|
|
str = strdup (input+2);
|
|
|
|
ptr = strchr (str, '=');
|
|
|
|
if (!ptr)
|
|
|
|
ptr = strchr (str, ' ');
|
|
|
|
if (ptr) *ptr++ = 0;
|
2014-09-03 13:45:46 +00:00
|
|
|
name = (char *)r_str_chop_ro (str);
|
|
|
|
ptr = (char *)r_str_chop_ro (ptr);
|
2014-09-01 00:24:38 +00:00
|
|
|
fi = r_flag_get (core->flags, name);
|
|
|
|
if (!fi)
|
|
|
|
fi = r_flag_set (core->flags, name,
|
|
|
|
core->offset, 1, 0);
|
|
|
|
if (fi) {
|
|
|
|
r_flag_item_set_alias (fi, ptr);
|
|
|
|
} else {
|
|
|
|
eprintf ("Cannot find flag '%s'\n", name);
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
eprintf ("Usage: fa flagname flagalias\n");
|
|
|
|
}
|
|
|
|
break;
|
2014-03-02 04:41:45 +00:00
|
|
|
case 'm':
|
|
|
|
r_flag_move (core->flags, core->offset, r_num_math (core->num, input+1));
|
|
|
|
break;
|
2013-09-03 20:45:43 +00:00
|
|
|
case '2':
|
|
|
|
r_flag_get_i2 (core->flags, r_num_math (core->num, input+1));
|
|
|
|
break;
|
2013-08-29 01:19:16 +00:00
|
|
|
case 'R':
|
|
|
|
{
|
|
|
|
char *p = strchr (str+1, ' ');
|
|
|
|
ut64 from, to, mask = 0xffff;
|
|
|
|
int ret;
|
|
|
|
if (p) {
|
|
|
|
char *q = strchr (p+1, ' ');
|
|
|
|
*p = 0;
|
|
|
|
if (q) {
|
|
|
|
*q = 0;
|
|
|
|
mask = r_num_math (core->num, q+1);
|
|
|
|
}
|
|
|
|
from = r_num_math (core->num, str+1);
|
|
|
|
to = r_num_math (core->num, p+1);
|
|
|
|
ret = r_flag_relocate (core->flags, from, mask, to);
|
|
|
|
eprintf ("Relocated %d flags\n", ret);
|
|
|
|
} else {
|
2014-02-15 19:12:50 +00:00
|
|
|
eprintf ("Usage: fR [from] [to] ([mask])\n");
|
2013-08-29 01:19:16 +00:00
|
|
|
eprintf ("Example to relocate PIE flags on debugger:\n"
|
|
|
|
" > fR entry0 `dm~:1[1]`\n");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
2012-11-13 02:25:07 +00:00
|
|
|
case 'b':
|
|
|
|
switch (input[1]) {
|
|
|
|
case ' ':
|
2014-01-13 14:53:48 +00:00
|
|
|
free(str);
|
2012-11-13 02:25:07 +00:00
|
|
|
str = strdup (input+2);
|
|
|
|
ptr = strchr (str, ' ');
|
|
|
|
if (ptr) {
|
|
|
|
RListIter *iter;
|
|
|
|
RFlagItem *flag;
|
|
|
|
RFlag *f = core->flags;
|
|
|
|
*ptr = 0;
|
|
|
|
base = r_num_math (core->num, str);
|
|
|
|
r_list_foreach (f->flags, iter, flag) {
|
|
|
|
if (r_str_glob (flag->name, ptr+1))
|
|
|
|
flag->offset += base;
|
|
|
|
}
|
2013-03-07 22:47:41 +00:00
|
|
|
} else core->flags->base = r_num_math (core->num, input+1);
|
2012-11-13 02:25:07 +00:00
|
|
|
free (str);
|
|
|
|
str = NULL;
|
|
|
|
break;
|
|
|
|
case '\0':
|
|
|
|
r_cons_printf ("%"PFMT64d" 0x%"PFMT64x"\n",
|
|
|
|
core->flags->base,
|
|
|
|
core->flags->base);
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
eprintf ("Usage: fb [addr] [[flags*]]\n");
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
break;
|
2012-02-27 01:40:27 +00:00
|
|
|
case '+':
|
|
|
|
case ' ': {
|
2013-06-25 21:44:21 +00:00
|
|
|
char *s = strchr (str, ' '), *s2 = NULL, *eq = strchr (str, '=');
|
2012-11-13 02:25:07 +00:00
|
|
|
ut32 bsze = 1; //core->blocksize;
|
|
|
|
if (eq) {
|
|
|
|
// TODO: add support for '=' char in flag comments
|
|
|
|
*eq = 0;
|
|
|
|
off = r_num_math (core->num, eq+1);
|
|
|
|
}
|
2012-02-27 01:40:27 +00:00
|
|
|
s = strchr (str, ' ');
|
|
|
|
if (s) {
|
|
|
|
*s = '\0';
|
|
|
|
s2 = strchr (s+1, ' ');
|
|
|
|
if (s2) {
|
|
|
|
*s2 = '\0';
|
|
|
|
if (s2[1]&&s2[2])
|
|
|
|
off = r_num_math (core->num, s2+1);
|
|
|
|
}
|
|
|
|
bsze = r_num_math (core->num, s+1);
|
|
|
|
}
|
2013-06-30 00:45:33 +00:00
|
|
|
if (*str == '.') {
|
2014-09-26 13:40:17 +00:00
|
|
|
RAnalFunction *fcn = r_anal_get_fcn_in (core->anal, off, 0);
|
2014-09-22 02:22:47 +00:00
|
|
|
if (fcn) r_anal_var_add (core->anal, fcn->addr, 0, off, 'v', "int", 4, str+1);
|
2013-06-30 00:45:33 +00:00
|
|
|
else eprintf ("Cannot find function at 0x%08"PFMT64x"\n", off);
|
|
|
|
} else r_flag_set (core->flags, str, off, bsze, (*input=='+'));
|
2012-02-27 01:40:27 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
case '-':
|
|
|
|
if (input[1]) {
|
2012-10-01 07:32:04 +00:00
|
|
|
const char *flagname = input+1;
|
|
|
|
while (*flagname==' ') flagname++;
|
2013-06-30 00:45:33 +00:00
|
|
|
if (*flagname=='.') {
|
2014-09-26 13:40:17 +00:00
|
|
|
RAnalFunction *fcn = r_anal_get_fcn_in (core->anal, off, 0);
|
2014-03-31 01:05:48 +00:00
|
|
|
if (fcn) eprintf ("TODO: local_del_name has been deprecated\n");
|
|
|
|
//;r_anal_fcn_local_del_name (core->anal, fcn, flagname+1);
|
2013-06-30 00:45:33 +00:00
|
|
|
else eprintf ("Cannot find function at 0x%08"PFMT64x"\n", off);
|
|
|
|
} else {
|
|
|
|
if (strchr (flagname, '*'))
|
|
|
|
r_flag_unset_glob (core->flags, flagname);
|
|
|
|
else r_flag_unset (core->flags, flagname, NULL);
|
|
|
|
}
|
2012-02-27 01:40:27 +00:00
|
|
|
} else r_flag_unset_i (core->flags, off, NULL);
|
|
|
|
break;
|
2013-06-25 21:44:21 +00:00
|
|
|
case '.':
|
2013-06-30 00:45:33 +00:00
|
|
|
if (input[1]) {
|
|
|
|
if (input[1] == '*') {
|
|
|
|
if (input[2] == '*') {
|
2014-09-23 07:35:37 +00:00
|
|
|
r_anal_fcn_labels (core->anal, NULL, 1);
|
2013-06-30 00:45:33 +00:00
|
|
|
} else {
|
2014-09-26 13:40:17 +00:00
|
|
|
RAnalFunction *fcn = r_anal_get_fcn_in (core->anal, off, 0);
|
2014-09-23 07:35:37 +00:00
|
|
|
if (fcn) r_anal_fcn_labels (core->anal, fcn, 1);
|
2013-06-30 00:45:33 +00:00
|
|
|
else eprintf ("Cannot find function at 0x%08"PFMT64x"\n", off);
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
const char *name = input+((input[2]==' ')? 2:1);
|
2014-09-26 13:40:17 +00:00
|
|
|
RAnalFunction *fcn = r_anal_get_fcn_in (core->anal, off, 0);
|
2013-06-30 00:45:33 +00:00
|
|
|
if (fcn) {
|
|
|
|
if (*name=='-') {
|
2014-09-23 07:35:37 +00:00
|
|
|
r_anal_fcn_label_del (core->anal, fcn, name+1, off);
|
2013-06-30 00:45:33 +00:00
|
|
|
} else {
|
2014-09-23 07:35:37 +00:00
|
|
|
r_anal_fcn_label_set (core->anal, fcn, name, off);
|
2013-06-30 00:45:33 +00:00
|
|
|
}
|
|
|
|
} else eprintf ("Cannot find function at 0x%08"PFMT64x"\n", off);
|
|
|
|
}
|
|
|
|
} else {
|
2014-09-26 13:40:17 +00:00
|
|
|
RAnalFunction *fcn = r_anal_get_fcn_in (core->anal, off, 0);
|
2014-09-23 07:35:37 +00:00
|
|
|
if (fcn) r_anal_fcn_labels (core->anal, fcn, 0);
|
2013-06-30 00:45:33 +00:00
|
|
|
else eprintf ("Cannot find function at 0x%08"PFMT64x"\n", off);
|
2013-06-25 21:44:21 +00:00
|
|
|
}
|
|
|
|
break;
|
2012-02-27 01:40:27 +00:00
|
|
|
case 'l':
|
|
|
|
if (input[1] == ' ') {
|
|
|
|
RFlagItem *item = r_flag_get_i (core->flags,
|
|
|
|
r_num_math (core->num, input+2));
|
2012-09-06 01:12:54 +00:00
|
|
|
if (item)
|
2012-02-27 01:40:27 +00:00
|
|
|
r_cons_printf ("0x%08"PFMT64x"\n", item->offset);
|
|
|
|
} else eprintf ("Missing arguments\n");
|
|
|
|
break;
|
2012-09-28 00:20:52 +00:00
|
|
|
#if 0
|
|
|
|
case 'd':
|
|
|
|
if (input[1] == ' ') {
|
|
|
|
char cmd[128];
|
|
|
|
RFlagItem *item = r_flag_get_i (core->flags,
|
|
|
|
r_num_math (core->num, input+2));
|
|
|
|
if (item) {
|
|
|
|
r_cons_printf ("0x%08"PFMT64x"\n", item->offset);
|
|
|
|
snprintf (cmd, sizeof (cmd), "pD@%"PFMT64d":%"PFMT64d,
|
|
|
|
item->offset, item->size);
|
|
|
|
r_core_cmd0 (core, cmd);
|
|
|
|
}
|
|
|
|
} else eprintf ("Missing arguments\n");
|
|
|
|
break;
|
|
|
|
#endif
|
|
|
|
case 'x':
|
|
|
|
if (input[1] == ' ') {
|
|
|
|
char cmd[128];
|
|
|
|
RFlagItem *item = r_flag_get_i (core->flags,
|
|
|
|
r_num_math (core->num, input+2));
|
|
|
|
if (item) {
|
|
|
|
r_cons_printf ("0x%08"PFMT64x"\n", item->offset);
|
|
|
|
snprintf (cmd, sizeof (cmd), "px@%"PFMT64d":%"PFMT64d,
|
|
|
|
item->offset, item->size);
|
|
|
|
r_core_cmd0 (core, cmd);
|
|
|
|
}
|
|
|
|
} else eprintf ("Missing arguments\n");
|
|
|
|
break;
|
2012-02-27 01:40:27 +00:00
|
|
|
case 'S':
|
|
|
|
r_flag_sort (core->flags, (input[1]=='n'));
|
|
|
|
break;
|
|
|
|
case 's':
|
2012-11-13 02:25:07 +00:00
|
|
|
switch (input[1]) {
|
2013-03-07 22:47:41 +00:00
|
|
|
case 'r':
|
|
|
|
if (input[2]==' ')
|
|
|
|
r_flag_space_rename (core->flags, NULL, input+2);
|
|
|
|
else eprintf ("Usage: fsr [newname]\n");
|
|
|
|
break;
|
2013-01-17 02:29:46 +00:00
|
|
|
case 'j':
|
|
|
|
case '\0':
|
|
|
|
case '*':
|
|
|
|
r_flag_space_list (core->flags, input[1]);
|
|
|
|
break;
|
2012-11-13 02:25:07 +00:00
|
|
|
case ' ':
|
2012-09-06 01:12:54 +00:00
|
|
|
r_flag_space_set (core->flags, input+2);
|
2012-11-13 02:25:07 +00:00
|
|
|
break;
|
|
|
|
case 'm':
|
|
|
|
{ RFlagItem *f;
|
|
|
|
ut64 off = core->offset;
|
|
|
|
if (input[2] == ' ')
|
|
|
|
off = r_num_math (core->num, input+2);
|
|
|
|
f = r_flag_get_i (core->flags, off);
|
|
|
|
if (f) {
|
|
|
|
f->space = core->flags->space_idx;
|
|
|
|
} else eprintf ("Cannot find any flag at 0x%"PFMT64x".\n", off);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
default: {
|
2012-09-06 01:12:54 +00:00
|
|
|
int i, j = 0;
|
2012-11-13 02:25:07 +00:00
|
|
|
for (i=0; i<R_FLAG_SPACES_MAX; i++) {
|
2012-09-06 01:12:54 +00:00
|
|
|
if (core->flags->spaces[i])
|
|
|
|
r_cons_printf ("%02d %c %s\n", j++,
|
|
|
|
(i==core->flags->space_idx)?'*':' ',
|
|
|
|
core->flags->spaces[i]);
|
|
|
|
}
|
2012-11-13 02:25:07 +00:00
|
|
|
} break;
|
2012-09-06 01:12:54 +00:00
|
|
|
}
|
2012-02-27 01:40:27 +00:00
|
|
|
break;
|
2012-08-09 16:19:00 +00:00
|
|
|
case 'g':
|
2013-10-16 23:04:05 +00:00
|
|
|
r_core_cmd0 (core, "V");
|
2012-08-09 16:19:00 +00:00
|
|
|
break;
|
2012-10-26 08:00:22 +00:00
|
|
|
case 'c':
|
2014-08-18 23:47:02 +00:00
|
|
|
if (input[1]=='?') {
|
|
|
|
const char *help_msg[] = {
|
|
|
|
"Usage: fc", "<flagname> [color]", " # List colors with 'ecs'",
|
|
|
|
"fc", " flagname", "Get current color for given flagname",
|
|
|
|
"fc", " flagname color", "Set color to a flag",
|
|
|
|
NULL
|
|
|
|
};
|
|
|
|
r_core_cmd_help (core, help_msg);
|
|
|
|
} else {
|
|
|
|
RFlagItem *fi;
|
|
|
|
const char *ret;
|
|
|
|
char *arg = r_str_chop (strdup (input+2));
|
|
|
|
char *color = strchr (arg, ' ');
|
|
|
|
if (color && color[1])
|
|
|
|
*color++ = 0;
|
|
|
|
fi = r_flag_get (core->flags, arg);
|
|
|
|
if (fi) {
|
|
|
|
ret = r_flag_color (core->flags, fi, color);
|
|
|
|
if (!color && ret)
|
|
|
|
r_cons_printf ("%s\n", ret);
|
|
|
|
} else {
|
|
|
|
eprintf ("Unknown flag '%s'\n", arg);
|
|
|
|
}
|
|
|
|
free (arg);
|
|
|
|
}
|
2012-10-26 08:00:22 +00:00
|
|
|
break;
|
|
|
|
case 'C':
|
|
|
|
if (input[1]==' ') {
|
|
|
|
RFlagItem *item;
|
|
|
|
char *q, *p = strdup (input+2);
|
|
|
|
q = strchr (p, ' ');
|
|
|
|
if (q) {
|
|
|
|
*q = 0;
|
|
|
|
item = r_flag_get (core->flags, p);
|
|
|
|
if (item) {
|
|
|
|
r_flag_item_set_comment (item, q+1);
|
|
|
|
} else eprintf ("Cannot find flag with name '%s'\n", p);
|
|
|
|
} else {
|
|
|
|
item = r_flag_get_i (core->flags, r_num_math (core->num, p));
|
|
|
|
if (item && item->comment) {
|
|
|
|
r_cons_printf ("%s\n", item->comment);
|
|
|
|
} else eprintf ("Cannot find item\n");
|
|
|
|
}
|
|
|
|
free (p);
|
|
|
|
} else eprintf ("Usage: fC [name] [comment]\n");
|
|
|
|
break;
|
2012-02-27 01:40:27 +00:00
|
|
|
case 'o':
|
2012-11-27 13:09:53 +00:00
|
|
|
{ // TODO: use file.fortunes // can be dangerous in sandbox mode
|
2012-02-27 01:40:27 +00:00
|
|
|
char *file = R2_PREFIX"/share/doc/radare2/fortunes";
|
|
|
|
char *line = r_file_slurp_random_line (file);
|
|
|
|
if (line) {
|
|
|
|
r_cons_printf (" -- %s\n", line);
|
|
|
|
free (line);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case 'r':
|
2013-02-11 03:08:21 +00:00
|
|
|
if (input[1]==' ' && input[2]) {
|
2012-02-27 01:40:27 +00:00
|
|
|
char *old, *new;
|
|
|
|
RFlagItem *item;
|
|
|
|
old = str+1;
|
|
|
|
new = strchr (old, ' ');
|
|
|
|
if (new) {
|
|
|
|
*new = 0;
|
|
|
|
new++;
|
|
|
|
item = r_flag_get (core->flags, old);
|
|
|
|
} else {
|
|
|
|
new = old;
|
|
|
|
item = r_flag_get_i (core->flags, core->offset);
|
|
|
|
}
|
2012-11-13 02:25:07 +00:00
|
|
|
if (item) {
|
|
|
|
if (!r_flag_rename (core->flags, item, new))
|
|
|
|
eprintf ("Invalid name\n");
|
|
|
|
} else eprintf ("Cannot find flag\n");
|
2012-02-27 01:40:27 +00:00
|
|
|
}
|
|
|
|
break;
|
2014-09-24 01:01:18 +00:00
|
|
|
case 'n':
|
2012-02-27 01:40:27 +00:00
|
|
|
case '*':
|
|
|
|
case '\0':
|
2013-01-16 11:17:14 +00:00
|
|
|
case 'j':
|
|
|
|
r_flag_list (core->flags, *input);
|
2012-02-27 01:40:27 +00:00
|
|
|
break;
|
|
|
|
case 'd':
|
|
|
|
{
|
|
|
|
ut64 addr = 0;
|
|
|
|
RFlagItem *f = NULL;
|
|
|
|
switch (input[1]) {
|
|
|
|
case '?':
|
2013-04-05 00:55:47 +00:00
|
|
|
eprintf ("Usage: fd [offset|flag|expression]\n");
|
2014-04-29 22:57:51 +00:00
|
|
|
if (str)
|
|
|
|
free (str);
|
2012-02-27 01:40:27 +00:00
|
|
|
return R_FALSE;
|
|
|
|
case '\0':
|
|
|
|
addr = core->offset;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
addr = r_num_math (core->num, input+2);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
f = r_flag_get_at (core->flags, addr);
|
|
|
|
if (f) {
|
|
|
|
if (f->offset != addr) {
|
2013-04-05 00:55:47 +00:00
|
|
|
r_cons_printf ("%s + %d\n", f->name, (int)(addr-f->offset));
|
2012-02-27 01:40:27 +00:00
|
|
|
} else r_cons_printf ("%s\n", f->name);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case '?':
|
2014-06-25 16:57:34 +00:00
|
|
|
{
|
|
|
|
const char *help_msg[] = {
|
|
|
|
"Usage: f","[?] [flagname]", " # Manage offset-name flags",
|
2014-09-25 22:10:30 +00:00
|
|
|
"f","","list flags (will only list flags from selected flagspaces)",
|
2014-06-25 16:57:34 +00:00
|
|
|
"f."," [*[*]]","list local per-function flags (*) as r2 commands",
|
2014-09-02 00:36:11 +00:00
|
|
|
"f.","blah=$$+12","set local function label named 'blah'",
|
2014-06-25 16:57:34 +00:00
|
|
|
"f*","","list flags in r commands",
|
|
|
|
"f"," name 12 @ 33","set flag 'name' with length 12 at offset 33",
|
|
|
|
"f"," name = 33","alias for 'f name @ 33' or 'f name 1 33'",
|
|
|
|
"f"," name 12 33 [cmt]","same as above + optional comment",
|
|
|
|
"f-",".blah@fcn.foo","delete local label from function at current seek (also f.-)",
|
|
|
|
"f+","name 12 @ 33","like above but creates new one if doesnt exist",
|
|
|
|
"f-","name","remove flag 'name'",
|
|
|
|
"f-","@addr","remove flag at address expression",
|
|
|
|
"f."," fname","list all local labels for the given function",
|
2014-09-02 00:36:11 +00:00
|
|
|
"fa"," [name] [alias]","alias a flag to evaluate an expression",
|
|
|
|
"fb"," [addr]","set base address for new flags",
|
|
|
|
"fb"," [addr] [flag*]","move flags matching 'flag' to relative addr",
|
2014-09-07 23:33:50 +00:00
|
|
|
"fc"," [name] [color]","set color for given flag",
|
2014-09-02 00:36:11 +00:00
|
|
|
"fC"," [name] [cmt]","set comment for given flag",
|
2014-06-25 16:57:34 +00:00
|
|
|
"fd"," addr","return flag+delta",
|
2014-09-25 22:10:30 +00:00
|
|
|
"fg","","bring visual mode to foreground",
|
2014-09-02 00:36:11 +00:00
|
|
|
"fj","","list flags in JSON format",
|
|
|
|
"fl"," [flagname]","show flag length (size)",
|
2014-06-25 16:57:34 +00:00
|
|
|
"fm"," addr","move flag at current offset to new address",
|
2014-09-24 01:01:18 +00:00
|
|
|
"fn","","list flags displaying the real name (demangled)",
|
2014-09-02 00:36:11 +00:00
|
|
|
"fo","","show fortunes",
|
2014-06-25 16:57:34 +00:00
|
|
|
//" fc [name] [cmt] ; set execution command for a specific flag"
|
|
|
|
"fr"," [old] [[new]]","rename flag (if no new flag current seek one is used)",
|
|
|
|
"fR"," [f] [t] [m]","relocate all flags matching f&~m 'f'rom, 't'o, 'm'ask",
|
2014-09-02 00:36:11 +00:00
|
|
|
"fs","","display flagspaces",
|
2014-09-25 22:10:30 +00:00
|
|
|
"fs"," *","select all flagspaces",
|
|
|
|
"fs"," flagspace","select flagspace or create if it doesn't exist",
|
2014-09-02 00:36:11 +00:00
|
|
|
"fsm"," [addr]","move flags at given address to the current flagspace",
|
2014-09-25 22:10:30 +00:00
|
|
|
"fsr"," newname","rename selected flagspace",
|
2014-09-02 00:36:11 +00:00
|
|
|
"fS","[on]","sort flags by offset or name",
|
2014-06-25 16:57:34 +00:00
|
|
|
"fx","[d]","show hexdump (or disasm) of flag:flagsize",
|
2014-08-17 15:13:11 +00:00
|
|
|
NULL};
|
2014-06-25 16:57:34 +00:00
|
|
|
r_core_cmd_help (core, help_msg);
|
|
|
|
}
|
2012-02-27 01:40:27 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
if (str)
|
|
|
|
free (str);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|