Add -s -i -f r2 commands ##shell

This commit is contained in:
pancake 2022-11-03 18:48:40 +01:00
parent 165cb48f91
commit 66d6bbfe06
2 changed files with 13 additions and 1 deletions

View File

@ -111,6 +111,9 @@ static RCoreHelpMessage help_msg_dash = {
"-b", " 32", "same as e or r2 -e",
"-c", " cpu", "same as r2 -e asm.cpu=",
"-e", " k=v", "same as r2 -b or e asm.bits",
"-f", "", "block size = file size (b $s)",
"-i", " [file]", "same as . [file], to run a script",
"-s", " [addr]", "same as r2 -e asm.cpu=",
"--", "", "seek one block backward. Same as s-- (see `b` command)",
NULL
};
@ -1632,6 +1635,15 @@ static int cmd_stdin(void *data, const char *input) {
r_core_cmdf (core, "e asm.arch=%s", arg);
r_core_cmdf (core, "e anal.arch=%s", arg);
break;
case 'i': // "-i"
r_core_cmdf (core, ". %s", arg);
break;
case 's': // "-s"
r_core_cmdf (core, "s %s", arg);
break;
case 'f': // "-f"
r_core_cmd0 (core, "b $s");
break;
case 'b': // "-b"
r_core_cmdf (core, "e asm.bits=%s", arg);
break;

View File

@ -5,7 +5,7 @@ CC=${CROSS}gcc
USER_CC=${CC}
RANLIB=${CROSS}ranlib
ONELIB=0
OSTYPE=linux
OSTYPE=gnulinux
AR=${CROSS}ar
CC_AR=${AR} -r ${LIBAR}
PARTIALLD=${CROSS}ld -r