diff --git a/doc/fortunes.tips b/doc/fortunes.tips index c7d5ef7f05..14b9650ced 100644 --- a/doc/fortunes.tips +++ b/doc/fortunes.tips @@ -42,7 +42,6 @@ Execute a command on the visual prompt with cmd.vprompt Reduce the delta where flag resolving by address is used with cfg.delta Disable these messages with 'e cfg.fortunes=false' in your ~/.rizinrc Change your fortune types with 'e cfg.fortunes.file=fun,tips' in your ~/.rizinrc -Show offsets in graphs with 'e graph.offset=true' Execute a command every time a breakpoint is hit with 'e cmd.bp=!my-program' Disassemble in intel syntax with 'e asm.syntax=intel'. Change the UID of the debugged process with child.uid (requires root) diff --git a/librz/core/agraph.c b/librz/core/agraph.c index 32762c9575..1ef9107742 100644 --- a/librz/core/agraph.c +++ b/librz/core/agraph.c @@ -2131,7 +2131,7 @@ static char *get_body(RzCore *core, ut64 addr, int size, int opts) { const bool o_cmtright = rz_config_get_i(core->config, "graph.cmtright"); const bool o_bytes = rz_config_get_i(core->config, "graph.bytes"); const bool o_flags_in_bytes = rz_config_get_i(core->config, "asm.flags.inbytes"); - const bool o_graph_offset = rz_config_get_i(core->config, "graph.offset"); + const bool o_asm_offset = rz_config_get_i(core->config, "asm.offset"); int o_cursor = core->print->cur_enabled; if (opts & BODY_COMMENTS) { rz_core_visual_toggle_decompiler_disasm(core, true, false); @@ -2159,11 +2159,8 @@ static char *get_body(RzCore *core, ut64 addr, int size, int opts) { rz_config_set_i(core->config, "asm.bb.middle", false); core->print->cur_enabled = false; - if (opts & BODY_OFFSETS || opts & BODY_SUMMARY || o_graph_offset) { - rz_config_set_i(core->config, "asm.offset", true); - } else { - rz_config_set_i(core->config, "asm.offset", false); - } + rz_config_set_b(core->config, "asm.offset", + (opts & BODY_OFFSETS) || (opts & BODY_SUMMARY) || o_asm_offset); bool html = rz_config_get_i(core->config, "scr.html"); rz_config_set_i(core->config, "scr.html", 0); diff --git a/librz/core/cconfig.c b/librz/core/cconfig.c index 39f5a9bdbd..a45f53b64d 100644 --- a/librz/core/cconfig.c +++ b/librz/core/cconfig.c @@ -3687,7 +3687,6 @@ RZ_API int rz_core_config_init(RzCore *core) { SETI("graph.layout", 0, "Graph layout (0=vertical, 1=horizontal)"); SETI("graph.linemode", 1, "Graph edges (0=diagonal, 1=square)"); SETPREF("graph.font", "Courier", "Font for dot graphs"); - SETBPREF("graph.offset", "false", "Show offsets in graphs"); SETBPREF("graph.bytes", "false", "Show opcode bytes in graphs"); SETI("graph.from", UT64_MAX, "Lower bound address when drawing global graphs"); SETI("graph.to", UT64_MAX, "Upper bound address when drawing global graphs"); diff --git a/test/db/cmd/cmd_visual b/test/db/cmd/cmd_visual index 19766573d3..0f8a651052 100644 --- a/test/db/cmd/cmd_visual +++ b/test/db/cmd/cmd_visual @@ -204,6 +204,7 @@ CMDS=<