Add RABIN2_DEMANGLE env var

This commit is contained in:
pancake 2015-10-19 03:28:22 +02:00
parent 0cfddf6961
commit 5d33a6fe44
2 changed files with 7 additions and 0 deletions

View File

@ -100,6 +100,7 @@ static int rabin_show_help(int v) {
);
if (v) {
printf ("Environment:\n"
" RABIN2_DEMANGLE: e bin.demangle # show symbols demangled\n"
" RABIN2_MAXSTRBUF: e bin.maxstrbuf # specify maximum buffer size\n"
" RABIN2_STRFILTER: e bin.strfilter # r2 -qe bin.strfilter=? -c '' --\n"
" RABIN2_STRPURGE: e bin.strpurge # try to purge false positives\n");
@ -404,6 +405,10 @@ int main(int argc, char **argv) {
r_lib_opendir (l, homeplugindir);
r_lib_opendir (l, R2_LIBDIR"/radare2/"R2_VERSION);
if ((tmp = r_sys_getenv ("RABIN2_DEMANGLE"))) {
r_config_set (core.config, "bin.demangle", tmp);
free (tmp);
}
if ((tmp = r_sys_getenv ("RABIN2_MAXSTRBUF"))) {
r_config_set (core.config, "bin.maxstrbuf", tmp);
free (tmp);

View File

@ -102,6 +102,8 @@ Shows strings from raw bins
.El
.Sh ENVIRONMENT
.Pp
RABIN2_DEMANGLE demangle symbols
.Pp
RABIN2_MAXSTRBUF same as r2 -e bin.maxstrbuf for rabin2
.Pp
RABIN2_STRFILTER same as r2 -e bin.strfilter for rabin2