Fix #8068 - r2 -X is now -R and old -R is now -r

This commit is contained in:
pancake 2017-07-31 14:08:06 +02:00
parent 41786e35ca
commit 01d3179a61
3 changed files with 13 additions and 12 deletions

View File

@ -131,7 +131,8 @@ static int main_help(int line) {
" -Q quiet mode (no prompt) and quit faster (quickLeak=true)\n" " -Q quiet mode (no prompt) and quit faster (quickLeak=true)\n"
" -p [prj] use project, list if no arg, load if no file\n" " -p [prj] use project, list if no arg, load if no file\n"
" -P [file] apply rapatch file and quit\n" " -P [file] apply rapatch file and quit\n"
" -R [rarun2] specify rarun2 profile to load (same as -e dbg.profile=X)\n" " -r [rarun2] specify rarun2 profile to load (same as -e dbg.profile=X)\n"
" -R [rr2rule] specify custom rarun2 directive\n"
" -s [addr] initial seek\n" " -s [addr] initial seek\n"
" -S start r2 in sandbox mode\n" " -S start r2 in sandbox mode\n"
#if USE_THREADS #if USE_THREADS
@ -140,7 +141,6 @@ static int main_help(int line) {
" -u set bin.filter=false to get raw sym/sec/cls names\n" " -u set bin.filter=false to get raw sym/sec/cls names\n"
" -v, -V show radare2 version (-V show lib versions)\n" " -v, -V show radare2 version (-V show lib versions)\n"
" -w open file in write mode\n" " -w open file in write mode\n"
" -X [rr2rule] specify custom rarun2 directive\n"
" -z, -zz do not load strings or load them even in raw\n"); " -z, -zz do not load strings or load them even in raw\n");
} }
if (line == 2) { if (line == 2) {
@ -601,10 +601,13 @@ int main(int argc, char **argv, char **envp) {
r_config_set (r.config, "cfg.fortunes", "false"); r_config_set (r.config, "cfg.fortunes", "false");
quiet = true; quiet = true;
break; break;
case 'R': case 'r':
haveRarunProfile = true; haveRarunProfile = true;
r_config_set (r.config, "dbg.profile", optarg); r_config_set (r.config, "dbg.profile", optarg);
break; break;
case 'R':
customRarunProfile = r_str_appendf (customRarunProfile, "%s\n", optarg);
break;
case 's': case 's':
s_seek = optarg; s_seek = optarg;
break; break;
@ -631,9 +634,6 @@ int main(int argc, char **argv, char **envp) {
case 'w': case 'w':
perms = R_IO_READ | R_IO_WRITE; perms = R_IO_READ | R_IO_WRITE;
break; break;
case 'X':
customRarunProfile = r_str_appendf (customRarunProfile, "%s\n", optarg);
break;
default: default:
help++; help++;
} }

View File

@ -1,4 +1,4 @@
/* radare - LGPL - Copyright 2010-2015 - pancake */ /* radare - LGPL - Copyright 2010-2017 - pancake */
#include <r_egg.h> #include <r_egg.h>
@ -311,7 +311,7 @@ static void rcc_internal_mathop(REgg *egg, char *ptr, char *ep, char op) {
} }
R_FREE (oldp); R_FREE (oldp);
R_FREE (ep); R_FREE (ep);
R_FREE (p); // R_FREE (p);
} }
/* /*

View File

@ -16,7 +16,8 @@
.Op Fl m Ar addr .Op Fl m Ar addr
.Op Fl p Ar project .Op Fl p Ar project
.Op Fl P Ar patch .Op Fl P Ar patch
.Op Fl R Ar rarun2 .Op Fl r Ar rarun2
.Op Fl R Ar rr2rule
.Op Fl s Ar addr .Op Fl s Ar addr
.Op Fl 0AdDwntLquvVX .Op Fl 0AdDwntLquvVX
.Ar -|--|=|file .Ar -|--|=|file
@ -83,8 +84,10 @@ Same as q, but exiting without freeing RCore, this produces leaks at exit time,
Set project file Set project file
.It Fl P Ar file .It Fl P Ar file
Apply rapatch file and quit (see doc/rapatch.md for more details) Apply rapatch file and quit (see doc/rapatch.md for more details)
.It Fl R Ar rarun2 .It Fl r Ar rarun2
Specify dbg.profile rarun2 profile to use when spawning a program for debugging Specify dbg.profile rarun2 profile to use when spawning a program for debugging
.It Fl R Ar rarun2-directive
Specify custom rarun2 directives without having to create a rarun2 profile
.It Fl s Ar addr .It Fl s Ar addr
Start seeking at this address Start seeking at this address
.It Fl S .It Fl S
@ -103,8 +106,6 @@ Open in write mode
Show help message Show help message
.It Fl H .It Fl H
Show files and environment help Show files and environment help
.It Fl X Ar rarun2-directive
Specify custom rarun2 directives without having to create a rarun2 profile
.El .El
.Sh SHELL .Sh SHELL
Type '?' for help Type '?' for help