Add parameter to Sf

This commit is contained in:
pancake 2016-11-08 14:27:37 +01:00
parent 93c0293664
commit 5c9ec63857

View File

@ -118,7 +118,7 @@ static int cmd_section(void *data, const char *input) {
"Sa","[-] [A] [B] [[off]]","Specify arch and bits for given section",
"Sd[a]"," [file]","dump current (all) section to a file (see dmd)",
"Sl"," [file]","load contents of file into current section (see dml)",
"Sf","","Alias for S 0 0 $s $s foo mrwx",
"Sf"," [baddr]","Alias for S 0 0 $s $s foo mrwx",
"Sj","","list sections in JSON (alias for iSj)",
"Sr"," [name]","rename section on current seek",
"S"," off va sz vsz name mrwx","add new section (if(!vsz)vsz=sz)",
@ -132,10 +132,15 @@ static int cmd_section(void *data, const char *input) {
r_core_cmd_help (core, help_msg);
// TODO: add command to resize current section
break;
case 'f':
r_core_cmd0 (core, "S 0 0 $s $s foo mrwx");
case 'f': // "Sf"
if (input[1] == ' ') {
ut64 n = r_num_math (core->num, input + 1);
r_core_cmdf (core, "S 0x%"PFMT64x" 0x%"PFMT64x" $s $s foo mrwx", n, n);
} else {
r_core_cmd0 (core, "S 0 0 $s $s foo mrwx");
}
break;
case 'j':
case 'j': // "Sj"
r_core_cmd0 (core, "iSj");
break;
case 'a':