Add scr.slow and fix uninitialized var issue

This commit is contained in:
pancake 2018-02-22 12:45:54 +01:00
parent 7467b99205
commit 22bd9e9fb5
3 changed files with 5 additions and 3 deletions

View File

@ -2755,6 +2755,7 @@ R_API int r_core_config_init(RCore *core) {
SETCB ("scr.flush", "false", &cb_scrflush, "Force flush to console in realtime (breaks scripting)");
/* TODO: rename to asm.color.ops ? */
SETPREF ("scr.zoneflags", "true", "Show zoneflags in visual mode before the title (see fz?)");
SETPREF ("scr.slow", "true", "Do slow stuff on visual mode like RFlag.get_at(true)");
SETPREF ("scr.color.ops", "true", "Colorize numbers and registers in opcodes");
SETPREF ("scr.color.bytes", "true", "Colorize bytes that represent the opcodes of the instruction");
#if __WINDOWS__ && !__CYGWIN__

View File

@ -3878,7 +3878,7 @@ static void ds_print_esil_anal(RDisasmState *ds) {
RListIter *iter;
RListIter *nextele;
const char *fcn_name = NULL;
char *key;
char *key = NULL;
ut64 pcv = ds->analop.jump;
if (pcv == UT64_MAX) {
pcv = ds->analop.ptr; // call [reloc-addr] // windows style

View File

@ -2618,6 +2618,7 @@ R_API int r_core_visual_cmd(RCore *core, const char *arg) {
}
R_API void r_core_visual_title(RCore *core, int color) {
bool showDelta = r_config_get_i (core->config, "scr.slow");
static ut64 oldpc = 0;
const char *BEGIN = core->cons->pal.prompt;
const char *filename;
@ -2693,12 +2694,12 @@ R_API void r_core_visual_title(RCore *core, int color) {
core->flags->space_strict = true;
core->anal->flb.set_fs (core->flags, "symbols");
if (core->flags->space_idx != -1) {
f = core->anal->flb.get_at (core->flags, addr, false);
f = core->anal->flb.get_at (core->flags, addr, showDelta);
}
core->flags->space_strict = oss;
core->flags->space_idx = osi;
if (!f) {
f = r_flag_get_at (core->flags, addr, false);
f = r_flag_get_at (core->flags, addr, showDelta);
}
#else
RFlagItem *f = r_flag_get_at (core->flags, addr, false);